On 5 Dec 2010, at 19:24, Kassen wrote:
No, I am making my own language right now using Bison/Flex, but its syntax is what is expected as standard. For example, (x, y) |-> x + y evaluates to (lambda (x y) (+ x y)). But is possible to have more complicated things, like functionals with variable arguments: (x, y, ...) (z, ...) |-> [x, y, z] --> (lambda (x . y) (lambda z (list x y z))) Or calling functions: f(a, b)(c, d) --> ((f a b) c d)
Got it. Seems like you are aiming for something with Scheme's "purity" (for lack of a better word) and yet with ChucK's "read left to right, like a novel" style instead of "read inside to outside, which will come down to right to left, most of the time, unless we need multiple lines in which case you better have a good editor". If so; that should be good.
I have my own ideas of what the syntax should be, but got started using Guile as a back-end, which turns out to simplify the implementation a great deal. (Guile 2.0 will have byte-code compilation and switches to the Boehm conservative GC.) I am using C, C++ and Guile can be called directly from those. So one should be able to incorporate ChucK by calling its functions.
I have just started, but it moves fast forward.
Send me a note when you have a twitter or RSS feed or similar for this.
Sure, whenever you want.