|arc-to-c : soon on the git|
|13 points by sacado 4125 days ago | 65 comments|
|Hello all, during my long week-end I finally did it : I implemented a crappy version of a compiler from Arc to C (written in Arc of course). Only a very small subset of Arc is implemented (at least, I can compile the fib function, but it crashes after (fib 30) :) and it is still quite slow (a little faster than non-jitted mzscheme however) but I think it is a good starting point. It knows fixnums, (with +, -, x, < and is), conditionals and closures (with lexical scoping and continuations). It is based on Marc Feeley's tutorial on compiling scheme to C. I gave the link a few days ago.|
Now, have to be implemented :
- bignums, rationals, inexact numbers and complex numbers (and all their primitives)
- dotted pairs, symbols, strings, hash tables
- special syntax (and the reader to parse it)
- oh, did I mention the GC ?
Once we've got that and a few more primitives, arc.arc should be compilable and everything should be working, but that's only once we've got that. The next step is then the optimizing compiler.
Who's looking for a Google SoC project already ?