Comment by clx75
I am fascinated by the idea of building something like the Lisp Machines or Smalltalk 80 from scratch. Build a Forth in assembly, build a Lisp in Forth, build an OS and computing environment in Lisp. AOT-compile only the Forth interpreter, load and compile the rest from source during system boot, maybe with later stages optimizing the previous stages as the system is assembling itself.
I imagine two languages - Langsam and Schnell - intertwined in some sort of yin-yang fashion. Langsam is slow, dynamic, interpreted, Schnell is fast, static, compiled. Both would be LISPs. Schnell would be implemented as a library in Langsam. If you said (define (add x y) (+ x y)) in Langsam, you would get a Langsam function. If you said (s:define (add (x int) (y int)) (+ x y)) in Langsam, you would get a Langsam function which is a wrapper over a JIT-compiled Schnell function. If you invoke it, the wrapper takes care of the FFI, execution happens at C speed. Most of the complexity typical of a low-level compiled language could be moved into Langsam. I could have sophisticated type systems and C++ template like code generation implemented in a comfortable high level language.
This latter part I managed to partially implement in Clojure and it works (via LLVM), it would be just too much effort to get it completed.
> Build a Forth in assembly, build a Lisp in Forth
You might already know it, but Dusk OS[1], which is a Forth, has a Lisp implementation[2] which includes a native code compiler for i386, amd64, arm, risc-v and m68k. You might consider it a good starting point for your project.
[1]: http://duskos.org/
[2]: https://git.sr.ht/~vdupras/duskos/tree/master/item/fs/doc/co...