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
ygrek has joined #picolisp
ygrek has quit [Remote host closed the connection]
rob_w has joined #picolisp
Iacob has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
ello has quit [*.net *.split]
DKordic has quit [*.net *.split]
Iacob has joined #picolisp
bjorkintosh has joined #picolisp
ello has joined #picolisp
DKordic has joined #picolisp
geri has joined #picolisp
geri has left #picolisp [#picolisp]
geri has joined #picolisp
<geri> hey, i just found out uppc returns a special value for "ß" :D
<abu[7]> Double-S ?
<geri> yes
<abu[7]> That's right
<geri> difficulties of using anything other than english...
<abu[7]> Yeah :)
<geri> str? seems to be checking if symbol is interned? 🤔
<abu[7]> T
<geri> i was actually just wondering how you print transient symbols with quotes around it :D
<geri> s/ it / them /
<geri> trasnient symbols are just interned in a special namespace right?
<abu[7]> no
<geri> okay, then different mechanism
<abu[7]> they are just not interned in the current search order
<abu[7]> maybe nowhere
<geri> im not sure i got that
<geri> well it cant be nowhere considering (setq "hi" "bye") works
<geri> right there was something about (====)
<abu[7]> : 'llvm~de
<abu[7]> -> "de"
<geri> yeah i was gonna say
<geri> actually idk how to think about it
<geri> :D
<abu[7]> ok :)
<geri> okay nevermind
<geri> so every symbol that's not in current namespace is transient? 🤔
<abu[7]> in current *search* order
<geri> or more like everything that isnt specified in (symbols '... 'pico)
<abu[7]> exactly
<geri> is that the search order thing
<geri> okay
<geri> xd
<geri> if i just type "hello", where does it get interned?
<abu[7]> at that moment in the transient ns
<abu[7]> similar to (private)
<geri> how'd it work before namespaces became a thing?
<abu[7]> same
<abu[7]> there is a special transient ns
<geri> so transient namespace was always there, but general namespaces not?
<abu[7]> exactly
<geri> aha
<geri> makes sense
<abu[7]> There were always 3
<abu[7]> pico, transient, external
<geri> was pico always a symbol too?
<geri> filled with two binary search trees
<abu[7]> No, it was the built-in namespace without explicit name
<geri> makes sense
<geri> looks like you can convert a (basic) common lisp macro to picolisp by just copying the definition, switching functions to pil native ones and wrapping the call in eval
<geri> :D
<geri> (de when2 Args (list 'if (car Args) (cons 'prog (cdr Args))))
<geri> and if you eval its result you get macro-ish behaviour
<geri> not exactly useful in picolisp but fun
<abu[7]> yep
<geri> its pretty interesting though that macros are kinda just fexps + an implied eval
<geri> well, fexps that produce lists* i guess
<geri> actually it can be like anything :D
<abu[7]> indeed
<geri> or instead of eval use `, then even more macro-ish behaviour :D
bjorkintosh has quit [Ping timeout: 260 seconds]
fbytez has quit [Ping timeout: 252 seconds]
fbytez has joined #picolisp
ygrek has joined #picolisp
<geri> (de apply-fexp (Func Args) (fill (quote Func ^ Args)))
<geri> (apply-fexp setq '(a 'c))
<geri> idk what exactly im thinking
<geri> :D
<abu[7]> (de apply-fexp (@Func . @Args) (macro (@Func . @Args)))
<geri> actually returns a list
<geri> cause first element is a number
<abu[7]> -> 7
<abu[7]> : (apply-fexp 'setq A 7)
<abu[7]> : A
<abu[7]> -> 7
<abu[7]> For your example (de apply-fexp @Args (macro . @Args))
<abu[7]> : (apply-fexp setq A 8)
<abu[7]> -> 8
<abu[7]> : A
<abu[7]> -> 7
<abu[7]> oops ;)
<abu[7]> Correct is (de apply-fexp @Args (macro @Args))
<abu[7]> : (apply-fexp setq A 8)
<abu[7]> -> 8
<abu[7]> : A
<abu[7]> -> 8
<abu[7]> Not really good
<abu[7]> as the args are not evaluated
<geri> fun
<geri> what would you say contributes the most to picolisp's performance/startup time?
<abu[7]> : (mySetq A (+ 3 4) B (* 3 4))
<abu[7]> : (de mySetq Args (while Args (set (++ Args) (eval (++ Args)))))
<abu[7]> -> mySetq
<abu[7]> : A
<abu[7]> -> 7
<abu[7]> -> 12
<abu[7]> : B
<geri> fexps? only 4 types?
<abu[7]> -> 12
<geri> also fun :D
<geri> (also nearly every function call being in C/assembly/llvm)
<abu[7]> What do you mean with 4 types?
<geri> nums, bignums, symbols and cons cells
<geri> at least tag-wise its 4
<abu[7]> yes, data types, but fexprs?
<geri> <geri> what would you say contributes the most to picolisp's performance/startup time?
<geri> then a bunch of guesses
<abu[7]> I think one point is that there is not much to interprete at runtime because all primitives are fexprs (FSUBRs to be exact)
<abu[7]> And dynamic shallow binding
<abu[7]> (sym val access)
<geri> yeah
<geri> for the record, what's implied with "shallow" part?
<abu[7]> Not sure, I think it is that the value is directly accessible without any search through an env
<geri> ah
<abu[7]> If you google for it, you find "Dynamic Scoping" which is wrong imho
<geri> Deep binding binds the environment at the time the procedure is passed as an argument
<geri> hm
<geri> Shallow binding binds the environment at the time the procedure is actually called
<abu[7]> Scoping is lookup by name
taleon has quit [Ping timeout: 252 seconds]
taleon has joined #picolisp
rob_w has quit [Quit: Leaving]
ygrek has quit [Remote host closed the connection]