ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
_whitelogger has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #picolisp
aw- has quit [Ping timeout: 246 seconds]
miskatonic has joined #picolisp
aw- has joined #picolisp
aw- has quit [Client Quit]
aw- has joined #picolisp
rob_w has joined #picolisp
rob_w has quit [Remote host closed the connection]
mtsd has joined #picolisp
<Nistur> mornin'
<mtsd> Good morning!
<Nistur> o7
<beneroth> Good morning
<Nistur> at the weekend, MiniNisturette woke up, looked at me, and said, quite clearly, Qapla'!
<Nistur> I think I'm raising a Klingon
<Regenaxer> Hi all :)
<mtsd> Hi Regenaxer!
mtsd_ has joined #picolisp
mtsd has quit [Ping timeout: 256 seconds]
rob_w has joined #picolisp
mtsd has joined #picolisp
mtsd_ has quit [Ping timeout: 260 seconds]
mtsd has quit [Client Quit]
orivej_ has quit [Ping timeout: 260 seconds]
<beneroth> Nistur, congrats to the Klingon :-)
<beneroth> Hi Regenaxer :)
mtsd has joined #picolisp
<Regenaxer> Hi beneroth
<beneroth> hey mtsd :)
<mtsd> Hey :)
<beneroth> tankf33der, thanks for the tip with b2sum - it is really blazing fast :-)
<tankf33der> o/
<tankf33der> i have my own b2sum on picolisp and monocypher via mmap.
miskatonic has quit [Remote host closed the connection]
<beneroth> oh nice :D
karswell_ has joined #picolisp
<beneroth> Regenaxer, you got a bit time?
<Regenaxer> yep :)
<beneroth> what is your recommendation for error handling with (later) ?
<beneroth> seems to me that evaluation (quit) within (later) results in repl of the (later)-childprocess
<beneroth> ok, now
<beneroth> no
<Regenaxer> yes, it exits
<beneroth> T
<Regenaxer> in general quit exits if there is no tty
<beneroth> so (quit) can be used as usual within (later) ?
<beneroth> T
<Regenaxer> yes, errors go to stderr then
<beneroth> the process which started (later) is also exited, right?
<beneroth> by quit within later
* beneroth is trying it out
<Regenaxer> the parent? No, it is not concerned
<Regenaxer> it gets EOF
<Regenaxer> i.e. NIL in the pipe
<beneroth> so.. nothing, just empty results
<beneroth> ok...
<beneroth> I see
<beneroth> it's visible in (kids)
<Regenaxer> yes, cause 'pipe' is used
<Regenaxer> The child is a normal family member
<beneroth> so best to extend the (wait NIL (full @)) from the (later) example with a timeout limit
<beneroth> (in practical use, I mean)
<Regenaxer> you have timeout use case here?
<beneroth> I like to call the same function multiple times in parallel, using (later)
<Regenaxer> ok
<beneroth> but the function might legitimately run into an error
<Regenaxer> Needs care not to start too many processes
<beneroth> if so, I like to detect this in the parent
<beneroth> T
<beneroth> right
<Regenaxer> you can send an error token back
<beneroth> yeah right, I forgot it for now
<beneroth> using normal recursion instead, I can still parallelize later (haha) if needed
<beneroth> but then obviously better with a fixed number of worker kids instead of later
<Regenaxer> not to exeed the max?
<Regenaxer> @misc/stress.l does something like that
<Regenaxer> 40 children
<Regenaxer> using plain (fork)
<beneroth> yeah like this :-)
<Regenaxer> Not perfect for many processes
<beneroth> T
<Regenaxer> due to the manual checks
<beneroth> for many simple things, (later) is surely good enough
<Regenaxer> yeah, easiest
<beneroth> and the more extensive approach on the other side of @misc/stress.l would be a database with job entries
<Regenaxer> right
<beneroth> (this approach I did before, mainly for resilience)
<Regenaxer> that is more general and flexible
<beneroth> aye, but a bit heavy for smaller stuff
<Regenaxer> T
<beneroth> :-)
karswell_ is now known as karswell
mtsd has quit [Quit: mtsd]
mtsd has joined #picolisp
rob_w has quit [Quit: Leaving]
mtsd has quit [Quit: Leaving]
<beneroth> nice
<Regenaxer> hehe, yeah
<beneroth> Regenaxer, I like to do a non-destructive (redef), meaning I have an existing function 'foo which is recursive (it calls foo), and I like to make a second variant 'bar which decorates 'foo similar to how (daemon) works, but I want to conserve the original 'foo, so I can call both 'foo and 'bar
<beneroth> any ideas? :D
<Regenaxer> Moment, tel :)
<beneroth> okay :)
orivej has joined #picolisp
<Regenaxer> ok, done
<Regenaxer> Hmm, just cons something with the value of 'foo' and pass to 'def'?
<Regenaxer> (def 'bar (... (cons ... foo ...)))
<beneroth> that is not replacing the recursive call to 'foo within 'foo, is it?
* beneroth thinks easiest way is to make 'foo and 'bar being a single function, overladed by parameter
* beneroth thinks there are use cases where keeping those functions separate would be more elegant, but then there is probably no way around iterating through the function body and finding the recursive call to adapt it
karswell_ has joined #picolisp
karswell has quit [Remote host closed the connection]
<Regenaxer> It depends
<Regenaxer> I think you must use recur/recurse
<Regenaxer> in 'foo'
<beneroth> yeah that would make it easier
<beneroth> T, that would be a correct/elegant solution
karswell_ has quit [Read error: Connection reset by peer]
<tankf33der> picolisp is a trap. run until its too late.
<beneroth> hehe
<beneroth> too late for what?
<DKordic> ##lisp
<DKordic> [facepalm]