The Lisp 2 Programming Language and System (1966) [pdf]

10 pointsposted 12 hours ago
by susam

2 Comments

throwaway81523

4 hours ago

Cool but this article doesn't discuss the Lisp 2 GC in any detail. It is a clever method, a relocating mark/sweep GC that moves old objects to a "sediment" that it doesn't rescan unless it has to, iirc. I read about it in the Spitbol source code. Spitbol uses the same method and credits it to Lisp-2 and I don't remember seeing it anywhere else, including in Richard Jones' 2006 GC book (I haven't gotten to see the 2023 edition yet). I had been thinking of reimplementing it for ulisp which is a small lisp that originally ran on the Arduino.

hayley-patton

2 hours ago

> I don't remember seeing it anywhere else, including in Richard Jones' 2006 GC book

Lisp-2 is definitely in both editions of the Handbook, on page 39 in the 2023 edition; though you want to compute the address of the next object before relocating an object in relocate(), else you may overwrite the metadata of the current object [1].

[1] http://gchandbook.org/errata.html