Fargo: new Scheme-like language working in Node.js/browser
21–30 of 37 posts
Re: Fargo: new Scheme-like language working in Node.js/browser
#22Earlier quoted context omitted.
Clojure is a big language, and pretty deeply tied to the JVM; I'm not sure how you'd put it on V8. Scheme is pretty practical, though, once you get used to it.
The first version of Clojure was a Common Lisp compiler that compiled Clojure down to JS to be run on Rhino. There's interest in the Clojure community to have a Clojure "Light" that runs on V8 or SpiderMonkey.
Re: Fargo: new Scheme-like language working in Node.js/browser
#23It compiles a major subset of Apple's Dylan (http://lispm.dyndns.org/documentation/prefix-dylan/book.anno...) 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): https://github.com/turbolent/ralph/blob/master/src/runtime/c...
Almost all of the features are shown in https://github.com/turbolent/ralph/blob/master/src/tests/run... and I'm using it a project now. To build HTML5 apps, there's a small toolbox: https://github.com/turbolent/toolbox
Maybe it's useful to someone else. Cheers
Re: Fargo: new Scheme-like language working in Node.js/browser
#24Any 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).)
They also require the user to explicitly start a fiber. This means when you're not in a fiber you can use a faster stackless engine because you don't need to track the state of the current continuation.
Re: Fargo: new Scheme-like language working in Node.js/browser
#25Also, SibilantJS (which seems more mature at the moment, as `npm install sibilant` works, but `npm install fargo` does not): http://sibilantjs.info/#welcome
Re: Fargo: new Scheme-like language working in Node.js/browser
#26I'm a newb or something but : (cdr ()) makes it explode. What's nil? null nil don't exist I do really like this. I was hoping for something like this where it would allow me to write lisp instead of javascript.
Re: Fargo: new Scheme-like language working in Node.js/browser
#27Earlier quoted context omitted.
I haven't time to play around with Clojure yet, but what makes you think it is more practical than scheme? The primary advantages seem to be JVM interop (which I don't think would be applicable on in a Node.js setting), and easy multi-threading (also not applicable?)
Heavy functional bias. STM. Although, I don't know that those things make it more practical than Scheme. Just more desirable to a subset of people who like that sort of thing.
Yeah, it might be mostly the functional bias. I was just reimplemting persistent immutable hast tables when I said, well dammit, why not try Clojure. And well, despite that I don't particularly like many things like lacking TCO, no continuations, and mostly probably the Scheme macro system, there is a lot of things that they did better.
I really like the data-structure access syntax (no more list-ref), I like that I have generic operations that work on any datastructure supporting the seq abstraction, I can see the point of reducing the number of parents in forms, I truly love that partial/curry is really part of the language, not in some implementation specific extension, I just love the -> 'operator'. Clojure is for me like Python, with much the functional programming support that Python did only get recently, with a community focus on this paradigm. Oh and with a great active helpful community in #clojure unlike the divided community of #scheme.
Before someone wonders: yeah, most can be implemented on top of Scheme, the point is that Clojure did it, and they are popular. Give me a Scheme with all the great things from Clojure and I'll never look back.
Re: Fargo: new Scheme-like language working in Node.js/browser
#28I've been working on Ralph for a while now: https://github.com/turbolent/ralph It compiles a major subset of Apple's Dylan ( http://lispm.dyndns.org/documentation/prefix-dylan/book.anno... ) 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 ru…
Re: Fargo: new Scheme-like language working in Node.js/browser
#29I've been working on Ralph for a while now: https://github.com/turbolent/ralph It compiles a major subset of Apple's Dylan ( http://lispm.dyndns.org/documentation/prefix-dylan/book.anno... ) 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 ru…
How is it related to the Ralph described by Mikel Evins at http://lispm.dyndns.org/news?ID=NEWS-2004-08-14-1 ?
As I needed a name, I just chose "Ralph" as that was the original code-name of Dylan (see http://en.wikipedia.org/wiki/History_of_the_Dylan_programmin...). I'm currently implementing a web-based IDE for the OpenDylan compiler (http://www.opendylan.org/), called "Hula" (original code-name of Apple's IDE, see http://wiki.opendylan.org/wiki/view.dsp?title=AppleDylanScre...). The work-in-progress is at https://github.com/turbolent/hula.
If you're interested in a demo, let me know.
Re: Fargo: new Scheme-like language working in Node.js/browser
#30Also, SibilantJS (which seems more mature at the moment, as `npm install sibilant` works, but `npm install fargo` does not): http://sibilantjs.info/#welcome
With regard to maturity, Fargo is one week into development. I'm not even sure if its just a quick hack to show off an idea or if it will become a production language. Certainly I have a lot to learn about compilers and VMs before that happens.