<iogrt>
Hello, first of all. thanks for being a part of picolisp, it combines a bunch of ideas I love. I'm playing a lot with external symbols and with pilog
<iogrt>
that said. I'm finding this very odd:
<iogrt>
? {20}
<iogrt>
-> NIL
<iogrt>
? (show '{20})
<iogrt>
{20} ((name) (put *DB name ..))
<iogrt>
-> {20}
<iogrt>
? {20}
<iogrt>
-> ((name) (put *DB name (new T)))
<iogrt>
how come {20} is only defined after I show it?
<abu[7]>
This is because just 'eval'ling a symbol does not fetch it. Only access functions do that
<abu[7]>
Reason is efficiency
<abu[7]>
eval should be very fast
<iogrt>
Hi abu, so how could I fetch the symbol, eval it?
<abu[7]>
(val '{sym})
<abu[7]>
Usually this is never necessary
<abu[7]>
because external syms are never accessed by name
<iogrt>
hmm, then when is it necessary?
<iogrt>
I see. Well that's how I was intending on using them
<abu[7]>
Yeah
<abu[7]>
Usually we don't know the sym by namem
<abu[7]>
name
<iogrt>
I was planning on storing functions in a database and just have function calls be done by reference
<iogrt>
reference being the external sym
<abu[7]>
ok, good
<iogrt>
but that doesn't seem possible right? having (de myfun () ({20} ...)) would be unreliable. I'd need always to val it
<abu[7]>
(de myfun () A(... get symbol) ...
<abu[7]>
(de myfun () ((... get symbol) ...
<iogrt>
yeah. At that point might aswell load the functions from the database and assign them to actual symbols