bootstrapping from ECHO (SPOILERS)
Dave Long
dave.long at bluewin.ch
Thu Apr 28 13:31:45 EDT 2011
Just ran across someone doing a similar exercise:
http://code.google.com/p/scheme-from-scratch/
For what it's worth, I believe Lisp started life as an abstract
pseudo-code that was hand-assembled, but once someone realized that
eval was also within hackable grasp, an interpreter and subsequent
compiler were not far off.
John McCarthy:
> Steve Russell said, look, why don't I program this eval..., and I
> said to him, ho, ho, you're confusing theory with practice, this
> eval is intended for reading, not for computing. But he went ahead
> and did it. That is, he compiled the eval in my paper into [IBM]
> 704 machine code, fixing bugs, and then advertised this as a Lisp
> interpreter, which it certainly was. So at that point Lisp had
> essentially the form that it has today....
In looking through my rudimentary python-based 8086 assembler, I'd
guess a reasonable forward path might be:
0. hex/octal direct (tape-like) loader
1. (single character) labels, references (many possible
implementations here!)
2. control structures (branches, loops)
3. full (or at least reasonable) length symbol table
It would even be possible to pipeline these steps, but then it might
be useful to substitute (0a) a random-access loader (like SREC or
HEX) to mitigate the two-pass nature of resolving references.
Many tradeoffs in early language implementation were due to the
relatively small and slow machines; I wonder if we would depart from
them now that the available "brute force" space has expanded
significantly?
-Dave
see also:
http://www.gtoal.com/languages/bcpl/amiga/bcpl/booting.txt
More information about the Kragen-discuss
mailing list