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 quit [Ping timeout: 264 seconds]
rick42 has quit [Ping timeout: 265 seconds]
rick42 has joined #picolisp
joebo has quit [Ping timeout: 265 seconds]
joebo has joined #picolisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #picolisp
mtsd has joined #picolisp
mtsd has quit [Ping timeout: 240 seconds]
mtsd has joined #picolisp
mtsd has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
aw- has joined #picolisp
_whitelogger has joined #picolisp
mtsd has quit [Remote host closed the connection]
mtsd has joined #picolisp
<Regenaxer> tankf33der, please do another coroutine test run whenever you have time
<tankf33der> released ?
<Regenaxer> yes
<tankf33der> doing
<Regenaxer> getting closer :)
<Regenaxer> I build coroutine stack management meanwhile
<tankf33der> yes, closer.
<tankf33der> now complex cartesian.
<tankf33der> let me create code snippet.
<Regenaxer> good
<tankf33der> cant exact code, need time.
<tankf33der> cant find exact
<tankf33der> code
<Regenaxer> Exact in which sense?
<tankf33der> cant what crashes.
<Regenaxer> ok
<tankf33der> cant find what crashes.
<Regenaxer> good sign :)
<tankf33der> [t1.l:47] !? ((L) (sum prog L))
<tankf33der> Stack overflow
<tankf33der> ?
<Regenaxer> Either the stack checks are still wrong
<Regenaxer> or the size is too small
<tankf33der> this is not coroutines.
<Regenaxer> but it defaults to 64 KiB linke in pil64
<tankf33der> checking.
<Regenaxer> ah
<Regenaxer> ok
<tankf33der> sum cant mapping over 135K items list
<Regenaxer> yeah, uses 'apply'
<Regenaxer> and pil21 needs more stack space
<Regenaxer> (perhaps double?)
<tankf33der> already 32K
<Regenaxer> Cant do as compact as in pil64
<tankf33der> 64K the same.
<tankf33der> something is wrong.
<Regenaxer> I see
<Regenaxer> Stack cleanup works too
<Regenaxer> released
<Regenaxer> Does that code work on pil64?
<tankf33der> sure.
<tankf33der> on pil21 it works too only i comment non-coroutine version or vice verse.
<tankf33der> 128K stack size fails too.
<Regenaxer> Without coroutines running the stack is unlimited
<tankf33der> http://ix.io/2uCA
<tankf33der> this is the code:
<Regenaxer> uh
<tankf33der> lets calculate cartesian product with and without coroutines and compare result of sums.
<tankf33der> if run code it generates output:
<tankf33der> S 118800
<tankf33der> 118800 118800
<tankf33der> if uncomment this line:
<tankf33der> #(range 1 40)
<tankf33der> it will fail:
<tankf33der> # pil21 t1.l
<tankf33der> S 7458000
<tankf33der> Stack overflow
<tankf33der> ?
<tankf33der> [t1.l:51] !? ((L) (sum prog L))
<tankf33der> BUT:
<tankf33der> if run part1 or part2 separately then every part writes correct numbers.
<Regenaxer> ok
<tankf33der> in pil64 they can work together.
<Regenaxer> hmm, here it passes both on pil64 and pil21
<tankf33der> on tablet ?
<Regenaxer> wait, I did not comment the range line
<Regenaxer> on smartphone
<tankf33der> ok
<tankf33der> try x86.
<Regenaxer> fails on phone
<Regenaxer> uncommented range
<tankf33der> good.
<Regenaxer> I check where it goes wrong
<Regenaxer> First fix something in 'stack' in pil21
<Regenaxer> unrelated to the above
<Regenaxer> Done
<Regenaxer> But I have to leave for a while
<Regenaxer> Will check later
mtsd has quit [Quit: Leaving]
orivej has quit [Ping timeout: 265 seconds]
<Regenaxer> ret
<tankf33der> i see new commits
<Regenaxer> Some fixes in gc for coroutines
<Regenaxer> No idea with the product issue
<Regenaxer> doesnt work
<Regenaxer> (product 'cartesian1) returns ("Linux")
<Regenaxer> No, I tested nonsense
<Regenaxer> (product 'cartesian1) hangs
orivej has joined #picolisp
<Regenaxer> What is 'cartesian1' ?
<Regenaxer> cause 'product' expects a list
<tankf33der> it is a typo
<tankf33der> just cartesian
<tankf33der> main question: if both how they collapsed.
<tankf33der> i just tried use different coroutine tag and function name
<Regenaxer> hmm
<Regenaxer> in any case it runs on pil64
<Regenaxer> what might be different?
<tankf33der> yes.
<tankf33der> trying create production function variant without co
<Regenaxer> mk
<Regenaxer> ok
<Regenaxer> also strange is that it works without (range 1 40)
<Regenaxer> What makes it so different?
<Regenaxer> The basic coroutine mechanisms seem to work
<tankf33der> with range 1 40 list is 135K lists in result
<tankf33der> I have 4M test and all works.
<tankf33der> works.
<Regenaxer> modified version?
<tankf33der> yea product without co.
<Regenaxer> ok
<tankf33der> now under gc+
<Regenaxer> And we must find why co version fails
<tankf33der> can i run gc+ for co too?
<Regenaxer> yes
<Regenaxer> coroutines do cons
<Regenaxer> do *not* cons
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
<tankf33der> code does not crash with (gc 32)
orivej has quit [Ping timeout: 264 seconds]
<Regenaxer> production?
<tankf33der> yea.
<tankf33der> keep playing.
<Regenaxer> indeed
<Regenaxer> Here this one works:
<Regenaxer> ./pil -'stack 999' -'gc 99' ../tmp/z +
<Regenaxer> Hungry program
<Regenaxer> pil21 uses a lot more stack space
<Regenaxer> : (co 'a (yield))
<Regenaxer> -> NIL
<Regenaxer> : (let N 0 (recur (N) (recurse (printsp (inc N)) (flush))))
<Regenaxer> ... 1039 1040 104!? ((N) (recurse (printsp (inc N)) (flush))) Stack overflow
<Regenaxer>
<Regenaxer> So 1040
<Regenaxer> Same on pil64 goes up to 2477
<Regenaxer> More than double
<Regenaxer> This is for function calls
<Regenaxer> I think for 'apply' (mapping etc.) the relation is even worse
<tankf33der> i can simply do (apply * (range 1 10000))
<tankf33der> and it works.
<Regenaxer> I need to build much more nested stack structures for applies in pil21, as I cannot make assumptions about some stack details
<Regenaxer> Right, but we cannot see how much stack (ypply * ...) actually needs
<tankf33der> ok
<tankf33der> T
<Regenaxer> Not a big problem
<Regenaxer> Stack is big enough :)
<tankf33der> i disabled those fat cartesian tests.
<Regenaxer> Takes too long?
<tankf33der> its crashing.
<Regenaxer> but only for stack size?
<tankf33der> no
<tankf33der> just crashing.
<Regenaxer> hmm
<tankf33der> without this stack overflow message.
<Regenaxer> yeah, stack is ok, but without -"gc 99" it does not work
<Regenaxer> So something is not right
<Regenaxer> It needs at least ./pil -"stack 600" -"gc 16"
<Regenaxer> That -gc is needed indicates some leak
<Regenaxer> About mapping a large list above: The length of a list for the mapping functions is not relevant for stack usage
<Regenaxer> only the list to 'apply'
<Regenaxer> like (apply * (long list)) above
<Regenaxer> (map fun (long list)) is all right
<Regenaxer> (map fun ... *many* lists ...) takes up lots of stack
<tankf33der> ok
<tankf33der> i found smaller code crashing, trivial:
<tankf33der> http://ix.io/2uEd
<tankf33der> comment last apply and it will not crash
<Regenaxer> cool
<beneroth> thank you guys :)
<Regenaxer> and with -"stack 256" -"gc 32" it also does not crash
<Regenaxer> Hi beneroth
<beneroth> Heya :)
<Regenaxer> Just -gc is enough
<Regenaxer> So we have a gc issue
<Regenaxer> Perhaps my change today to src/gc.l was not enough?
<tankf33der> who knows.
<Regenaxer> At least it is good to know that the coroutines by themselves work all right
<tankf33der> afk.
<Regenaxer> thanks as ever!
razzy has joined #picolisp
orivej has joined #picolisp
casaca has quit [Remote host closed the connection]
casaca has joined #picolisp