August 2nd, 2024

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 articleLink Icon
Lisp with GC in 436 Bytes

SectorLISP, 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.

Link Icon 6 comments
By @sim7c00 - 7 months
anything on justine.lol makes me feel like a single celled organism. weirdly it feels good. there's so many things in each project, which spirit can be applied to many things. also love the fact always previous projects and code are either used or referenced to explain things. i am only in awe each time something is posted.
By @dang - 7 months
Related:

Show HN: Lisp with GC in 436 Bytes - https://news.ycombinator.com/item?id=29630293 - Dec 2021 (131 comments)

By @anthk - 7 months
Justne.lol would love "The Computational Beauty of Nature". It has a github repo, with references to Mandelbrot, more fractals, atractors, and, of course, a Lisp and building blocks.
By @dloss - 7 months
How small could this be if it was implemented on the SectorLambda VM (a sister project)? http://justine.lol/lambda/
By @IncreasePosts - 7 months
Why does brainfuck not count as a real language?
By @bankcust08385 - 7 months
It uses AT&T syntax. Yuck!