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
viaken has quit [Quit: brb]
viaken has joined #picolisp
<tankf33der> abu[m]: morning
<tankf33der> i can write this code, give up.
<abu[m]> Good morning tankf33der! Which way did you try?
<tankf33der> Via wait inside co
<tankf33der> and (time) calculation as second attempt
<tankf33der> it always blocks
<abu[m]> 'wait' cannot be used, because every coroutine will wait then, adding up all the times
<abu[m]> Because coroutines all run in the same process
<tankf33der> Give me a hint then
<abu[m]> I have a solution, but I could not use more than 10000 co's because of stack space
<abu[m]> As I said, I think we need 'pause' from @lib/simul.l
<abu[m]> It is in the discrete event simulation library
<abu[m]> Shall I post my solution? Perhaps you can get it running with more stack space.
<tankf33der> Post it
<abu[m]> I tried "ulimit -s unlimited" but without success for 100 k coroutines
<abu[m]> (stack 6) seems the minimum
<abu[m]> An empty coroutine also runs with (stack 2), but 'pause' needs more stack it seems
<abu[m]> Also, creating more coroutines lets it get slower and slower, because for each new coroutine all the stack frames need to be traversed searching for a free place
<tankf33der> Insane
<tankf33der> next level
<tankf33der> Afk.
<abu[m]> Anyway, now I understand why 'pause' needs quite some stack space. It uses 'idx' which is recursive.
rob_w has joined #picolisp
avocadoist has quit [Ping timeout: 256 seconds]
msavoritias has joined #picolisp
seninha has joined #picolisp
<abu[m]> No, I'm wrong. 'idx' is not recursive.
<abu[m]> (stack 2) is simply too small for a usable stack segment
<abu[m]> I would recommend a minimum stack segment size of 8
rob_w has quit [Remote host closed the connection]
<beneroth> yeah... I guess you can construct a recursive/circular idx, but it would be a bad idea...
<abu[m]> Yes, all internal binary trees in pil are non-recursive
<abu[m]> Recursive versions are a lot easier, but may use a lot more stack
seninha has quit [Remote host closed the connection]
abu[7] has joined #picolisp
payphone has quit [Remote host closed the connection]
casaca has quit [Write error: Connection reset by peer]
cpli has quit [Remote host closed the connection]
cpli has joined #picolisp
payphone has joined #picolisp
casaca has joined #picolisp
abu[7] has quit [Remote host closed the connection]
abu[7] has joined #picolisp
msavoritias has quit [Ping timeout: 248 seconds]
seninha has joined #picolisp
seninha has quit [Ping timeout: 268 seconds]