
Urlang: JavaScript with Racket-like syntax - merrier
https://github.com/soegaard/urlang
======
eggy
The number one reason listed is to write a Racket runtime in JavaScript. Does
this man like the Ur functional language, Racket can then be used on the
server, the client and make SQL calls eventually?

~~~
soegaard
Here Ur just means something simple.

Also urlang is a bad pun. It sounds like Erlang (whom the programming language
Erlang is named after), who grew up near where I live.

------
terminalcommand
There is also lispyscript for people interested in writing js in a lispy
syntax.

------
andrewfromx
my first reaction, WTF that's like lisp or erlang right? So, maybe that's the
point. JS is a functional language like lisp or erlang???

~~~
soegaard
Actually Urlang is like JavaScript. The syntax is different, the semantics are
the same. Except that I signal error for unbound identifiers (and DrRacket
will show where in the source code). Also I allow names with dashes in them.

As an addition (which doesn't change the semantics) I allow the user to add
their own favorite programming constructs - i.e. there are macros. And the
macros are written using standard Racket macro tools.

~~~
eggy
Ok, that makes sense. How complete is it? Could I do all my front end work
with it? I'll look at it more when I get home. Thanks, I always play around
with Racket.

~~~
soegaard
It should support all of JavaScript. If you find a construct not supported,
file a bug.

Since Urlang has not been released on pkgs.racket-lang.org yet, clone the
Github repo. And then use the Package Manager in DrRacket (or use raco) to
install urlang as a package.

For a small demonstration on how to use Raphael.js (a graphics library) and
dynamic insertion of DOM nodes see the "browser.rkt" example.

[https://github.com/soegaard/urlang/blob/master/browser.html](https://github.com/soegaard/urlang/blob/master/browser.html)
[https://github.com/soegaard/urlang/blob/master/browser.rkt](https://github.com/soegaard/urlang/blob/master/browser.rkt)

Note: Open "browser.rkt" in DrRacket. Run the program. If "foo" is an urlang
module, then the file "foo.js" will be generated.

I'd love to hear your feedback.

~~~
eggy
I'll try it this weekend for sure. Thanks!

