I've been working on Ralph for a while now: <a href="https://github.com/turbolent/ralph" rel="nofollow">https://github.com/turbolent/ralph</a><p>It compiles a major subset of Apple's Dylan (<a href="http://lispm.dyndns.org/documentation/prefix-dylan/book.annotated/annotated-manual.html" rel="nofollow">http://lispm.dyndns.org/documentation/prefix-dylan/book.anno...</a>) to JavaScript, both for use on a CommonJS implementation and in the browser. A bootstrapping compiler is implemented in JS, but the same compiler is also available in Ralph itself and features define-macro (Cl-like). The whole runtime is defined in Ralph as well and provides a single-inheritance object system (including next-method): <a href="https://github.com/turbolent/ralph/blob/master/src/runtime/core.ralph" rel="nofollow">https://github.com/turbolent/ralph/blob/master/src/runtime/c...</a><p>Almost all of the features are shown in <a href="https://github.com/turbolent/ralph/blob/master/src/tests/runtime-tests.ralph" rel="nofollow">https://github.com/turbolent/ralph/blob/master/src/tests/run...</a>
and I'm using it a project now. To build HTML5 apps, there's a small toolbox:
<a href="https://github.com/turbolent/toolbox" rel="nofollow">https://github.com/turbolent/toolbox</a><p>Maybe it's useful to someone else.
Cheers
Well, TCO seems to work:<p><pre><code> (define (count x)
(let loop ((x x) (sum 0))
(if (zero ? x)
sum
(loop (- x 1) (+ sum x)))))
(count 100000) ; ==> 5000050000 (doesn't blow up)
</code></pre>
I'm very tempted to help out however I can. I've been dreaming of using Scheme instead of JS in a Node.js setting.
The more interesting feature of Fargo is coroutines (which can make async programming easier): <a href="https://github.com/jcoglan/fargo" rel="nofollow">https://github.com/jcoglan/fargo</a>
Also, SibilantJS (which seems more mature at the moment, as `npm install sibilant` works, but `npm install fargo` does not):<p><a href="http://sibilantjs.info/#welcome" rel="nofollow">http://sibilantjs.info/#welcome</a>
I'm a newb or something but :<p>(cdr ()) makes it explode. What's nil? null nil don't exist<p>I do really like this. I was hoping for something like this where it would allow me to write lisp instead of javascript.
Any reason why not to implement call/cc and then write fibers in terms of call/cc? The implementation may not actually be any different from what it is. (I've not studied the code enough to understand how it implements fibers, although I got the impression that it handles call frames explicitely (source/fargo/runtime/stack{,less}.js).)
Isn't Shen a very similar idea? Bringing functional programming to Javascript.<p>It is expected to be released very soon for Javascript (and Scheme).<p>[1]: <a href="http://news.ycombinator.com/item?id=1921347" rel="nofollow">http://news.ycombinator.com/item?id=1921347</a><p>[2]: <a href="https://groups.google.com/group/qilang/msg/bd474d815479b50a?hl=en" rel="nofollow">https://groups.google.com/group/qilang/msg/bd474d815479b50a?...</a>
Hmm, I actually hoped for Clojure on Node.js (don't get me wrong, Scheme is beautiful and this seems to be quite a capable implementation but Clojure is way more practical) but hmm, I hope this gets popular.