Re:A small Scheme implementation with AOT and incremental co...
by throwaway81523 on Sunday November 28, 2021 @06:44PM
(#29374522)
It doesn't compile to C, it compiles on the fly to VM code, and there are implementations of the VM in C, Python, Scheme, and JS. Otherwise the REPL would have to invoke a C compiler. Note that while the code footprint (size of the compiled VM) is only around 4k, the ram usage is much higher. They use a heap size of 200k though smaller would probably still work.
It's portable, but it contains a compiler? For any architecture?
> Currently Ribbit supports the target languages C, JavaScript, Python and Scheme
Aha. So it compiles to another language, and relies on that for portably compiling to a target architecture. Actually pretty sensible!
Well, apart from the last option. Using Scheme to compile this Scheme implementation, written in Scheme, to a Scheme program which you can run on another Scheme implementation is surely just Scheme with extra steps.
Anyway, how does the incremental compiler work with the C target?