News for hackers. Stuff that matters.
Re:A small scheme VM, compiler, and REPL in 4k by rcarmo on Friday November 26, 2021 @08:08AM (#29349919)
Added to https://taoofmac.com/space/dev/lisp along with a few others, since I'm fascinated by this kind of thing.
Re:A small scheme VM, compiler, and REPL in 4k by feeley on Friday November 26, 2021 @03:51PM (#29353988)
In your list you say "small and portable Scheme implementation with AOT compilation and 4K footprint". However the presence of an AOT compiler is not the most interesting part. The distinguishing feature is that in 4K there is a REPL that uses a dynamic compiler to do the "eval". In other words, the code entered at the REPL runs essentially as fast as if it was compiled by the AOT compiler.
Re:A small scheme VM, compiler, and REPL in 4k by throwaway81523 on Saturday November 27, 2021 @05:31AM (#29359104)
It seems to me (granted I haven't gotten it to work reliably at all yet) that the REPL is somewhat fragile, and I wonder if it might be easier as well as smaller to use a remote (tethered) compiler, as some Forth systems do.

Re the repl, I may have figured out what went wrong with user-defined functions. Instead of saying (define (sq x) (* x x)) I apparently have to say (define sq (lambda (x) (* x x))). Maybe that is documented in the paper, which I still have to read.