T3X.ORG lisp64k/index

the place “in 64K bytes” shall imply 64K bytes for the LISP system, the
runtime stack, and the cons pool! This is the quantity of house your
LISP system would get on a fundamental DEC PDP-11 or in a tiny-model PCDOS
program. It might be rather less house than the primary
implementations of LISP might use.
The IBM 704 digital information processing machine at M.I.T., on which
LISP was first applied in 1960, had 32K phrases of 36-bit core
reminiscence, [1] which on this case actually means one tiny
ferrite ring
per bit. So there was a complete of 36×32768=1,183,608 tiny little
toroids housed in a not so tiny metal body. The 704 required a
relatively spacious room with bolstered flooring and industrial air
conditioning. The complete weight of a typical set up was round
10 metric tons.
The LISP system itself occupied 12K phrases of core and one phrase would
maintain an entire cons cell, [1] so the machine supplied slightly
lower than 20K cells of house to LISP. But then, the IBM 704 on the M.I.T.
was fairly a well-equipped machine. Many 704 installations included
as little as 8K phrases and even 4K phrases of reminiscence [2] — too
little to run a LISP system. Here is a LISP 1.0 pattern program from
[1]:
DEFINE (( (SUBST (LAMBDA (X Y Z) (COND ((ATOM Z) (COND ((EQ Y Z) X) (T Z))) (T (CONS (SUBST X Y (CAR Z)) (SUBST X Y (CDR Z))))))) )) ()
Note that packages have been normally typed on as few traces as attainable,
as a result of they needed to be punched to punched playing cards or typed in at a
teletype which echoed its enter on paper. The operator (DEFINE),
the arguments (in double parentheses within the case of DEFINE), and
an atmosphere needed to be equipped to the LISP system in three
separate expressions.
There have been smaller computer systems operating LISP, although. In 1964 there
was PDP-1 LISP, which was an implementation for DEC’s PDP-1 laptop
and it ran on programs with as little as 4096 phrases of 18-bit storage,
the place the system itself used round 2000 phrases. [3] Even on the
PDP-1 a cons cell would slot in a single phrase, so some 2000 cells
have been obtainable to the system. Here is a PDP-1 LISP pattern program
from [3] — sure, PDP-1 LISP used decrease case:
(rplacd (quote r1) (quote (expr (lambda (m l) (cond ((null l) m)
(t (r1 (cons (automotive l) m) (cdr l))))))))
(rplacd (quote reverse) (quote (expr (lambda (l) (r1 nil l)))))
The LISP system that will probably be used within the following is
Kilo LISP,
which is a transportable implementation written in ANSI C (C89) that may
compile to a tiny mannequin PCDOS executable that runs in 64K bytes of
reminiscence. The LISP system itself occupies about 13K bytes, leaving
sufficient house for 8192 cons cells, the place every cell allocates 5 bytes
(16 bits automotive, 16 bits cdr, and three bits tag, the latter rounded up
to eight bits). Here is a pattern program:
(setq assoc
(lambda (x a)
(cond ((null a) nil)
((eq x (caar a)) (automotive a))
(else (assoc x (cdr a))))))
The Kilo LISP system presents lower than half as many cons cells as a
huge IBM 704 set up and about 4 occasions the house of a minimal
PDP-1. Of course, historic computer systems have been gradual: the IBM 704 had a
clock pace of 40kHz (0.04 MIPS) and the PDP-1 operated at 150kHz
(0.15 MIPS), however then the LISP programs on these machines have been
fastidiously hand-crafted meeting language packages and their {hardware}
would usually execute one instruction per clock cycle.
Today you’ll be able to in all probability emulate an IBM 704 and a PDP-1 on an inexpensive
smartphone, each operating at a a number of of the pace of the unique
{hardware}, whereas enjoying your favourite jump-and-run recreation. So whereas
a 704 or a PDP-1 might in all probability run all the following instance
packages, they would definitely take their time. The remainder of this
essay will think about the reminiscence facet and ignore run occasions.
Here is a first impression of what historic LISP appears like.
