Hi, Habr!
In some articles, I noticed that the authors promised to tell about the history of Lisp machines, but they never did. Perhaps this short article will be interesting to fans of the history of IT.
Yes, there were few cars in the world with hardware support for lambda calculus - about 7,000 units in the world as of 1988. And now much less, of course. In fact, Lisp machines played a pretty strong role in the history of information technology. Thanks to these strange computers, the world has received technologies such as laser printing and a multi-window GUI.
')
Prehistory
In the 1930s, some mathematicians tried to understand and analyze the concept of computability. One such attempt was made by Alonzo Church, creating a λ-calculus. I will not write here about him - too big a topic. It is assumed that you at least know this word :).
Calculus is a calculus, but we should apply it. When work began in the field of artificial intelligence, there was a need for a programming language that allowed to adequately solve problems in this area. At this time, John McCarthy worked at MIT and from 1958 to 1963 he developed Lisp, taking IPL as the basis, which was designed to implement AI, which was able to automatically deduce the theorems of mathematical logic. The first version of the Lisp interpreter worked on the IBM 704. In 1960 Lisp was ported to PDP-1. In general, Lisp spread received. There was only one problem - Lisp worked rather slowly on a classic (that is, standard architecture in this context) computer. Before turning to the very history of Lisp machines, it is advisable to examine their architecture superficially.
Theory of Lisp Machines
Take the spherical implementation of a Lisp machine and take a look at it. As we already know, they program it in Lisp. Of course, the processor does not execute Lisp code directly, but the microcode and the stack machine are optimized for code execution. This allowed to work calmly with rational and complex numbers. The OS uses virtual memory to provide a sufficiently large address space, and the garbage collector automatically removes unnecessary items from memory, freeing up space for new things (well, you know for sure, the point is that the garbage collector is still implemented). The architecture of the machine belongs to the tagged arch., I will now briefly explain what it is, since there is very little information about it in Russian.
The tagged (marked?) Architecture assumes that each word in memory contains a so-called label dividing the word into two parts - the first part contains the information itself, the second part describes how it should be interpreted, as well as the CDR code that simplifies the assembly garbage at times. Enough theory, move on to the "gland".
Hardware implementations of λ-calculus
The year 1973 came. In the AI ​​laboratory at the Massachusetts Institute, they seriously thought about creating a computer architecture with hardware support for LISP, since at that time the execution of a LISP program on a standard architecture computer was not for the faint of heart. Typing a single variable could take several minutes, since it runs during the execution of the program, rather than compiling it. The task of creating a "miracle architecture" was assigned to two programmers - Greenblatt and Knight.
The “draft” 24-bit version of the architecture was named after the list construction operator and called CONS. It was for this machine that Knight defended his doctoral thesis. In the future, the architecture of this machine was improved and named CADR (in honor of the lisp function cadr). But one thing is to develop an architecture, and another thing is to create a computer. And here Symbolics, Inc. enters the arena.
Symbolics, Inc.
Symbolics, Inc. It was founded by Russell (Russell Noftsker) in Massachusetts, later it moved to California. The company was engaged in the production of LISP-machines, as well as writing software for them. She was not the only company producing strange computers, except for her, Lisp Machines, Inc. was engaged in the same business, but on the Symbolics side there were more specialists and a desire. By the way, symbolics.com was probably the first Internet domain in the .com zone.
In 1981, this company created the first and last 32-bit CADR architecture machine - CADR LM-2 with 1MB of RAM on board. OS and applications for it were written, oddly enough, on Lisp itself, or more precisely, in its Lisp Machine Lisp dialect. In 1982, the Open Genera operating system was created and Emacs (Zmacs) was ported, it became possible to work on a LISP machine and show the power of the lambda calculus to poor people.
It was in Open Genera and Lisp Machine OS that many tasty buns appeared, such as garbage collectors, virtual memory manager, multi-tasking GUI, debugger, and Chaosnet support.
As a result of the altercations between MIT and Symbolics about licenses (as you already understood, Richard Stallman also visited here), their collaboration ended somewhere around 1983. And Richard, as if nothing had happened, organized his gang of LISP hackers, consisting mainly of MIT-people.
In 1983, Symbolics introduced the first model of a new line of LISP machines - the Symbolics 3600, the size of a home refrigerator based on CADR architecture. Of course, not without innovations. In addition to the “innovative” new design, the machines received hardware support from the garbage collector and virtual memory. The processor became 36-bit, the memory operated with 44 bit words, of which 8 bits were used for error correction (ECC). The architecture of 3600 contained 4096 registers (CISC, hello!), Half of which was used for the call stack, and the other half - by microcode and time-loving programs, as well as drivers (By the way, as far as I know, the concept of a driver was introduced in the process of creating Lisp machines).
The 3600 was built on TTL integrated circuits and had a frequency of about 5 MHz. Not much, but given the hardware support for LISP at that time it was very thick. Chaosnet support has been discontinued; henceforth, Symbolics only supported Ethernet. In just three years, five representatives of the 36xx series — 3600, 3670, 3640, 3675, and 3645 — were released. The subsequent models differed only in the number of megahertz and other numbers; there were no significant changes in the architecture.
Representatives of the 3600 line were very popular in the field of research of artificial intelligence. Incidentally, the 3,600 line machines were able to handle HDTV quality videos, which was the reason for their popularity in Japan.
In 1988, the same company introduced the Ivory line to the world, the first representative of which was the XL400. The same computers were already 40-bit and allowed to address 16GB of memory. The Ivory architecture chips were produced by VLSI and Hewlett Packard, and they were used, besides Symbolics, also by Sun and Apple (yes, the Lisp processor was also used in Macintoshs, though not as the main one).
Let's try to look at the assembly source for Ivory processors:
ENTRY: 2 REQUIRED, 0 OPTIONAL PUSH 0 PUSH FP|3 PUSH NIL BRANCH 15 SET-TO-CDR-PUSH-CAR FP|5 SET-SP-TO-ADDRESS-SAVE-TOS SP|-1 START-CALL FP|2 PUSH FP|6 FINISH-CALL-1-VALUE BRANCH-FALSE 15 INCREMENT FP|4 ENDP FP|5 BRANCH-FALSE 6 SET-SP-TO-ADDRESS SP|-2 RETURN-SINGLE-STACK
Which is equivalent to the following Lisp code:
(defun example-count (predicate list) (let ((count 0)) (dolist (i list count) (when (funcall predicate i) (incf count)))))
Not bad, huh? As you can see, the mnemonics were rather long, it is even difficult to call it an assembler in my usual understanding. If you are interested in the essence of the Ivory assembler and other machines, you can look at the documents at bitsavers.org. There are also many other Symbolics manuals.
It is worth mentioning the company's attempt to create a RISC processor based on Ivory - Sunstone. But the project was abandoned. BBN and Xerox were also attached to the LISP machines. The creation of BBN was the Jericho machine, which was programmed with Inerlisp. This creation has never been sold. Xerox Parc in the 1980s created its Xerox Lisp Machine, which is known for having a full-fledged InterLisp-D development environment and the first Hypertext application (NoteCards).
Known successful attempts to create LISP machines by Japanese engineers, from such machines can be called TAKITAC-7 and EVLIS, developed at the University of Osaka. Unfortunately, I can’t tell anything about them at the moment.
The end
But nothing could stop the ever-increasing power of classic computers. Hardware support for lambda calculus has become unnecessary. Eventually, Symbolics went bankrupt, and by 1995 the era of LISP machines had ended. But we will not forget them, right? :)
In conclusion, I want to say that Lisp machines are not the only attempt to make a computer with hardware support for the X language. There have been implementations of Prolog and Java machines, but about this some other time. Thanks for reading :).
PS If you see an inaccuracy or error, please inform the PM.