beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
bjorkintosh has quit [Ping timeout: 276 seconds]
bjorkintosh has joined #picolisp
<abu[7]> aw-: Yes, the mailing list was changed in Apr 23 because too often people did not receive the mails
<abu[7]> Sender is now the list iirc
rob_w has joined #picolisp
geri has joined #picolisp
<geri> hey-hey
<geri> i wrote a big chunk of the core for my lisp in C, but it's basically a walking memory leak :D
<geri> and i wrote one in forth too!
<geri> and i got a question - symbols are looked up in some sort of tree - how is lookup done in it?
<geri> tree like (eval 'pico)
<abu[7]> Hi gerFrom u0_a16 Thu Jun 13 16:50:51 2024
<abu[7]> X-Delivery-Time: 1718290232
<abu[7]> X-Envelope-From: <abfallwirtschaft@lra-a.bayern.de>
<abu[7]> X-Envelope-To: <abu@software-lab.de>
<abu[7]> X-UID: 175245
<abu[7]> ...
<abu[7]> Sehr geehrte Damen und Herren,
abu[7] has quit [Excess Flood]
<geri> whoops? :D
abu[7] has joined #picolisp
<abu[7]> uh
<abu[7]> shit
<geri> whoops indeed
<abu[7]> Hi geri :)
<geri> hi-hi, damen und herren
<abu[7]> Pasted
<geri> yeah i got it
<abu[7]> Symbols are in trees, yes
<abu[7]> namespaces
<abu[7]> Moment
<abu[7]> brb
abu[7] has left #picolisp [#picolisp]
abu[7] has joined #picolisp
<abu[7]> ok
<geri> wb
<abu[7]> —
<geri> how do you compare symbols in those trees?
<geri> = on name bignum?
<abu[7]> each namespace is *two* trees
<abu[7]> one for short and one for long names
<abu[7]> and a name is a number, yes
<abu[7]> short or big
<abu[7]> so comparison is different
<geri> is it 2 binary trees?
<abu[7]> T
<geri> aha
<abu[7]> like 'idx'
<abu[7]> but comparisons are special
<abu[7]> (vi 'llvm~compare)
<abu[7]> (vi 'intern)
<abu[7]> goes to 'llvm~intern'
<abu[7]> (if (cnt? Name) # Short name
<abu[7]> etc.
<geri> honestly i have no idea how'd you get so many brilliant design decisions into picolisp :D
<geri> i just use an oblist for now cause simplest option
<geri> also slow as hell but we dont talk about that
<abu[7]> it grew over time
<abu[7]> pil32 had a simple hash table
<abu[7]> only intern, transient and extern
<abu[7]> no further namespaces
<geri> i was like "oh now i gotta write a hash table in C" and went directly to oblist cause couldnt be asked
<geri> all "strings" are also interned and compared with pointer equality right?
<abu[7]> yes
<abu[7]> Transient global
<abu[7]> (vi 'llvm~$Transient)
<geri> is it exposed in pil?
<abu[7]> no
<geri> (NIL $Nil) for long transient names, hmm
<abu[7]> Contains only symbols created b) 'read'
<abu[7]> not 'pack' etc
<abu[7]> *created by
<geri> makes sense
<abu[7]> T, also a performance issue
<geri> how are packed symbols compared to non-packed transient symbols?
<abu[7]> compare does not care about the scope
<geri> i mean, you said symbols created by pack are not interned or smth
<abu[7]> A symbol may be interned and transient in another namespace
<geri> if they arent interned you cant do pointer equality i think?
<abu[7]> intern is only for read
<abu[7]> finding an existent sym
<abu[7]> 'a always gives the same 'a'
<abu[7]> or "a" as long as in scope
<geri> question is, how does (= "hi" (pack 'h 'i)) work?
<geri> left one is interned and right one won't be
<geri> do those just compare the name bignum?
<abu[7]> = calls compare
<abu[7]> it does not do any tree search
<abu[7]> (= "a" 'a) -> T
<geri> what's with compare returning 0 -1 +1 etc
<abu[7]> It is called in many places
<abu[7]> = < > sort etc
<abu[7]> 0 means equal
<geri> like strcmp i guess
<abu[7]> T
rob_w has quit [Read error: Connection reset by peer]
ShannonB has joined #picolisp