Re:Ferret: An Experimental Clojure Compiler
by nakkaya on Thursday June 30, 2011 @10:15AM
(#2714095)
This is how most Lisp compilers work. Gambit, Stalin, Chicken they all use C as the intermediate language. Currently this works on my MacBook, beagleboard and any avr microcontroller with enough ram and flash memory. If I were to use machine code I would have to output 3 completely different instructions sets.
Re:Ferret: An Experimental Clojure Compiler
by CurtHagenlocher on Thursday June 30, 2011 @10:22AM
(#2714123)
Have you considered LLVM?
Compiling to LLVM is an interesting prospect, because if you could make the language dovetail nicely with, meaning compile functions into LLVM functions and use their datatypes fully you could presumably be highly interoperable with other languages(?). Sounds like it could be a serious departure from the Clojure standard though, but perhaps another Clojure inspired LISP. Still, LLVM won't give you a run-time, which seems to be the main problem.
I would like to see real effort to have Clojure on the bare metal, but that will probably have to wait until "Clojure in Clojure" get more priority on clojure core.