In Which Language was the first Lisp developed in?

Discussion of Common Lisp
Post Reply
bush_00797
Posts: 1
Joined: Fri Apr 22, 2016 9:21 am

In Which Language was the first Lisp developed in?

Post by bush_00797 » Fri Apr 22, 2016 9:38 am

I recently saw in wikipedia that Lisp appeared around 1958 and C language appeared around 1972.
I am curious to know in which language was the first Lisp developed in.

edgar-rft
Posts: 226
Joined: Fri Aug 06, 2010 6:34 am
Location: Germany

Re: In Which Language was the first Lisp developed in?

Post by edgar-rft » Sat Apr 23, 2016 12:50 am

The first working Lisp interpreter was implemented by Steve Russell in assembly language on an IBM 704 computer. Strange Lisp function names like CAR and CDR are still the original names of the assembly macros of that machine.

The story of the very early Lisp years can be found in the History of Lisp, written by John McCarthy in 1979.

Many other old and new Lisp documents can be found in the archive of the Software Preservation Group.

- edgar

frobenius
Posts: 1
Joined: Wed Jun 01, 2016 2:43 pm
Location: Evergreen, Colorado USA
Contact:

Re: In Which Language was the first Lisp developed in?

Post by frobenius » Wed Jun 01, 2016 4:24 pm

The classic Lisp function names CAR and CDR came from "Contents of the Address Part of Register" and "Contents of the Decrement Part of Register" respectively - IBM terms back in the day.

Lisp 1.5 was first implemented on the IBM 704/709/7090 mainframe computers by McCarthy et. al. starting in 1957.

Imagine, if you will, Lisp running inside an enormous pile of several thousand hot vacuum tubes drawing up to 250KW of power. The 704 and 709 were vacuum tube machines. This was, of course, more than half a century ago when computers were measured in fractions of an acre and you literally walked through them. The 7090 moved to discrete transistors.

All of the machines in the 704-7090 IBM series were 36 bit and the architecture defined the "Address Field" (bits 21-35 numbered from the left) and the "Decrement Field" (bits 3-17) of instruction words with each being 15-bits in width. Machine instructions existed that manipulated/moved those fields to/from the accumulator in single instructions.

The machines all had 32K 36-bit words of memory. Yes: 32,768 words. That's it! These were the supercomputers of the late 1950's/early 1960's and they cost $20-million+ in 2016 dollars :)

Those two 15-bit fields very nicely each held a 15-bit pointer that could reach anywhere in memory. Thus, a single 36-bit word could conveniently hold a full CONS cell with six bits left over for GC marking, tag bits, etc. Life was good.

McCarthy naturally thought of the left pointer as the CAR (Contents of the Address Part) and the right pointer as the CDR (Contents of the Decrement) and that transferred to the names of the Lisp functions CAR/CDR as he scribbled the design on paper and worked out the elementary functions in 704 assembly.

The Lisp 1.5 interpreter was written in straight assembler code and used no macros at all.

The machine instructions PAX ("Place Address in Index Register") and PDX ("Place Decrement in Index Register") were most frequently used to implement the CAR and CDR operations.

Over the last sixty years, occasional attempts have been made to replace CAR/CDR with ugly somethings like FIRST/REST etc, but that never happened because people liked the names and quickly began to think in those terms and also CAR/CDR enabled tricks of the trade such as CDDADADR and the like. There was simply never a compelling reason to make the change - and it rapidly became tradition.

I have programmed Lisp for just over 45 years now - started on the UNIVAC 1108 - and it just would not be the same without CAR/CDR :)

Post Reply