Hacker News new | ask | show | jobs
by nakkaya 5464 days ago
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.
1 comments

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.
No, I didn't know there was a llvm backend for avr.