1. 17
  1.  

  2. 5

    If you are looking for an s expression based language that targets JavaScript, you might want to have a look at clojure script.

    1. 5

      Should also mention Whalesong, a literal Racket to JavaScript compiler.

      1. 3

        Think of Urlang as JavaScript with sane syntax and JavaScript semantics.

        It’s the the syntax of JavaScript that is the insane part…

        1. 9

          The syntax of JavaScript is the least insane part. But, it’s still not entirely sane. There’s semicolon insertion, non-mandatory braces for single statement / expression blocks (inherited from C), the whole frigging with statement… and don’t get me started on the fact that people have built macros into the language.

          S-expressions are uniform, easy to edit, easy to parse, easy to manipulate with Macros, etc. Having the power of Racket behind them makes it even more interesting as a project.

          1. 2

            Whoops, I was supposed to type a “not” for one of the “the"s.

            1. 2

              Do not worry; I “not” inserted appropriately.

          2. 3

            Syntax (curly brackets and when-you-feel-like-it semicolons) or semantics? (the way the stack works and such) This guts the quirky syntax, though you’d still be living under JS rules.

          3. 3

            Hard to tell from the README, I’ll need to play with it, but curious what the interop story with existing JS libs is.

            Also, it appears Urlang has immutable data structures? https://github.com/soegaard/urlang/blob/master/runtime.rkt#L1139

            1. 7

              Hi. The Urlang language is JS with a nicer syntax and the added bonus of having macros. This means that you can use existing JS libraries without any problems. As an example on how to use Raphael see https://github.com/soegaard/urlang/blob/master/browser.rkt The example also show how to dynamically add nodes to the DOM. The file you found runtime.rkt is not for the Urlang language. It is meant to be a runtime library in a different project: a Racket to JavaScript (via Urlang) compiler. Right now it is included to show how to use Urlang.

              And you are right it is not clear from the README - but since the project haven’t been “released” yet, I don’t feel too guilty :-)

            2. 1

              Is this related to ur/web?

              1. 1

                No.