Oooooooh. Ok, that clarifies things. I've got some homework tonight then.
Time to read the PL ref again with all of this in mind!

Thanks Alex.

On Wed, Aug 26, 2015 at 1:49 PM, Alexander Burger <a...@software-lab.de>
wrote:

> Hi Erik,
>
> > that wouldn't be very useful. Though it's good to know it can be done. I
> > was more curious if a dump of the PiocLisp ASM was possible, say for a
> > top-level REPL call (e.g. '(mapc println (1 2 3))).
>
> Ah, that is the misunderstanding!
>
> An expression like (mapc println (1 2 3)) involves absolutely no such
> code at all. In fact, this *IS* the code.
>
> That's why some people call Lisp a high-level assembly language.
>
> Lisp-code like (mapc println (1 2 3)) is directly interpreted. This
> sequence of parentheses and characters like 'm', 'a', 'p' etc. are just
> a representation of the internal s-epr structure. The reader converts it
> to
>
>    +-----+-----+     +-----+-----+     +-----+-----+
>    |  |  |  ---+---> |  |  |  ---+---> |  |  |  /  |
>    +--+--+-----+     +--+--+-----+     +--+--+-----+
>       |                 |                 |
>       V                 V                 V
>     mapc             println           +-----+-----+     +-----+-----+
>  +-----+-----+
>                                        |  1  |  ---+---> |  2  |  ---+--->
> |  3  |  /  |
>                                        +-----+-----+     +-----+-----+
>  +-----+-----+
>
> and, when printed, it shows up as "(mapc println (1 2 3))" again. The
> tokens 'mapc' and 'println' here denote references to the cell
> structures of those symbols.
>
> These are the internal pointer structures, and there is nothing else
> below them. No assembly code to be disassembled. 'print'ing the above
> structure *IS* the disassembly.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to