Ur-Scheme: A GPL self-hosting compiler from a subset of Scheme to x86 asm (2008)
9 hours ago
- #Compiler
- #Scheme
- #x86
- Ur-Scheme is a compiler from a subset of R5RS Scheme to Intel x86 assembly for Linux, licensed under GNU GPLv3+.
- It can compile itself and might serve as a base for more practical implementations or be enjoyable to read.
- Ur-Scheme lacks a garbage collector, has unbuffered output, and programs crash when they run out of memory.
- Inspired by Abdulaziz Ghuloum's paper and Marc Feeley's talk on compiler construction.
- The compiler was developed incrementally, focusing on simplicity and avoiding complex optimizations.
- Ur-Scheme outperforms interpreters but is slower than GCC-compiled C code.
- The compiler avoids complex techniques like register allocation and does minimal optimization.
- Future directions include bug fixes, improving output code speed/size, and adding practical features like error reporting and FFI.