HN
Today

LISPy things you can do in 64K bytes of core (2019)

This article delves into the nostalgic world of LISP, exploring what's achievable within a mere 64K of memory. It draws fascinating parallels between modern tiny LISP implementations and their pioneering ancestors on resource-constrained machines like the IBM 704 and PDP-1. The piece celebrates ingenious design under severe limitations, a timeless hacker fascination.

12
Score
1
Comments
#11
Highest Rank
8h
on Front Page
First Seen
Oct 27, 12:00 AM
Last Seen
Oct 27, 7:00 AM
Rank Over Time
1611121215222723

The Lowdown

The article "LISPy things you can do in 64K bytes of core" explores the feasibility and historical context of running LISP systems within extremely limited memory environments. It defines "64K bytes" as the total allocation for the LISP system, runtime stack, and cons pool, a constraint reminiscent of early computing.

  • Historical Context (IBM 704): LISP's first implementation in 1960 on the IBM 704, which had 32K 36-bit words, used 12K words for the system, offering about 20K cons cells. This required a massive machine, with some 704 installations having even less memory, insufficient for LISP.
  • Early Programming Style: Due to input methods like punched cards, LISP programs were typed as concisely as possible, often on single lines.
  • PDP-1 LISP (1964): A smaller implementation for the DEC PDP-1 ran on systems with as little as 4096 18-bit words, with the system occupying ~2000 words and providing ~2000 cons cells.
  • Modern Kilo LISP: The article introduces Kilo LISP, a portable ANSI C (C89) implementation designed to run in 64K bytes. The system itself uses about 13K bytes, leaving space for 8192 cons cells, with each cell consuming 5 bytes.
  • Memory Comparison: Kilo LISP offers less than half the cons cells of a large IBM 704 setup but about four times the space of a minimal PDP-1 LISP.
  • Performance vs. Memory: While ancient machines like the 704 (40kHz) and PDP-1 (150kHz) were slow, they executed instructions efficiently. The article emphasizes memory constraints over runtime, acknowledging that modern devices can easily emulate these systems at far greater speeds.

Ultimately, the piece offers a compelling look at the enduring ingenuity required to make powerful programming paradigms like LISP function effectively within truly challenging hardware limitations, highlighting a rich history of efficient software design.