[HN Gopher] femtolisp: A lightweight, robust, scheme-like Lisp i...
       ___________________________________________________________________
        
       femtolisp: A lightweight, robust, scheme-like Lisp implementation
        
       Author : tosh
       Score  : 107 points
       Date   : 2026-02-23 12:38 UTC (10 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | borodi wrote:
       | 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.
        
         | eigenspace wrote:
         | 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.
        
           | tokai wrote:
           | So Julia will no longer be a LISP? :'(
        
             | eigenspace wrote:
             | Having some components written in lisp was never the lispy
             | part of julia. The thing that makes julia lispy is its
             | semantics and features.
        
               | tokai wrote:
               | I agree. Was trying a tongue in cheek comment about how
               | the Julia/LISP discussion over the years often would have
               | someone point to _julia --lisp_ as an argument for Julia
               | being a LISP dialect.
        
             | joshjob42 wrote:
             | My night and weekend project the last month or so has been
             | creating and implementing a package that provides a pure
             | s-exp syntax for Julia that lowers to Julia's AST directly,
             | and lately been churning through (mostly Opus is doing the
             | actual churning) all the problems of creating an automatic
             | transpiler for Julia to this other syntax.
             | 
             | 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.
        
         | markkitti wrote:
         | $ julia --lisp         ;  _         ; |_ _ _ |_ _ |  . _ _
         | ; | (-||||_(_)|__|_)|_)         ;-------------------|-----
         | ------------------------------    -----------------------
         | > (+ 1 2)         3
        
       | danlitt wrote:
       | 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/
        
       | embedding-shape wrote:
       | 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?
        
         | aportnoy wrote:
         | Is Bel a smaller LISP than what's described in The Roots of
         | Lisp? [1]
         | 
         | [1] https://paulgraham.com/rootsoflisp.html
        
         | pmcgoron wrote:
         | Would SectorLISP (https://justine.lol/sectorlisp2/) count? It
         | can run the LISP 1.5 metacircular evaluator.
        
         | anthk wrote:
         | 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
        
         | naasking wrote:
         | Boot sector lisp?
         | 
         | https://github.com/jart/sectorlisp
        
         | soegaard wrote:
         | This is pretty small.
         | 
         | http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html
        
       ___________________________________________________________________
       (page generated 2026-02-23 23:00 UTC)