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
patrixl has quit [Read error: Connection reset by peer]
patrixl has joined #picolisp
_whitelogger has joined #picolisp
rob_w has joined #picolisp
mtsd has joined #picolisp
razzy has joined #picolisp
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
tankf33der has quit [*.net *.split]
tankf33der has joined #picolisp
<tankf33der> found a bug in pil21.
<tankf33der> second. damn :)
razzy has quit [Quit: Connection closed]
<tankf33der> two bugs in two minutes, not bad.
<beneroth> bug hunter medal of the day
<Regenaxer> Indeed, congratulation!!
<Regenaxer> Fastest pil21 bug hunter in the universe
<tankf33der> http://ix.io/2xbn
<tankf33der> this is one.
<tankf33der> http://ix.io/2xbo
<tankf33der> this is second.
<Regenaxer> sorry, was busy
<Regenaxer> 'stack' is correct
<Regenaxer> doc/diff: Main coroutine has a tag 'T'
<Regenaxer> Coroutine in an error REPL is not clear
<Regenaxer> Not clear what to do I mean
<Regenaxer> There are some points where I'm not sure yet how to deal with in errors
<Regenaxer> We talked about it here
<Regenaxer> eg. open files
<Regenaxer> files opened in coroutines
<Regenaxer> (co 'a ... (in ... (yield ...
<Regenaxer> I think atm errors leave them all as they are
<Regenaxer> Errors are like catch
<Regenaxer> We must think here too what happens in coroutine contexts
<Regenaxer> i.e. we cannot 'yield' back to a context that is gone (like an error handler, or a 'thrown' env)
<tankf33der> -> (aa T . 64)
<tankf33der> : (stack)
<tankf33der> how this could be correct ? i could do it more messy.
<Regenaxer> yes
<Regenaxer> I said above
<tankf33der> ok
<Regenaxer> doc/diff
<Regenaxer> Main has a tag now
<Regenaxer> 'T'
<Regenaxer> So it is visible in the list of coroutines
<Regenaxer> in pil64 it was there too, but had no tag
<Regenaxer> You can now handle Main like other coroutines
<Regenaxer> eg (yield Val T)
<Regenaxer> Only stop will not work
<tankf33der> eh. i see.
<Regenaxer> : (co T)
<Regenaxer> !? (co T)
<Regenaxer> Can't stop main routine
<Regenaxer> ?
<tankf33der> what about second ?
<Regenaxer> 'aa' can be stopped
<Regenaxer> but T remains once it is started
<tankf33der> no, what about second link ?
<tankf33der> http://ix.io/2xbo
<tankf33der> this one
<Regenaxer> I wrote lots of stuff above!
<Regenaxer> Not clear yet how to handle such cases
<Regenaxer> not implemented ;)
<tankf33der> ok.
<Regenaxer> Either handle it somehow, or check and disallow
<Regenaxer> But probably not everything can be disallowed
<Regenaxer> I will think about it
<Regenaxer> I coroutine can be started only (1) on top level (no co yet), (2) from Main, or (3) from another coroutine
<Regenaxer> each have different stack layouts
<Regenaxer> but an error REPL is not persistent
<Regenaxer> the stack is gone after that
<tankf33der> yeah.
<Regenaxer> Same problem if some code starts a coroutine and then 'throw's to some other place -> boom
<Regenaxer> I mean, boom when yield'ed back to that routine only
<Regenaxer> All difficult to check
<beneroth> I would say: either stop just the coroutine (without an error handler?) or just go ahead and break the main process...
<beneroth> if soft crash is not possible, then go full hard crash, so to say...
<Regenaxer> Stop or prohibit is good, but cannot be checked
<Regenaxer> How to know the calling code throws later?
<beneroth> can errors wihtin a coroutine be catched?
<Regenaxer> yes
<beneroth> ok good
<Regenaxer> you can also throw
<Regenaxer> and catch
<beneroth> yeah, I understand catching/errors going over the coroutine "boundary" is the question
<Regenaxer> but the target env must still exist ;)
<Regenaxer> this also works
<Regenaxer> I think it is even save
<Regenaxer> throw says a "tag not found" if the catching coroutine is gone
<Regenaxer> the problem is 'yield'
<Regenaxer> yield returns to where co or yield was called
<Regenaxer> So *that* env must still be active
<Regenaxer> I must investigate more
<Regenaxer> Perhaps all that can be detected at runtime
<Regenaxer> and give proper error instead of boom
<Regenaxer> If you do (yield Val 'someCo) it is safe
<Regenaxer> like throw
<Regenaxer> gives tag not found
<Regenaxer> But just (yield Val) goes *back* to where it was called from
<beneroth> ah
rob_w has quit [Quit: Leaving]
<beneroth> and if that caller is a coroutine which doesn't exist anymore... what to do then?
<beneroth> that is the issue?
<Regenaxer> exactly
<Regenaxer> or a normal routine
<Regenaxer> hmm, no
<Regenaxer> ... (yield ..) (throw) should be ok
<beneroth> can you not detect that the target doesn't exist, and go into normal error handling?
<Regenaxer> cause it will return *before* the throw
<beneroth> then the throw is never evaluated, no?
<Regenaxer> Perhaps it is all not a big problem
<Regenaxer> no, it is evaluated
<Regenaxer> if (yield) returns
<Regenaxer> ie continues here
<Regenaxer> So no prob
<Regenaxer> I will first check what is the problem in the error handler
<Regenaxer> Perhaps no big issue
<Regenaxer> Perhaps this evening
<Regenaxer> But I think you can always create a situation where it returns to a *gone* env
<Regenaxer> perhaps needs 3 routines
<Regenaxer> (yield 1 'a) (throw) (yield 'b)
<Regenaxer> What if 'b' then yields to 'a' which then yields *back* ?
<Regenaxer> Confusing :)
<Regenaxer> I think ok
<Regenaxer> If 'a' yields back, it goes to after the (throw), right?
<Regenaxer> Anyway, later ...
orivej has quit [Ping timeout: 258 seconds]
mtsd has quit [Quit: Leaving]
aw- has quit [Quit: Leaving.]
<Regenaxer> tankf33der, beneroth, forget all my worries above!
<Regenaxer> I think all those cases are working safely
<tankf33der> ok
<Regenaxer> The thing tankf33der found in the error handler was a simple typo
<Regenaxer> I released
<tankf33der> :)
<Regenaxer> Thanks as ever! :)
<Regenaxer> BTW, I also finished coding pil21 today!!
<Regenaxer> The DB part is not even tried
<Regenaxer> please don't test yet
<Regenaxer> I just went ahead and hacked it all in
<Regenaxer> Must now sort out the details
<beneroth> :)
<beneroth> congrats Regenaxer
<beneroth> thank you for all your efforts!
<Regenaxer> np :)
beneroth has quit [Quit: Leaving]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
anddam has quit [Quit: WeeChat 2.9]
anddam has joined #picolisp
anddam_ has joined #picolisp
anddam has quit [Quit: WeeChat 2.9]
anddam_ has quit [Client Quit]
anddam has joined #picolisp
anddam has quit [Client Quit]
_whitelogger has joined #picolisp