A Lisp Interpreter Implemented in Conway's Game of Life
a day ago
- #Conway's Game of Life
- #Programming
- #Lisp
- Lisp in Life is a Lisp interpreter implemented in Conway’s Game of Life, marking the first high-level programming language interpreted in this context.
- Lisp's design allows for flexible programming paradigms, including macros that can introduce object-oriented-like structures.
- Conway’s Game of Life, a Turing-complete cellular automaton, demonstrates complex computation through simple rules.
- The interpreter reads Lisp programs encoded in ASCII within the Game of Life pattern and outputs results at the RAM module's bottom.
- Previous works like Quest For Tetris and APGsembly ran assembly languages, but Lisp in Life is novel for interpreting high-level languages directly.
- The project involves optimizations across layers: C compiler enhancements, memory management in the Lisp interpreter, and architectural improvements in the QFTASM layer.
- VarLife, an 8-state automaton, serves as an intermediate layer for the Game of Life pattern, significantly speeding up simulations.
- The Lisp interpreter supports features like lexical closures and macros, enabling sophisticated programming within memory limits.
- Running times vary between VarLife and Game of Life patterns, with VarLife being faster but Game of Life offering exact emulation via OTCA Metapixels.
- The project includes various Lisp program examples, from simple factorial calculations to complex object-oriented-like structures.