femtolisp: A lightweight, robust, scheme-like Lisp implementation
114 points by tosh 12 hours ago | 14 comments
embedding-shape 7 hours ago
Slightly unrelated, but you take what (hn item) you can get: What is the smallest lisp (semantically/language-wise) people know, that could be used for implementing itself? Theoretical or practical/"real" is less relevant, mostly just curious. So far, it seems Bel (by pg) might get the closest, but can't claim to be an expert, surely could be something smaller out there?
replypmcgoron 6 hours ago
Would SectorLISP (https://justine.lol/sectorlisp2/) count? It can run the LISP 1.5 metacircular evaluator.
replysoegaard 5 hours ago
This is pretty small.
replyhttp://scheme.dk/blog/2006/12/self-evaluating-evaluator.html
anthk 6 hours ago
Check Zenlisp and Kilo Lisp under http://t3x.org
replyNot the smallest, but a great example on how a Lisp can be reimplemented.
Currently the femtolisp parser is only used during bootstrapping the core systems so that we can parse the pure-julia parser and then we switch over to the julia parser. The same process is now happening with the femtolisp implementation of the lowering pass.
Not ready to share just yet but nearly at the point that there are no Julia-syntax fallbacks in the entire base/stdlib and a femtolisp parser for the sexp syntax is able to build a complete Julia sysimage from the transpiled files. Already verified that I can transpile the .jl source of the Julia package for the syntax into the syntax, then use that transpiler to transpile again and load into the running sexp repl, then use that transpiler on the source again and get byte identical code, and along the way am testing to ensure that the entire Julia test suite passes in the sysimage being built.
So, with any luck here soon I'll have a sexp syntax for Julia that builds from raw transpiled sexp-syntax source and uses sexp syntax natively in the repl but can transpile & load any Julia code. Fingers crossed.
I'm aware of --lisp but it's not very good imo lol.