We are slowly moving on replacing this stuff with implementations written in pure julia.
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.
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?
the interesting design choice here is prioritizing robustness over minimalism. most tiny lisps cut corners on error handling and GC to hit a small line count, which makes them great demos but terrible for embedding in real systems. femtolisps approach of being small AND robust enough to use as julias actual parser for years is a much harder target to hit.
the fact that its still under 10k lines of C after all this time while supporting a real type system, proper tail calls, and a copying GC is impressive. for comparison, lua - often cited as the gold standard for embeddable languages - is around 30k lines.
Interesting! This seems superficially related to GNU Mes[1], although I imagine femtolisp does not require its small source to be written in a "simple" dialect of C.
Fun fact, Julia's parser and part of its compiler are implemented in femtolisp, and you can access it using a not so secret option in the Julia CLI.
We are slowly moving on replacing this stuff with implementations written in pure julia.
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.
So Julia will no longer be a LISP? :'(
3 replies →
Recently, some 9front developers have picked up femtolisp, and are hacking it into something for their own use. https://sr.ht/~ft/StreetLISP/
I believe its adoption was motivated by needing to write/generate an OTF parser.
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?
Would SectorLISP (https://justine.lol/sectorlisp2/) count? It can run the LISP 1.5 metacircular evaluator.
This is pretty small.
http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html
Is Bel a smaller LISP than what's described in The Roots of Lisp? [1]
[1] https://paulgraham.com/rootsoflisp.html
Boot sector lisp?
https://github.com/jart/sectorlisp
Check Zenlisp and Kilo Lisp under http://t3x.org
Not the smallest, but a great example on how a Lisp can be reimplemented.
Also, http://www.t3x.org/lisp64k/index.html
the interesting design choice here is prioritizing robustness over minimalism. most tiny lisps cut corners on error handling and GC to hit a small line count, which makes them great demos but terrible for embedding in real systems. femtolisps approach of being small AND robust enough to use as julias actual parser for years is a much harder target to hit.
the fact that its still under 10k lines of C after all this time while supporting a real type system, proper tail calls, and a copying GC is impressive. for comparison, lua - often cited as the gold standard for embeddable languages - is around 30k lines.
Interesting! This seems superficially related to GNU Mes[1], although I imagine femtolisp does not require its small source to be written in a "simple" dialect of C.
[1]: https://www.gnu.org/software/mes/
[dead]