Lisp with GC in 436 Bytes
SectorLISP, a compact programming language with garbage collection, fits in a 436-byte boot sector, surpassing FORTH and BASIC. It runs on 1981 PC models and emphasizes file size optimization.
Read original articleSectorLISP, a high-level programming language, has achieved a significant milestone by incorporating garbage collection within a compact 436-byte implementation that fits into the 512-byte boot sector of a floppy disk. This development marks it as the smallest programming language, surpassing FORTH and BASIC. Comprising 223 lines of assembly, SectorLISP allows users to create their own LISP interpreter in just 40 lines of code and is compatible with PC models from 1981 with a minimum of 64KB RAM. The project emphasizes file size optimization, resulting in a system capable of running complex tasks, including a proof assistant from LISP 1.5. Recent updates have streamlined the assembly code, enabling the addition of a 40-byte garbage collector. The software can be emulated using tools like Blinkenlights or QEMU, and a JavaScript version is available for browser use. The implementation features a unique memory model that distinguishes between atoms and cons cells, facilitating efficient data structure management. SectorLISP has been confirmed to run on original IBM PC hardware, showcasing its historical significance. The project not only serves as a technical achievement but also as a playful exploration of programming language design, drawing parallels to games in its approach to minimalism and functionality. The ongoing development includes enhancements to user experience and error handling, making it more accessible for developers.
Related
Some Tricks from the Scrapscript Compiler
The Scrapscript compiler implements optimization tricks like immediate objects, small strings, and variants for better performance. It introduces immediate variants and const heap to enhance efficiency without complexity, seeking suggestions for future improvements.
"Maxwell's equations of software" examined
Ken Shirriff's blog post analyzes a historic Lisp code snippet, showcasing Lisp's core principles. It highlights code-data interchangeability and the essence of Lisp programming, referencing Alan Kay's "Maxwell's Equations of Software."
Bril: An Intermediate Language for Teaching Compilers
Adrian Sampson developed Bril, an educational intermediate language for teaching compilers, emphasizing simplicity and extensibility, allowing students to learn algorithms without complex industrial APIs.
Bril: An Intermediate Language for Teaching Compilers
Adrian Sampson developed Bril, an educational intermediate language for teaching compilers, emphasizing simplicity and extensibility, while prioritizing learning over performance metrics, despite some design challenges.
Efficient Execution of Structured Language Model Programs
SGLang is a new system for executing complex language model programs, featuring a frontend language and runtime optimizations. It offers significant throughput improvements and is publicly available for further exploration.
Show HN: Lisp with GC in 436 Bytes - https://news.ycombinator.com/item?id=29630293 - Dec 2021 (131 comments)
Related
Some Tricks from the Scrapscript Compiler
The Scrapscript compiler implements optimization tricks like immediate objects, small strings, and variants for better performance. It introduces immediate variants and const heap to enhance efficiency without complexity, seeking suggestions for future improvements.
"Maxwell's equations of software" examined
Ken Shirriff's blog post analyzes a historic Lisp code snippet, showcasing Lisp's core principles. It highlights code-data interchangeability and the essence of Lisp programming, referencing Alan Kay's "Maxwell's Equations of Software."
Bril: An Intermediate Language for Teaching Compilers
Adrian Sampson developed Bril, an educational intermediate language for teaching compilers, emphasizing simplicity and extensibility, allowing students to learn algorithms without complex industrial APIs.
Bril: An Intermediate Language for Teaching Compilers
Adrian Sampson developed Bril, an educational intermediate language for teaching compilers, emphasizing simplicity and extensibility, while prioritizing learning over performance metrics, despite some design challenges.
Efficient Execution of Structured Language Model Programs
SGLang is a new system for executing complex language model programs, featuring a frontend language and runtime optimizations. It offers significant throughput improvements and is publicly available for further exploration.