From: ·········@hotmail.com
Subject: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191825330.509758.13330@22g2000hsm.googlegroups.com>
I have googled a lot and not found any clear information on how to
"hand compile" a rudimentary LISP interpreter.

John McCarthy, has kept it as secret. He mentions it but gives no
info.

Many years ago I went to an MIT prof on a technique I had become aware
of. Its not McCarthy. When I asked him for his class notes on the
subject to self-study, first he stared at me as if I was some kind of
thief. Then as we were coming down to the first floor of the high
voltage lab, I asked him why didnt he publish it? He said, and these
are exact words: "you can make us as much guilty as you want, but we
did not publish it."

A while ago I found that L. Peter Deutsch, who has published a LISP
implementation for PDP-1. He said, I wrote it when I was ___ years
old. (and the age was very young, i forget exactly, maybe 12 maybe
13 ....). Then I asked about his first initial standing for what? He
said he hates his first name. He had nothing to tell me about the
thought process of writing the implementation.

Anyway, there is not a single book, or a document that walks you
through the process of writing a meta-circular definition and then
hand compiling it. I might say, it is still a secret known to a few.

It would be the method of bootstrapping from a hand-wrapped
microcontroller or computer to a basic working environment where you
continually and extensibly bootstrap up, to other applications
including an operating system.

The most primitive operating system would be an interpreter in a ROM.
That would be the core of a solid CS education.

Can anyone help?
gnuist

From: Tim Bradshaw
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191837500.086439.148690@g4g2000hsf.googlegroups.com>
On Oct 8, 7:35 am, ·········@hotmail.com wrote:
> I have googled a lot and not found any clear information on how to
> "hand compile" a rudimentary LISP interpreter.
>

I suspect you're a troll, but here's an answer.

You have a language L which you want to implement on a machine M
(whose instruction set you know).  You don't have any high-level
language which targets M (or you wouldn't be doing this).

Write (on paper) a compiler for L which targets M.  You can write it
in any language, but for simplicity we'll say you are writing it in
L.  Call this compiler C.

Now: you know the syntax and semantics of L, and you have the source
of C, written in L.  So you can now, manually, run through what C
would do to its own source, and write down the output it would produce
from it.  Call this CM1: it is a bunch of machine code for M.

In particular CM1 is a program which, when run on M, is a compiler for
L (it's the binary for C in fact).

So, run CM1 on M, giving it as input the source of C.  This will
produce more output, CM2.  CM2 should be the same as CM1: if it's not
you've made a mistake.

After doing this check, you can now use CM1 (or CM2) as a compiler for
L which runs on M.  Given that C was probably very simplistic and
incomplete (since you were intending to run it manually you want it to
be simple, and you probably also did not bother to implement stuff you
didn't need to have for compiling C), your first use of CM1 is
probably to compile successively more complex versions of C, producing
programs CMn which can, in turn, compile themselves.

Note that this is pretty much exactly the stages that are gone through
to cross-compile a compiler for a new machine, although you would in
this case not manually run it but use some existing target machine.

--tim
From: Rob Warnock
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <Ur2dnWoHAqTFU5fanZ2dnUVZ_r-vnZ2d@speakeasy.net>
Tim Bradshaw  <··········@tfeb.org> wrote:
+---------------
| On Oct 8, 7:35 am, ·········@hotmail.com wrote:
| > I have googled a lot and not found any clear information on how to
| > "hand compile" a rudimentary LISP interpreter.
...
| You have a language L which you want to implement on a machine M...
| Write (on paper) a compiler for L which targets M.  You can write it
| in any language, but for simplicity we'll say you are writing it in
| L.  Call this compiler C.
| 
| Now: you know the syntax and semantics of L, and you have the source
| of C, written in L.  So you can now, manually, run through what C
| would do to its own source, and write down the output it would produce
| from it.  Call this CM1: it is a bunch of machine code for M.
| 
| In particular CM1 is a program which, when run on M, is a compiler for
| L (it's the binary for C in fact).
| 
| So, run CM1 on M, giving it as input the source of C.  This will
| produce more output, CM2.  CM2 should be the same as CM1: if it's not
| you've made a mistake.
+---------------

A longer description of the general methodology Tim is describing --
along with an elegant series of "T diagrams" showing most clearly what
is input, what is output, what is the translator from input to output,
and what the translator is running on -- can be found in this classic
text:

    http://www.cs.toronto.edu/XPL/
    "The XPL Programming Language"
    William M. McKeeman, James J. Horning, and David B. Wortman
    ISBN 13-155077-2 (Prentice Hall, March 1971)

Amazon has used copies for from $4-$40, a steal for a 527 page
hardcover. [Note that the front & back endpapers of the original
hardback are covered with the above-mentioned "T diagrams".]

Yes, it's an obsolete language[1], but the principles still hold.

The following lovely standalone tutorial on T diagrams may help one
follow Tim's textual explication above:

    http://proglang.informatik.uni-freiburg.de/teaching/compilerbau/2004/T-diagrams.pdf

Another tutorial, using ASCII art [also see Figure 2.12 near the
bottom of that page]:

    http://www.scifac.ru.ac.za/compilers/cha02s.htm#C02-1
    2.1 T-diagrams


-Rob

[1] Perhaps with the exception of it (still?) being used to
    compile NASA's "Hal/S" language for the Space Shuttle,
    see <http://www.cs.toronto.edu/XPL/hal.html>.

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Bakul Shah
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <470adc25$0$79946$742ec2ed@news.sonic.net>
Rob Warnock wrote:
> Tim Bradshaw  <··········@tfeb.org> wrote:
> +---------------
> | On Oct 8, 7:35 am, ·········@hotmail.com wrote:
> | > I have googled a lot and not found any clear information on how to
> | > "hand compile" a rudimentary LISP interpreter.
> ...
> | You have a language L which you want to implement on a machine M...
> | Write (on paper) a compiler for L which targets M.  You can write it
> | in any language, but for simplicity we'll say you are writing it in
> | L.  Call this compiler C.
	...
> A longer description of the general methodology Tim is describing --
> along with an elegant series of "T diagrams" showing most clearly what
> is input, what is output, what is the translator from input to output,
> and what the translator is running on -- can be found in this classic
> text.

I don't think he wants a general methodology.  He wants
something very specific though not sure what exactly!
Elsewhere he mentions L. Peter Deutsch's lisp interpreter
written in pdp-1 assembler.  It can be found at
http://simh.trailing-edge.com/kits/lispswre.zip and
supposedly runs on the simh simulator.  lisp.mac is only
about 2000 lines of assembly code and seems readable.
May be that is what he wants?
From: ·········@hotmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191902517.438596.59540@o3g2000hsb.googlegroups.com>
On Oct 8, 6:40 pm, Bakul Shah <······@bitblocks.com> wrote:
> Rob Warnock wrote:
> > Tim Bradshaw  <··········@tfeb.org> wrote:
> > +---------------
> > | On Oct 8, 7:35 am, ·········@hotmail.com wrote:
> > | > I have googled a lot and not found any clear information on how to
> > | > "hand compile" a rudimentary LISP interpreter.
> > ...
> > | You have a language L which you want to implement on a machine M...
> > | Write (on paper) a compiler for L which targets M.  You can write it
> > | in any language, but for simplicity we'll say you are writing it in
> > | L.  Call this compiler C.
>         ...
> > A longer description of the general methodology Tim is describing --
> > along with an elegant series of "T diagrams" showing most clearly what
> > is input, what is output, what is the translator from input to output,
> > and what the translator is running on -- can be found in this classic
> > text.
>
> I don't think he wants a general methodology.  He wants
> something very specific though not sure what exactly!
> Elsewhere he mentions L. Peter Deutsch's lisp interpreter
> written in pdp-1 assembler.  It can be found athttp://simh.trailing-edge.com/kits/lispswre.zipand
> supposedly runs on the simh simulator.  lisp.mac is only
> about 2000 lines of assembly code and seems readable.
> May be that is what he wants?

Thank you everyone for replying.
after reading and understanding jmc.pdf a few years ago, I resumed the
study on finding the book by the Quiennec to whom I am grateful. I had
the book by L. Peter Deutsch a few years ago also as well as some code
running on emulator, which I never tried. For eg my first post on
nested lambda arose from page ??? on Quiennec's book. To understand
LPD's code you have to know pdp-1 code and i was not enthusiastic
about it.

Most of my questions have not been answered, although you have tried
with links to videos and sites. I may need to work on them. But they
have also opened new questions. For example, the video opens right
away with closures and continuations. None of my lisp book talk about
these. Seems that Continuations did not exist in lisp. The
transformation for closures is also interesting as is lambda lifting.
I will therefore generate new threads to tackle those questions while
leaving this in suspended state, but you are welcome to add anything
to it.

Perhaps, the best would be for you to send me private email of a
properly formatted document to explain a point. you can send me
a download link, or paste the link on newsgroup.

my hotmail is known to you, and i will give a more permanant gmail
later. Even you can upload an ebook with explanation baloon comments
in pdf for conferencing.
From: ·········@gmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191904570.771938.284580@19g2000hsx.googlegroups.com>
On Oct 8, 9:01 pm, ·········@hotmail.com wrote:
> On Oct 8, 6:40 pm, Bakul Shah <······@bitblocks.com> wrote:
>
>
>
> > Rob Warnock wrote:
> > > Tim Bradshaw  <··········@tfeb.org> wrote:
> > > +---------------
> > > | On Oct 8, 7:35 am, ·········@hotmail.com wrote:
> > > | > I have googled a lot and not found any clear information on how to
> > > | > "hand compile" a rudimentary LISP interpreter.
> > > ...
> > > | You have a language L which you want to implement on a machine M...
> > > | Write (on paper) a compiler for L which targets M.  You can write it
> > > | in any language, but for simplicity we'll say you are writing it in
> > > | L.  Call this compiler C.
> >         ...
> > > A longer description of the general methodology Tim is describing --
> > > along with an elegant series of "T diagrams" showing most clearly what
> > > is input, what is output, what is the translator from input to output,
> > > and what the translator is running on -- can be found in this classic
> > > text.
>
> > I don't think he wants a general methodology.  He wants
> > something very specific though not sure what exactly!
> > Elsewhere he mentions L. Peter Deutsch's lisp interpreter
> > written in pdp-1 assembler.  It can be found athttp://simh.trailing-edge.com/kits/lispswre.zipand
> > supposedly runs on the simh simulator.  lisp.mac is only
> > about 2000 lines of assembly code and seems readable.
> > May be that is what he wants?
>
> Thank you everyone for replying.
> after reading and understanding jmc.pdf a few years ago, I resumed the
> study on finding the book by the Quiennec to whom I am grateful. I had
> the book by L. Peter Deutsch a few years ago also as well as some code
> running on emulator, which I never tried. For eg my first post on
> nested lambda arose from page ??? on Quiennec's book. To understand
> LPD's code you have to know pdp-1 code and i was not enthusiastic
> about it.
>
> Most of my questions have not been answered, although you have tried
> with links to videos and sites. I may need to work on them. But they
> have also opened new questions. For example, the video opens right
> away with closures and continuations. None of my lisp book talk about
> these. Seems that Continuations did not exist in lisp. The
> transformation for closures is also interesting as is lambda lifting.
> I will therefore generate new threads to tackle those questions while
> leaving this in suspended state, but you are welcome to add anything
> to it.
>
> Perhaps, the best would be for you to send me private email of a
> properly formatted document to explain a point. you can send me
> a download link, or paste the link on newsgroup.
>
> my hotmail is known to you, and i will give a more permanant gmail
> later. Even you can upload an ebook with explanation baloon comments
> in pdf for conferencing.

Here is a more permanant gmail now. plz use that to send links
for download.

And on the MIT prof in high voltage lab, just a clarification of
misunderstanding: that guy was not remotely related to programming. We
are talking of high voltage engineering. They were hiding some
safety ideas so more people could ... and they get to make money.
From: C Y
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191841869.013636.237680@19g2000hsx.googlegroups.com>
On Oct 8, 2:35 am, ·········@hotmail.com wrote:
> I have googled a lot and not found any clear information on how to
> "hand compile" a rudimentary LISP interpreter.

It's probably not precisely what you're looking for,
but some of the replies to this thread may be useful
starting points:

http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/4fb1f733293f9d71/

Really, Tim's response pretty much covers it.

For further educational purposes this is an
interesting place to poke around:

http://www.softwarepreservation.org/projects/LISP/
From: William D Clinger
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191852119.211747.104070@v3g2000hsg.googlegroups.com>
C Y wrote:
> For further educational purposes this is an
> interesting place to poke around:
>
> http://www.softwarepreservation.org/projects/LISP/

Thanks for the link!  It happens to link to the paper
I wrote about the compiler I hand-simulated on itself,
but that paper doesn't say much about the bootstrapping
process itself.

A Young Lady's Illustrated Primer contains a pretty
good account of the bootstrapping process.  That
book is not in print, but Neal Stephenson's The
Diamond Age contains extended excerpts.

Will
From: ·········@hotmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191870680.630255.17650@o3g2000hsb.googlegroups.com>
On Oct 8, 4:11 am, C Y <···········@yahoo.com> wrote:
> On Oct 8, 2:35 am, ·········@hotmail.com wrote:
>
> > I have googled a lot and not found any clear information on how to
> > "hand compile" a rudimentary LISP interpreter.
>
> It's probably not precisely what you're looking for,
> but some of the replies to this thread may be useful
> starting points:
>
> http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/4f...
>
> Really, Tim's response pretty much covers it.
>
> For further educational purposes this is an
> interesting place to poke around:
>
> http://www.softwarepreservation.org/projects/LISP/

CY, thanks for the reply. But I dont think his reply covers it.
A two liner cannot cover it. I give you a wire wrapped simple
microprocessor system with EPROM or even a PC. Assume no limit.
I want you to bootstrap up to an interpreter, forget the OS for
a moment. I am talking of pure bootstrap process.

L Peter Deutsch, at the age of 12-15 wrote a 16 page of pdp-1
assembly lisp interpreter under the guidance of some professor there
when his father worked at MIT in cambridge.

A mean MIT professor told me in HIGH VOLTAGE LAB on Mass Ave : "You
can make as us much guilty as you want, but we did not publish it"

I want answer in this format:

(1)
lisp interpreter in lisp as in jmc.pdf or micro manual

(2)
conversion of that plan into assembly pseudo-code with explanation in
english (absolutely no use of C compiler)
because this will involve how to implement cons cells, car, cdr etc.
memory allocation, garbage collection etc.

(3)
Finally, working assembly code that closely resembles the pseudo code.
Dont say its trivia or something like that. I also dont want to go to
forth or any other language like that.
From: Ray Dillinger
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <470aa818$0$79926$742ec2ed@news.sonic.net>
·········@hotmail.com wrote:

> A mean MIT professor told me in HIGH VOLTAGE LAB on Mass Ave : "You
> can make as us much guilty as you want, but we did not publish it"

If they had tried, the journal (pretty much any CS journal)
would have rejected the article.  Remember, this is before
a whole lot of high-level languages existed.  People were
accustomed to writing stuff in machine code, or, when they
were lucky, in an assembly language.  People were also accustomed
to "hand executing" their code to try to detect bugs during the
hours they usually had to wait for access to very few computers.

Any journal would have rejected the article on the grounds
that the technique was (at the time) common knowledge.  While
it's no longer exactly common knowledge, it's still very simple.

> I want answer in this format:

You're unlikely to find an answer in that exact format; Very
few people would care to do that much dreary, tedious, boring
work for you.

Seriously though, if you would like to do this:  Get the book
_Lisp_In_Small_Pieces_ by Christian Quenniec (whose name I hope
I have spelled correctly).  It contains a very simple compiler
for a subset of a simple lisp once called Scheme.  You will
need to gather all the bits scattered across about fifty pages
of text.

What is implemented in that compiler is essentially the calling
discipline: lexical scope, argument passing, evaluation, lambda
implementation, continuation support, etc.  You'll need to add
data representation code for numbers, characters, etc, as well
as code for simple "no-brainer" functions like addition and
multiplication.

And that compiler emits bytecode.  You can handle this by either
writing a bytecode interpreter in any language you care to (assembly
would not be a strange choice) or by replacing each bytecode output
by a machine-code sequence (there are a lot of them, but each one
is pretty easy to map to machine code once you've decided on your
data representation).

Once you've finished all this not-terribly interesting tedium,
you will have a compiler for a simple lisp, written in that same
simple dialect of lisp.

Now reach for a stack of typing paper.  Write the words "GLOBAL
ENVIRONMENT" across the top of the first page.  Put that page on
the table in front of you.  Write your source code on another
page, marked "INPUT".  Now, Go.

    Each and every read operation:  return the next character from
    INPUT and cross that character off INPUT.

    Each and every variable declaration: write the variable and
    its value on the paper in front of you.

    Each and every variable reference:  If you see the variable name
    on the current page, use that value.  Otherwise dig down through
    the stack until you find a page with the named variable, note its
    value, replace the stack, and write the value into the current
    expression.

    Each and every "call" expression: If it's simple (like addition
    or something) you may want to just write down the result (we call
    these "primitives").  Otherwise, put a new sheet of paper on the
    stack and write down the parameters of the function with the
    values of the actual arguments they were passed, then continue
    in the code for that function.

    Each and every function return: take a sheet of paper off the
    stack and insert the value returned into the current spot in
    whatever primitive expression you're building on the page below.

    If a value is large, or shared between two (or more) variables
    or parts of the substructures of two or more variables, you will
    want to use additional sheets for a "store" and just write
    "store page 41" or similar for the value (this is what we call
    a "pointer").  From time to time, you may want to "garbage collect"
    in order to keep your store under, say, ten thousand pages.  You
    can do "mark and sweep" manually with looseleaf binders and a
    highlighter.

    Each and every side effecting operation:  Dig down through the
    stack to find the binding as for a variable reference, and modify
    the value on that page as required by the side effect.

    Note, this procedure as described won't preserve the semantics
    of call/cc.  But it's perfectly possible to write a compiler
    that implements call/cc without requiring it for its own operation,
    so you can use this method to "hand compile" a compiler that
    "machine compiles" code using call/cc.  Alternatively, you can
    just work out what call/cc means in this paradigm and do that
    manually too.  It means saving pages when functions return, as
    long as a continuation captured on a higher page in the stack
    is held as a value in a variable on a lower page in the stack.
    If that continuation is invoked, you add pages back up to the
    level where the continuation was captured.  Alternatively, if a
    continuation captured low in the stack is invoked while higher
    in the stack, you get to throw away pages out to the level of the
    continuation.



You'll use up a lot of paper.  But eventually, you should find yourself
writing on the bottom (GLOBAL ENVIRONMENT) page a value (or the page
number of the store page containing a value) which is the complete
machine code that implements this compiler.  Alternatively, you may
find yourself writing it, one character at a time, on a sheet of paper
marked "OUTPUT" as you simulate the program's write operations: I forget.

There's nothing particularly clever about this:  You're just using
sheets of paper instead of silicon media for storage and your own
poor organic brain as a CPU.  It's dreary, tedious, and boring, but
not particularly hard.  There is no secret about it: it's just not
worth publishing.

					Bear
From: Terence
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191882742.652895.73330@y42g2000hsy.googlegroups.com>
I concur that looking at the EXAMPLE of Fortth is a good place to
start.
Ita origin in control units for Astronomical telescopes absolutely
required a bootstrap system.
It occurred to me too on first reading the request.
The whoil point is, the OP wants to bootstrap his system.
The concept of atomic operations which are then used to biuld simple
"molecules" and further re-usable tested units is very important. I am
further reminded of the early CP/M bootstrapping.
From: Rob Warnock
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <V-GdnW2RH4MGQ5fanZ2dnUVZWhednZ2d@speakeasy.net>
Ray Dillinger  <····@sonic.net> wrote:
+---------------
| Seriously though, if you would like to do this:  Get the book
| _Lisp_In_Small_Pieces_ by Christian Quenniec (whose name I hope
| I have spelled correctly).
+---------------

Close, but not quite. Move the "i" just to the left of the "n"s
and you get the correct spelling: Queinnec.

+---------------
| It contains a very simple compiler for a subset of a simple lisp
| once called Scheme.  You will need to gather all the bits scattered
| across about fifty pages of text.
+---------------

It's actually much easier than that! He has a tarball of the source
from the book available here:

    http://www-spi.lip6.fr/~queinnec/WWW/LiSP.html
    http://www-spi.lip6.fr/~queinnec/Books/LiSP-2ndEdition-2006Dec11.tgz


-Rob

p.s. I *STRONGLY* recommend this book for anyone who intends to
set out on the path of writing a Lisp or Scheme implementation...

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Ray Dillinger
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <470bc2c5$0$79877$742ec2ed@news.sonic.net>
Rob Warnock wrote:
> Ray Dillinger  <····@sonic.net> wrote:

> +---------------
> | It contains a very simple compiler for a subset of a simple lisp
> | once called Scheme.  You will need to gather all the bits scattered
> | across about fifty pages of text.
> +---------------
> 
> It's actually much easier than that! He has a tarball of the source
> from the book available here:
> 
>     http://www-spi.lip6.fr/~queinnec/WWW/LiSP.html
>     http://www-spi.lip6.fr/~queinnec/Books/LiSP-2ndEdition-2006Dec11.tgz

Well, okay, but nobody who's willing to hand-execute a compiler on
its own source ought to even blink at the relatively minor effort
of gathering the bits and typing them in.

				Bear
From: Doug Quale
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <87fy0l8ivn.fsf@shiva.mad.wi.charter.com>
·········@hotmail.com writes:

> L Peter Deutsch, at the age of 12-15 wrote a 16 page of pdp-1
> assembly lisp interpreter under the guidance of some professor there
> when his father worked at MIT in cambridge.

I last looked at it over 20 years and I don't have the book in
front of me, but you might find material in this book helpful:

Author:            Berkeley, Edmund Callis, ed.

Title:             The programming language LISP; its operation and
                      applications. Editors: Edmund C. Berkeley and Daniel G.
                      Bobrow.

Publisher:         Cambridge, Mass., M.I.T. Press [1966]

Description:       ix, 382 p. illus. 21 cm.

Notes:             Prepared under Contract SD-162 issued by the Advanced
                      Research Projects Agency, Dept. of Defense, to
                      Information International, inc.
                   Includes bibliographies.

OCLC:              (OCoLC)00854512

Subjects:          LISP (Computer program language)

Other:             Bobrow, Daniel Gureasko, joint ed.
                   Information International, Inc.

--
Doug Quale
From: ·········@hotmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191875199.880821.291160@d55g2000hsg.googlegroups.com>
Doug Quale, I have the book in my hand. I am the one who pointed out
its value and existence in this thread. In fact my googling showed
very little reference to it in newsgroups. Those who know hide like
snakes (e.g. "you can make us as much guilty as you want, but we did
not publish it."). But its still is not clear. That is why I am asking
what I am asking. You are a little behind me in this regard. I am
looking for someone who is a little ahead. Who can give us his written
tutorial on the subject in this format which will be useful. I dont
want to get on another wild goose chase of forth and such to get
there. Translation of jmc.pdf like
definition into very close assembly pseudocode and then into very
close running assembly to verify that it really works first,
before bothering to read the pseudo code. It takes a lot of effort
to read these codes by yourself for old-timers like me.

On Oct 8, 1:13 pm, Doug Quale <······@charter.net> wrote:
> ·········@hotmail.com writes:
> > L Peter Deutsch, at the age of 12-15 wrote a 16 page of pdp-1
> > assembly lisp interpreter under the guidance of some professor there
> > when his father worked at MIT in cambridge.
>
> I last looked at it over 20 years and I don't have the book in
> front of me, but you might find material in this book helpful:
>
> Author:            Berkeley, Edmund Callis, ed.
>
> Title:             The programming language LISP; its operation and
>                       applications. Editors: Edmund C. Berkeley and Daniel G.
>                       Bobrow.
>
> Publisher:         Cambridge, Mass., M.I.T. Press [1966]
>
> Description:       ix, 382 p. illus. 21 cm.
>
> Notes:             Prepared under Contract SD-162 issued by the Advanced
>                       Research Projects Agency, Dept. of Defense, to
>                       Information International, inc.
>                    Includes bibliographies.
>
> OCLC:              (OCoLC)00854512
>
> Subjects:          LISP (Computer program language)
>
> Other:             Bobrow, Daniel Gureasko, joint ed.
>                    Information International, Inc.
>
> --
> Doug Quale
From: Ingo Menger
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191922814.965919.44900@57g2000hsv.googlegroups.com>
On 8 Okt., 21:11, ·········@hotmail.com wrote:

> I want answer in this format:

Yes, Sir!!!
We will hurry to fulfill your orders!!!
From: C Y
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191926406.641424.67410@v3g2000hsg.googlegroups.com>
On Oct 8, 3:11 pm, ·········@hotmail.com wrote:

> CY, thanks for the reply. But I dont think his reply covers it.
> A two liner cannot cover it. I give you a wire wrapped simple
> microprocessor system with EPROM or even a PC. Assume no limit.
> I want you to bootstrap up to an interpreter, forget the OS for
> a moment. I am talking of pure bootstrap process.

That sounds like something similar to what I asked in my original
question in the Bootstrap thread.

> L Peter Deutsch, at the age of 12-15 wrote a 16 page of pdp-1
> assembly lisp interpreter under the guidance of some professor there
> when his father worked at MIT in cambridge.
>
> A mean MIT professor told me in HIGH VOLTAGE LAB on Mass Ave : "You
> can make as us much guilty as you want, but we did not publish it"

Probably because it was the least interesting part of the process, at
that time and place.

> I want answer in this format:
>
> (1)
> lisp interpreter in lisp as in jmc.pdf or micro manual
>
> (2)
> conversion of that plan into assembly pseudo-code with explanation in
> english (absolutely no use of C compiler)
> because this will involve how to implement cons cells, car, cdr etc.
> memory allocation, garbage collection etc.
>
> (3)
> Finally, working assembly code that closely resembles the pseudo code.
> Dont say its trivia or something like that. I also dont want to go to
> forth or any other language like that.

Defining Lisp primitives in machine/assembly level code is probably
not something you're going to find much additional material on, at a
guess.  It's not trivia but the reason people mention Forth is that in
the environment you describe the primary goal (or at least the common
goal) is to get to higher level functionality as fast as possible,
with the least amount of work possible.  Lisp -> assembly code
probably is not the optimal path by either metric (particularly given
the functionality that a Lisp needs nowadays to be considered useful),
although I don't know how possible it is to predict that without
making the attempt.  Unfortunately I haven't been able to get my hands
on the Lisp in Forth papers as yet so I don't know what that looked
like.

Also, that sort of low level work by hand is usually undertaken only
when absolutely necessary, and I would guess that programming at that
machine level directly by a human being with something like Lisp just
doesn't happen very much.  I don't know of any Lisp effort beyond
those first ones that wouldn't have taken advantage of available high
level compilers as opposed to doing their own assembly conversion by
hand - weren't even the CADR lisp machines bootstrapped from other
machines?  Plus, after the invention of Forth and similar languages
even a from-scratch effort might have begun with something that has a
very simple and well understood bootstrap routine, and built from
that.

I understand what you're asking for, I think - I originally asked
about something similar.  It would be interesting but there are
reasons finding such a beast in the wild is unlikely.  Doing it
wouldn't be impossible of course, but anybody actually doing it is
almost as unlikely unless there's a use case I'm not considering.

Cheers,
CY
From: Jens Axel Søgaard
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <4709d1b5$0$48050$edfadb0f@dread12.news.tele.dk>
·········@hotmail.com wrote:
> I have googled a lot and not found any clear information on how to
> "hand compile" a rudimentary LISP interpreter.

> Can anyone help?

First write the source of an interpreter SI.
Then borrow the source of a compiler SC.
Normally you'd run an executable version C of the
compiler on SI to get an executable version I of
the interpreter.

Hand compiling means you don't have C - all you have
is SC. So what you do is to follow the SC and emulate
what would happen if you ran C on SI.

Having a simple SC is of course preferable.

-- 
Jens Axel S�gaard
From: ·········@hotmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191827374.434315.265340@o3g2000hsb.googlegroups.com>
On Oct 7, 11:44 pm, Jens Axel S�gaard <······@soegaard.net> wrote:
> ·········@hotmail.com wrote:
> > I have googled a lot and not found any clear information on how to
> > "hand compile" a rudimentary LISP interpreter.
> > Can anyone help?
>
> First write the source of an interpreter SI.
> Then borrow the source of a compiler SC.
> Normally you'd run an executable version C of the
> compiler on SI to get an executable version I of
> the interpreter.
>
> Hand compiling means you don't have C - all you have
> is SC. So what you do is to follow the SC and emulate
> what would happen if you ran C on SI.
>
> Having a simple SC is of course preferable.
>
> --
> Jens Axel S�gaard

Thanks for your reply

You may want to be clear about SI and SC.
what language is source interpreter written in?
what language is source compiler written in?

I would actually prefer that there was no environment
available like no C compiler.

All the processes would have to be created.
Plz note that I am neither a CS nor a logician.

McCarthy did his BS from Caltech and Phd from Princeton
in CLASSICAL mathematics. He may have learnt a bit of computability
and logic at Princeton. But he was not a CS.

Also L Peter Deutsch was a high school kid.

You guys and gals must keep this in mind.

I prefer detailed treatment of this subject that is actually useful.

Again thanks for your reply.
From: William D Clinger
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191833715.697193.140870@y42g2000hsy.googlegroups.com>
The gnuist wrote:
> Many years ago I went to an MIT prof on a technique I had become aware
> of. Its not McCarthy. When I asked him for his class notes on the
> subject to self-study, first he stared at me as if I was some kind of
> thief. Then as we were coming down to the first floor of the high
> voltage lab, I asked him why didnt he publish it? He said, and these
> are exact words: "you can make us as much guilty as you want, but we
> did not publish it."

An MIT prof who is not fluent in English and is also not
McCarthy?  That narrows it down.

> You may want to be clear about SI and SC.
> what language is source interpreter written in?
> what language is source compiler written in?

It doesn't matter.

> I would actually prefer that there was no environment
> available like no C compiler.

That doesn't matter either.

> All the processes would have to be created.
> Plz note that I am neither a CS nor a logician.

Nor does that.

> I prefer detailed treatment of this subject that is actually useful.

It would be hard to improve upon the advice that Jens gave
you.  I will add this:  If you don't have a compiler SC for
the language in which SI is written, then you have to write
SC before you hand-simulate it (or execute it, if you happen
to have a compiler for the language in which SC is written).

I will also add this:  If SC is written in the same language
as SI, then hand-simulating SC on SC itself gives you an
executable compiler, which you can then use to compile SI.

Been there, done that.

Will
From: ·········@hotmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191835450.086301.76450@22g2000hsm.googlegroups.com>
What do the acronyms SI and SC stand for ?

Are you explaining me or refreshing your own memory?
The two activities require a different level of clarity
of statement. In the latter you have a dictionary of
facts known to you. In the former, I dont have that
dictionary of your experience.

On Oct 8, 1:55 am, William D Clinger <········@yahoo.com> wrote:
> The gnuist wrote:
> > Many years ago I went to an MIT prof on a technique I had become aware
> > of. Its not McCarthy. When I asked him for his class notes on the
> > subject to self-study, first he stared at me as if I was some kind of
> > thief. Then as we were coming down to the first floor of the high
> > voltage lab, I asked him why didnt he publish it? He said, and these
> > are exact words: "you can make us as much guilty as you want, but we
> > did not publish it."
>
> An MIT prof who is not fluent in English and is also not
> McCarthy?  That narrows it down.
>
> > You may want to be clear about SI and SC.
> > what language is source interpreter written in?
> > what language is source compiler written in?
>
> It doesn't matter.
>
> > I would actually prefer that there was no environment
> > available like no C compiler.
>
> That doesn't matter either.
>
> > All the processes would have to be created.
> > Plz note that I am neither a CS nor a logician.
>
> Nor does that.
>
> > I prefer detailed treatment of this subject that is actually useful.
>
> It would be hard to improve upon the advice that Jens gave
> you.  I will add this:  If you don't have a compiler SC for
> the language in which SI is written, then you have to write
> SC before you hand-simulate it (or execute it, if you happen
> to have a compiler for the language in which SC is written).
>
> I will also add this:  If SC is written in the same language
> as SI, then hand-simulating SC on SC itself gives you an
> executable compiler, which you can then use to compile SI.
>
> Been there, done that.

At what age ?
From: Jens Axel Søgaard
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <470a3fd9$0$69268$edfadb0f@dread12.news.tele.dk>
·········@hotmail.com wrote:
> What do the acronyms SI and SC stand for ?

SI = source of the interpreter
SC = source of the compiler

-- 
Jens Axel S�gaard
From: ········@india.com
Subject: WARNING ABOUT ROGUE OPERATORS Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191868224.392133.272010@d55g2000hsg.googlegroups.com>
This William D Clinger is a YANK MOTHER F*CKER, a 911 controlled
demolition operator group member or a ROGUE bastard in FBI whose
job and RACIST tendency is to CONTROL FREEDOM of information.
These MOTHERF*CKERS using fake accounts use "FULL LONG NAMES"
to FOOL simple and honest people that they are some genuine
people. They have multiple accounts and their sole job is to
derail conversations on the threads where there is exchange of
knowledge. That is their FULL TIME JOB. They use ebooks from
where they cut and paste to look they have multiple specialities
but this could be even 3 bastards working full time daily with
150 nicks and accounts all automated.

Please look at my articles on google. just click my profile on
groups.google.com to find out the potent truth I have written.

I am sure you have seen that video of a student being tasered
in University of Florida because these bastards hate our freedoms.

These are corporatist bastards whose whole goal is to keep the
public ignorant. THESE MOTHERFUCKERS hid the anthrax mailer who
was really one of them. THE FBI Bastards never caught the anthrax
mailer based in the USA>

On Oct 8, 1:55 am, William D Clinger <········@yahoo.com> wrote:
> The gnuist wrote:
> > Many years ago I went to an MIT prof on a technique I had become aware
> > of. Its not McCarthy. When I asked him for his class notes on the
> > subject to self-study, first he stared at me as if I was some kind of
> > thief. Then as we were coming down to the first floor of the high
> > voltage lab, I asked him why didnt he publish it? He said, and these
> > are exact words: "you can make us as much guilty as you want, but we
> > did not publish it."
>
> An MIT prof who is not fluent in English and is also not
> McCarthy?  That narrows it down.
>
> > You may want to be clear about SI and SC.
> > what language is source interpreter written in?
> > what language is source compiler written in?
>
> It doesn't matter.
>
> > I would actually prefer that there was no environment
> > available like no C compiler.
>
> That doesn't matter either.
>
> > All the processes would have to be created.
> > Plz note that I am neither a CS nor a logician.
>
> Nor does that.
>
> > I prefer detailed treatment of this subject that is actually useful.
>
> It would be hard to improve upon the advice that Jens gave
> you.  I will add this:  If you don't have a compiler SC for
> the language in which SI is written, then you have to write
> SC before you hand-simulate it (or execute it, if you happen
> to have a compiler for the language in which SC is written).
>
> I will also add this:  If SC is written in the same language
> as SI, then hand-simulating SC on SC itself gives you an
> executable compiler, which you can then use to compile SI.
>
> Been there, done that.
>
> Will
From: ········@india.com
Subject: Re: WARNING ABOUT ROGUE OPERATORS Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191870386.017981.56870@y42g2000hsy.googlegroups.com>
If you sheeple are ignorant of what I say, look at this link:
and the papers therein.

911blogger.com
st911.org
stj911.org

(1) Why did FBI bastards not catch the ANTHRAX mailer?
(2) Why did building 7 commit suicide?
(3) Where is the Pentagon video, of the plane hitting it ?

On Oct 8, 11:30 am, ········@india.com wrote:
> This William D Clinger is a YANK MOTHER F*CKER, a 911 controlled
> demolition operator group member or a ROGUE bastard in FBI whose
> job and RACIST tendency is to CONTROL FREEDOM of information.
> These MOTHERF*CKERS using fake accounts use "FULL LONG NAMES"
> to FOOL simple and honest people that they are some genuine
> people. They have multiple accounts and their sole job is to
> derail conversations on the threads where there is exchange of
> knowledge. That is their FULL TIME JOB. They use ebooks from
> where they cut and paste to look they have multiple specialities
> but this could be even 3 bastards working full time daily with
> 150 nicks and accounts all automated.
>
> Please look at my articles on google. just click my profile on
> groups.google.com to find out the potent truth I have written.
>
> I am sure you have seen that video of a student being tasered
> in University of Florida because these bastards hate our freedoms.
>
> These are corporatist bastards whose whole goal is to keep the
> public ignorant. THESE MOTHERFUCKERS hid the anthrax mailer who
> was really one of them. THE FBI Bastards never caught the anthrax
> mailer based in the USA>
>
> On Oct 8, 1:55 am, William D Clinger <········@yahoo.com> wrote:
>
>
>
> > The gnuist wrote:
> > > Many years ago I went to an MIT prof on a technique I had become aware
> > > of. Its not McCarthy. When I asked him for his class notes on the
> > > subject to self-study, first he stared at me as if I was some kind of
> > > thief. Then as we were coming down to the first floor of the high
> > > voltage lab, I asked him why didnt he publish it? He said, and these
> > > are exact words: "you can make us as much guilty as you want, but we
> > > did not publish it."
>
> > An MIT prof who is not fluent in English and is also not
> > McCarthy?  That narrows it down.
>
> > > You may want to be clear about SI and SC.
> > > what language is source interpreter written in?
> > > what language is source compiler written in?
>
> > It doesn't matter.
>
> > > I would actually prefer that there was no environment
> > > available like no C compiler.
>
> > That doesn't matter either.
>
> > > All the processes would have to be created.
> > > Plz note that I am neither a CS nor a logician.
>
> > Nor does that.
>
> > > I prefer detailed treatment of this subject that is actually useful.
>
> > It would be hard to improve upon the advice that Jens gave
> > you.  I will add this:  If you don't have a compiler SC for
> > the language in which SI is written, then you have to write
> > SC before you hand-simulate it (or execute it, if you happen
> > to have a compiler for the language in which SC is written).
>
> > I will also add this:  If SC is written in the same language
> > as SI, then hand-simulating SC on SC itself gives you an
> > executable compiler, which you can then use to compile SI.
>
> > Been there, done that.
>
> > Will- Hide quoted text -
>
> - Show quoted text -
From: Tony Garnock-Jones
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <9IednSg4XasAkJfanZ2dneKdnZydnZ2d@eclipse.net.uk>
·········@hotmail.com wrote:
> I prefer detailed treatment of this subject that is actually useful.

I suspect you'll enjoy http://www.annexia.org/forth, which is an 
extremely well written step-by-step essay, at the end of which you have 
produced, in assembly language, from scratch, a running FORTH system for 
i386/linux.

Once you understand that, the steps required to retarget to a running 
Scheme system are few: the design of an object model for scheme objects; 
the design and implementation of a simple garbage collector; a few more 
primitives; and you're done.

Tony
From: ·········@hotmail.com
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191876071.828746.33880@r29g2000hsg.googlegroups.com>
On Oct 8, 3:59 am, Tony Garnock-Jones
<·······················@google.easily> wrote:
> ·········@hotmail.com wrote:
> > I prefer detailed treatment of this subject that is actually useful.
>
> I suspect you'll enjoyhttp://www.annexia.org/forth, which is an
> extremely well written step-by-step essay, at the end of which you have
> produced, in assembly language, from scratch, a running FORTH system for
> i386/linux.
>
> Once you understand that, the steps required to retarget to a running
> Scheme system are few: the design of an object model for scheme objects;
> the design and implementation of a simple garbage collector; a few more
> primitives; and you're done.

Tony, thanks for the info. But why do I need to go to forth for
this? why cant someone show me how to hand compile the jmc.pdf
into an assembly code like L. Peter Deutsch, a 13-15 year old
kid wrote and PUBLISHED as the first author, making money from
the ARPA grant because his father worked in the area and he
had the connections to get the info from the place where it was
discovered. I suspect they thought that the kid is safer and
less competitive than some grown up to share the info.
From: Tony Garnock-Jones
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <Co-dnRKoB9K-A5fanZ2dnUVZ8s2mnZ2d@eclipse.net.uk>
Hi,

·········@hotmail.com wrote:
> Tony, thanks for the info. But why do I need to go to forth for
> this?

It's not that you need to go to FORTH - it's that the techniques so 
lucidly explained by Richard Jones in his essay 
(http://www.annexia.org/_file/jonesforth.s.txt) generalise with *very* 
few modifications to implementing Scheme. I encourage you to read the 
essay. I believe that if you do so, you will start to see the 
relationship between the very low level and the very high level that you 
are interested in.

You will need not very much more assembly to build (the kernel of) a 
Scheme than to build (the kernel of) a FORTH.

Regards,
   Tony
From: Kaz Kylheku
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191928919.613844.289430@d55g2000hsg.googlegroups.com>
On Oct 8, 1:41 pm, ·········@hotmail.com wrote:
> Tony, thanks for the info. But why do I need to go to forth for
> this? why cant someone show me how to hand compile the jmc.pdf
> into an assembly code like L. Peter Deutsch, a 13-15 year old
> kid wrote and PUBLISHED as the first author, making money from
> the ARPA grant because his father worked in the area and he
> had the connections to get the info from the place where it was
> discovered. I suspect they thought that the kid is safer and
> less competitive than some grown up to share the info.

Your question is not unlike that of that young man who, be it truth or
legend, wrote to composer Wolfgang A. Mozart, asking for advice about
how to get started in writing symphonies. Mozart replied that a
symphony is a complex musical form, and that one should start by
writing simpler works and work his way up over years. The man
objected, "But Herr Mozart, you were already writing symphonies when
you were eight years old!" To which Mozart replied, "Indeed, but I
didn't have to ask how."

Like young Mozart, Peter Deutsch probably didn't have to ask how. He
may have had access to equipment and people through his father, but
ultimately he did the grunt work of taking a high level program as a
specification of behavior, and writing the corresponding assembly
program.
From: Jens Axel Søgaard
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <470a4055$0$69268$edfadb0f@dread12.news.tele.dk>
·········@hotmail.com wrote:

> You may want to be clear about SI and SC.
> what language is source interpreter written in?
> what language is source compiler written in?

As long as the source language of the compiler
is the same as the language the interpreter is
written in, it doesn't matter.

> I would actually prefer that there was no environment
> available like no C compiler.

C is just short for "a compiler".

-- 
Jens Axel S�gaard
From: Paul Rubin
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <7x3awll3zf.fsf@ruckus.brouhaha.com>
·········@hotmail.com writes:
> Anyway, there is not a single book, or a document that walks you
> through the process of writing a meta-circular definition and then
> hand compiling it. I might say, it is still a secret known to a few.

http://mitpress.mit.edu/sicp
From: Rob Warnock
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <v_KdnZXEKOimdZfanZ2dnUVZ_vamnZ2d@speakeasy.net>
Paul Rubin  <·············@NOSPAM.invalid> wrote:
+---------------
| ·········@hotmail.com writes:
| > Anyway, there is not a single book, or a document that walks you
| > through the process of writing a meta-circular definition and then
| > hand compiling it. I might say, it is still a secret known to a few.
| 
| http://mitpress.mit.edu/sicp
+---------------

Or Steele and Sussman's earlier "Lambda Papers":

    http://library.readscheme.org/page1.html

especially:

    http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-453.pdf
    "The Art of the Interpreter
     or, the Modularity Complex (Parts Zero, One, and Two)"
    Guy Lewis Steele, Jr. and Gerald Jay Sussman
    Abstract:
    We examine the effects of various language design decisions on
    the programming styles available to a user of the language, with
    particular emphasis on the ability to incrementally construct
    modular systems. At each step we exhibit an interactive meta-circular
    interpreter for the language under consideration. Each new interpreter
    is the result of an incremental change to a previous interpreter.
    ...
    A subset of these interpreters constitute a partial historical
    reconstruction of the actual evaluation of LISP.


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Matthias Buelow
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <5muo10Ff6lgfU1@mid.dfncis.de>
·········@hotmail.com wrote:
> I have googled a lot and not found any clear information on how to
> "hand compile" a rudimentary LISP interpreter.
> 
> John McCarthy, has kept it as secret. He mentions it but gives no
> info.

Probably because McCarthy, being a good theoretician, knows that it's
meaningless in practice.

If you want to implement Lisp/C/whatever on a machine where it doesn't
already exist, you typically use a) a cross-compiler on a different
machine (this is the preferred method) or b) write a rudimentary
implementation in a different language that already exists on the host
(if need be, assembler).
"Hand-compiling" is a (rather boring) theoretical exercise but not an
efficient technique for bootstrapping a new language.
From: Slobodan Blazeski
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <1191876197.516638.171910@19g2000hsx.googlegroups.com>
On Oct 8, 8:35 am, ·········@hotmail.com wrote:
> I have googled a lot and not found any clear information on how to
> "hand compile" a rudimentary LISP interpreter.
>
> John McCarthy, has kept it as secret. He mentions it but gives no
> info.
>
> Many years ago I went to an MIT prof on a technique I had become aware
> of. Its not McCarthy. When I asked him for his class notes on the
> subject to self-study, first he stared at me as if I was some kind of
> thief. Then as we were coming down to the first floor of the high
> voltage lab, I asked him why didnt he publish it? He said, and these
> are exact words: "you can make us as much guilty as you want, but we
> did not publish it."
>
> A while ago I found that L. Peter Deutsch, who has published a LISP
> implementation for PDP-1. He said, I wrote it when I was ___ years
> old. (and the age was very young, i forget exactly, maybe 12 maybe
> 13 ....). Then I asked about his first initial standing for what? He
> said he hates his first name. He had nothing to tell me about the
> thought process of writing the implementation.
>
> Anyway, there is not a single book, or a document that walks you
> through the process of writing a meta-circular definition and then
> hand compiling it. I might say, it is still a secret known to a few.
>
> It would be the method of bootstrapping from a hand-wrapped
> microcontroller or computer to a basic working environment where you
> continually and extensibly bootstrap up, to other applications
> including an operating system.
>
> The most primitive operating system would be an interpreter in a ROM.
> That would be the core of a solid CS education.
>
> Can anyone help?
> gnuist

I'm not sure what are you asking or asking why do you need it but this
might be interesthing :
http://www.iro.umontreal.ca/~boucherd/mslug/meetings/20041020/minutes-en.html
The 90 Minute Scheme to C compiler - Marc Feeley
Marc , creator of Gambit, gives a very nice introduction how to write
a simple Scheme to C compiler, in Scheme. In only 90 minutes! And
although not supporting the whole Scheme standard, the compiler
supports fully optimized proper tail calls, continuations, and (of
course) full closures. The compiler is implemented using two important
compilation techniques for functional languages: closure conversion
and CPS-conversion.

cheers
Slobodan
From: Paul Rubin
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <7xr6k4csm3.fsf@ruckus.brouhaha.com>
·········@hotmail.com writes:
> I have googled a lot and not found any clear information on how to
> "hand compile" a rudimentary LISP interpreter.
> 
> John McCarthy, has kept it as secret. He mentions it but gives no
> info.

I guess I don't understand what you're asking.  Normally in those
days, one did not "hand compile" code in the sense of taking code
written in a higher level language and translating it to assembler.
One instead wrote the assembly code directly, maybe starting with
some algorithm sketches or flow charts written on paper (flow charts
were the pre-HLL HLL).  

> Many years ago I went to an MIT prof on a technique I had become aware
> of. Its not McCarthy. When I asked him for his class notes on the
> subject to self-study, first he stared at me as if I was some kind of
> thief. Then as we were coming down to the first floor of the high
> voltage lab, I asked him why didnt he publish it? He said, and these
> are exact words: "you can make us as much guilty as you want, but we
> did not publish it."

This is just bizarre, there are no secrets.

> A while ago I found that L. Peter Deutsch, who has published a LISP
> implementation for PDP-1. He said, I wrote it when I was ___ years
> old. (and the age was very young, i forget exactly, maybe 12 maybe
> 13 ....). Then I asked about his first initial standing for what? He
> said he hates his first name. He had nothing to tell me about the
> thought process of writing the implementation.

Peter's first name is well known and he must have thought your
questions were pretty weird.

> Anyway, there is not a single book, or a document that walks you
> through the process of writing a meta-circular definition and then
> hand compiling it. I might say, it is still a secret known to a few.

You should read SICP, and also write some smaller programs in assembly
language just to get the hang of it, before writing something as
complex as a language interpreter.

> It would be the method of bootstrapping from a hand-wrapped
> microcontroller or computer to a basic working environment where you
> continually and extensibly bootstrap up, to other applications
> including an operating system.

I think these days you'd use cross compilers etc.
From: Raffael Cavallaro
Subject: Re: The secret of hand compiling LISP/Scheme
Date: 
Message-ID: <2007100912413177923-raffaelcavallaro@pasdespamsilvousplaitmaccom>
On 2007-10-08 02:35:30 -0400, ·········@hotmail.com said:

> John McCarthy, has kept it as secret. He mentions it but gives no
> info.

The secret of hand compiling lisp is to rub some Comcast High-Speed 
btween your palms before you start.