ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
orivej has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]
<clacke[m]> Oh yes, of course.
<clacke[m]> On the topic of dialects, this showed up in my feeds today. :-D https://ipfs.io/ipfs/QmTWHCTXn6hHeKQNKkijnrNNTd38CFwGAKL7MVfcwKZdgr
dtornabene has quit [Quit: Leaving]
_whitelogger has joined #picolisp
C9IU5Htomaw has joined #picolisp
C9IU5Htomaw has quit [Client Quit]
orivej has quit [Read error: Connection reset by peer]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
aw- has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
<aw-> quiet weekend?
<Regenaxer> Hi aw-, yes :)
<aw-> hi Regenaxer
<aw-> i have a 'style' question
<aw-> if i want to define a list of "strings"
<aw-> is it preferable to do: (setq *Mylist '("str1" "str2" "str3")) or (de *Mylist ("str1" "str2" "str3"))
<aw-> i know the result is different, but i can't quite figure out which approach is more common
<aw-> or prefered*
<Regenaxer> The main difference is that 'de' gives a "redefined" message, so I would use it for more constant values
<Regenaxer> (de *Mylist "str1" "str2" "str3") is the same than as (setq *Mylist '("str1" "str2" "str3"))
<Regenaxer> *then
<aw-> oh ok
<aw-> ah yes, redefined
<aw-> i forgot about that
<Regenaxer> Usually I prefer 'de' unless the value changes and the file is re'load'ed
<Regenaxer> Sometimes 'def' is desired. Gives "redefined" too
<Regenaxer> The other differene which sometimes is important is that 'de' and 'def' return the symbol, while 'setq' returns the value
<aw-> ah yes, the return value
<aw-> it usually doesn't matter what they return (in my case)
<Regenaxer> Sometimes it does
<Regenaxer> (put (def (read) Value) 'prop 'key)
<aw-> no i mean, i usually use (de) and (setq) first
<aw-> i don't usually call them from within other functions
<Regenaxer> (de) yes, but (setq ..) is typically called within functions
<Regenaxer> But sometimes (de) too
<Regenaxer> it depends on the situation
<aw-> yeah
<aw-> ok i have another question
<aw-> (pick '((N) (pick something Lst)) Biglst)
<aw-> what's wrong with this code?
<aw-> err sorry:
<aw-> (pick '((N) (pick N Lst)) Biglst)
<aw-> i think you explained this to me once.. perhaps using (apply) ?
<Regenaxer> I see nothing wrong, if 'Lst' is bound
<aw-> it seems inefficient to use (pick) twice
<Regenaxer> well (pick N Lst) is wrong :)
<Regenaxer> assuming 'N' is bound to a function, it is ok
<aw-> sorry i messed up my example
<aw-> just looking for an alternative to doing (pick) in (pick)
<Regenaxer> yes, but it makes sense I think
<aw-> what are the alternatives?
<Regenaxer> 'Biglst' could be a list of functions
<Regenaxer> What is the purpose?
<aw-> Biglst is a list of cons pairs
<Regenaxer> '((N) (pick N Lst)) expects 'N' to be a function
<aw-> yes i know
<aw-> sorry i said i messed up my example
<Regenaxer> What do you want to do with the two lists?
<aw-> anyways it's fine, i think i will use apply
<Regenaxer> hmm, for what purpose?
<Regenaxer> You have two lists, 'Lst' and 'Biglst'
<Regenaxer> What do you want to find in them?
<Regenaxer> 'apply' applies a function to a single list
<aw-> hmmm
<aw-> ok i figured it out with (pick '((N) (member...
<Regenaxer> So this returns a sublist of Biglst
<Regenaxer> It all depends on what you need :)
<aw-> yeah, there's too many list functions
<aw-> i get confused
<Regenaxer> hehe
aw- has quit [Quit: Leaving.]
<tankf33der> Regenaxer: here?
<Regenaxer> yessir
<tankf33der> function initiator
<tankf33der> question: should i remove multi setq everywhere?
<tankf33der> and modify functions to modify the same variables inside function?
<Regenaxer> Hmm, how?
<Regenaxer> all globals, right?
<tankf33der> for kdf1 function it will be
<tankf33der> kdf1 ‘*C (pub *Ei)
<Regenaxer> You mean not to pass the global to the function?
<tankf33der> all globals
<tankf33der> i will pass *C to kdf1 and modify inside it
<Regenaxer> I don't know what is better here
<tankf33der> instead of modify by setq
<Regenaxer> Best is what is shorter
<tankf33der> without setq it will like C :)
<Regenaxer> ok perhaps ;)
<tankf33der> i will rewrite
<tankf33der> already did and changed to setq
<Regenaxer> oh
orivej has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
<tankf33der> so
<tankf33der> as i asked before:
<tankf33der> 1. should I leave Variant 1 as is? 2. is Variant 2 much better ?
<Regenaxer> I think it also depends on the functions
<Regenaxer> (1) is more general Lisp style
<Regenaxer> ie call by value, not by reference
<Regenaxer> I think I would go with (1)
<tankf33der> ok
<tankf33der> thanks
<tankf33der> issue closed.
<Regenaxer> :)
libertas has quit [Ping timeout: 246 seconds]
libertas has joined #picolisp
shpx has joined #picolisp
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dtornabene has joined #picolisp
shpx has joined #picolisp
shpx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]