Hi all,

Thanks for the responses. I have been reading the docs and using 'vi' (like
a n00b, see below) to navigate the sources. Sounds like a bit more time and
patience is needed on my part :)

I wasn't so much interested in a dump of the generated native ASM; I agree
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))). But it sounds like it
is not, as the PL ASM kicks out generated ASM as soon as the VM is built.
My mental model of things down there is a bit fuzzy yet.

I was not aware I could use Shift-K/Q to hop around so easily. Thanks for
the tip! I had just been calling vi, quitting, calling vi with the next,
quitting... heh. Sounds like this is a better way to chase those cells
around than dump anyway. I'll keep at it.

Many thanks,

On Wednesday, August 26, 2015, John Duncan <duncan.j...@gmail.com> wrote:

> I think, Erik, you should review the PicoLisp Reference about evaluation.
> In PicoLisp, everything is interpreted except primitive functions which are
> either implemented in C (32-bit) or assembly (64-bit). So the source you
> see in the lisp files is the same as what the compiler will execute, except
> that data structures are built and symbols resolved during (read).
> The relevant part of the manual is here:
> http://software-lab.de/doc/ref.html#ev
> John
> On Wed, Aug 26, 2015 at 1:00 AM, Alexander Burger <a...@software-lab.de
> <javascript:_e(%7B%7D,'cvml','a...@software-lab.de');>> wrote:
>> Hi Erik,
>> > I imagine something like CL's 'disassemble' that, given an arbitrary
>> lisp
>> > expression, returns the sequence of VM instructions the expression maps
>> to.
>> To extend a little what Tomas and Andreas said:
>> I think it is not so very useful to look at the generated native ASM
>> code, as it more or less maps 1:1 to the PicoLisp assembly, and the
>> latter is more readable.
>> Still, you can easily disassemble the executable:
>>    $ objdump -S bin/picolisp |view -
>> When looking at the sources with 'vi', e.g. extending Andreas' example
>>    $ pil +
>>    : (vi 'vi)
>> you can navigate by moving the cursor to some identifier and hit Shift-K

Reply via email to