4 ms·
Correct me if I'm wrong, but to me in looks more like a C++ code generation than real compiler. I would like to see real effort to have Clojure on the bare met
by markokocic 15y ago
Correct me if I'm wrong, but to me in looks more like a C++ code generation than real compiler.
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.
- nakkaya 15y agoThis 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.
- CurtHagenlocher 15y agoHave you considered LLVM?
- nakkaya 15y agoNo, I didn't know there was a llvm backend for avr.
- sbt 15y agoCompiling 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.
- pwpwp 15y agoPer Wikipedia, a compiler is "a computer program ... that transforms source code written in a programming language ... into another computer language".