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
orivej has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
mtsd has joined #picolisp
mtsd has quit [Ping timeout: 252 seconds]
<tankf33der> Regenaxer: pil tests failed, somewhere around co’s cartesian production. Afk.
<Regenaxer> tankf33der, thanks! Let's investigate later
<Regenaxer> tankf33der, do you call (stack) in the tests? That's what I wanted to ask you a few days ago. The return value of (stack) was exyended
<tankf33der> this code is wrong, i dont see (msg 9)
<tankf33der> Regenaxer: never called (stack) in the tests.
<tankf33der> afk.
<Regenaxer> ok
<tankf33der> breakfast, running to job
<Regenaxer> good! ;)
<tankf33der> You could try Cb.
<tankf33der> code and debug
<Regenaxer> tried already
<Regenaxer> can reproduce
<tankf33der> good
<Regenaxer> Did it work before?
<tankf33der> this is part of test suite
<Regenaxer> om
<Regenaxer> ok
<Regenaxer> so it was a recent change
<Regenaxer> Call 'loadCoEnv' in 'unwind' probably
<Regenaxer> Nasty stuff
<Regenaxer> I'll debug later
<Regenaxer> Hmm, it is a dilemma
<Regenaxer> It does not work with the current coroutines
<Regenaxer> We had this discussion with beneroth a few days ago. I said:
<Regenaxer> "Catching from same coroutine is ok I think, and catching in main program from any other coroutine"
<Regenaxer> "Avoid catching *in* a cooutine a throw from another one for that there is not enough info in the envs"
<Regenaxer> So in fact I need to keep more info in the catch frames about the current coroutine
<Regenaxer> Otherwise I cannot restore after a catch
<tankf33der> I remember a little
<tankf33der> lets fix tests then
<Regenaxer> No, this is not clean
<Regenaxer> A throw may appear
<Regenaxer> I have that in document printing
<Regenaxer> I need to extend the catch environment
<Regenaxer> But I found another bug
<Regenaxer> If a coroutine is started in a 'load', it *seems* to use too much stack space
<Regenaxer> Either the stack usage detection is wrong, or some other assumption about coroutine frames
<Regenaxer> This is OK:
<Regenaxer> : (co 'a 123)
<Regenaxer> -> 123
<Regenaxer> : (stack)
<Regenaxer> -> ((T . 250) . 64)
rob_w has joined #picolisp
<Regenaxer> BUT: If (co 'a 123) is in a loaded file, I get
<Regenaxer> : (stack)
<Regenaxer> -> ((T . 151) . 64)
<Regenaxer> So 100 KiB are used in the main segment
<Regenaxer> Can't be
<Regenaxer> I noticed it when looking at (stack) after running your Cb.l
orivej has joined #picolisp
<tankf33der> I see
<Regenaxer> First fix catch/throw
<Regenaxer> I think I must disallow a throw into another coroutine
<Regenaxer> Even if I keep info, the co may be terminated meanwhile
<Regenaxer> Not sure about a catch in the main program
<Regenaxer> should be OK, as it never terminates
orivej has quit [Ping timeout: 260 seconds]
<Regenaxer> Now I re-structured coroutine environments a little
<Regenaxer> Catch/throw is allowed, but only *inside* the same coroutine, or from a coroutine back to the main program
<Regenaxer> Not sure if I got it right ;)
<Regenaxer> I release no
<Regenaxer> now
<Regenaxer> Done
<Regenaxer> The stack usage issue still remains
<Regenaxer> Ah, it happens only if the file is loaded from the command line
<tankf33der> All passed
<Regenaxer> Great, thanks!
<Regenaxer> Getting better and better :)
orivej has joined #picolisp
<Regenaxer> I'm tracing down the stack usage
<Regenaxer> Looks like the first call to readline uses so much stack
<Regenaxer> Yes! Indeed
<Regenaxer> it is readline()
<Regenaxer> Writes somewhere 100 kB down the stack
rob_w has quit [Remote host closed the connection]
rob_w has joined #picolisp
<Regenaxer> Looks it is beyond my control
<Regenaxer> No idea why it needs so much stack
<Regenaxer> It writes about 312 bytes into that area
orivej has quit [Ping timeout: 252 seconds]
<beneroth> xD
<beneroth> "alert! bloatware detected!"
<beneroth> lets make a readline issue report "readline makes pico into nano"
rob_w has quit [Remote host closed the connection]
<Regenaxer> Yep!
rob_w has joined #picolisp
rob_w has quit [Remote host closed the connection]
rob_w has joined #picolisp
<Regenaxer> Cool! Thought a little more about it. It is also OK to catch a throw from another coroutine not just in main
<Regenaxer> Released again, tankf33der please test whenever possible
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
<tankf33der> doing
<Regenaxer> 👍👍
<tankf33der> all passed.
<Regenaxer> Perfect :)
<Regenaxer> Thanks!
<beneroth> great job, you two :)
<Regenaxer> Thanks :)
<beneroth> thanks for being so diligent ;)
<beneroth> bbl
<Regenaxer> :)
<tankf33der> llvm 7,11-13 - ok
<Regenaxer> Thanks a lot tankf33der!
<Regenaxer> Together we got it stable
<tankf33der> :)
beneroth has quit [Quit: Leaving]
xkapastel has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]