

Scheme on CoffeeScript - franze
http://dmitrysoshnikov.com/scheme-on-coffee/

======
mrspeaker
Ha ha ha! Absolutely fantastic. The wizard would be proud! How do you handle
tail call optimization with JavaScript? (at least, until the next version of
JS with proper tail calls - woot!
[http://wiki.ecmascript.org/doku.php?id=harmony:proper_tail_c...](http://wiki.ecmascript.org/doku.php?id=harmony:proper_tail_calls)
)

------
jashkenas
Here's direct links to the source (which is worth looking at).

The parser : [https://github.com/DmitrySoshnikov/scheme-on-
coffee/blob/mas...](https://github.com/DmitrySoshnikov/scheme-on-
coffee/blob/master/parse.coffee)

The evaluator: [https://github.com/DmitrySoshnikov/scheme-on-
coffee/blob/mas...](https://github.com/DmitrySoshnikov/scheme-on-
coffee/blob/master/eval.coffee)

The definitions of all the caddr, cdadr variants is kind of fun, and the
definition of "lookupVariableValue" is enlightening, if you were curious about
how that sort of thing worked in Scheme.

~~~
spacemanaki
> if you were curious about how that sort of thing worked in Scheme.

If that's the case you should really read SICP, since there's a lot more
enlightenment where that came from, so to speak.

------
spacemanaki
Scheme in JS is an attractive idea, but it looks like the reader isn't doing
reader-macros correctly:

    
    
        '(a b c)
        (Error: Unbound variable: "a" Error: Unbound variable: "b" Error: Unbound variable: "c")
    

There are a couple others of these:

<http://javascript.crockford.com/little.html>

This one seems to support call/cc:

<https://csel.cs.colorado.edu/~silkense/js-scheme/cps/>

------
qzprt
Obligatory: <http://en.m.wikipedia.org/wiki/Greenspuns_Tenth_Rule>

