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 [Quit: Leaving.]
patrixl has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
<Regenaxer> Fixed mapcar. Now also mapc, mapcan, filter, extract, find, pick, fully and sum. They are all analog. hairy :(
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
<beneroth> strings attached
rob_w has joined #picolisp
<Regenaxer> released
<tankf33der> no error anymore, helped on bootstrap ?
<Regenaxer> yes
<Regenaxer> bootstrap worked anyway meanwhile, the point of bug moved
<Regenaxer> (Heisenbug)
<tankf33der> ah.
<tankf33der> and this could be cought ?
<tankf33der> and how this could be caught ?
<Regenaxer> Caught in which way?
<Regenaxer> It happened by chance
<Regenaxer> Then you found the reason
<Regenaxer> mapcar and/or perhaps one of the other functions
<tankf33der> question was how correctly prove function is gc safe ?
<Regenaxer> I sometimes prepare src/gc.l, so that it calls (gc) *each* time
<Regenaxer> ie not only (when (=0 P)
<Regenaxer> when Avail is empty
<Regenaxer> I do yhis for cons, cons3, consSym etc.
<Regenaxer> all functions in the end of src/gc.l
<Regenaxer> Programs get very slow, but this guarantees that gc is triggered everywhere
<Regenaxer> Still no guarantee that it crashes, but with high prorability
<tankf33der> will do.
<Regenaxer> cool
<Regenaxer> http://ix.io/2oNY
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der> http://ix.io/2oO0
<tankf33der> immediately crash after statrup
<Regenaxer> sorry, interrupted
<Regenaxer> ah, sorry*
<Regenaxer> I forgot
<Regenaxer> gc should not run too early, during initialization
<Regenaxer> so it is more complicated
<Regenaxer> I used $Dbg and set it after initialization
<tankf33der> after initialization of what ?
<Regenaxer> The symbol table
<Regenaxer> Just before the repl is started
<Regenaxer> Hmm, but which global to use?
<Regenaxer> $Dbg is not good perhaps
<Regenaxer> You could use $Jam
<Regenaxer> In 'main' before the final loop (set $Jam YES)
<Regenaxer> and in gc (when (val $Jam) ..
<tankf33der> how code should be then?
<tankf33der> i see
<Regenaxer> Sorry, I have done this only in the beginning when designing gc
<Regenaxer> Recently not much systematic testing, as I first want to get the internal structures stable
orivej has quit [Read error: Connection reset by peer]
orivej_ has joined #picolisp
<tankf33der> http://ix.io/2oO6
<tankf33der> pil started
<Regenaxer> perfect :)
<tankf33der> # /root/pil21/bin/picolisp
<tankf33der> : (range 1 100000)
<tankf33der> Segmentation fault
<Regenaxer> oha
<tankf33der> (range 1 100000) - crash
<tankf33der> (range 1 10000) - ok
<tankf33der> (range 1 1000) - ok
<tankf33der> afk.
<Regenaxer> thanks
<Regenaxer> I'm also at project work. Will check later
<tankf33der> (need 1000) - ok
<tankf33der> (need 100000) - crash
<Regenaxer> hmm, if range or need were wrong, they would crash immediately
<Regenaxer> also, range looks good
<Regenaxer> Anyway, sorry, can't concentrate now
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
<tankf33der> (make (for N 100000 (link N))) - crash
<tankf33der> (make (for N 10000 (link N))) - ok
<Regenaxer> Really strange
<Regenaxer> that it crashes in long loops but not immediately
<Regenaxer> What kind of crash is it? Segfault?
<tankf33der> llvm7 the same as llvm10
<Regenaxer> This should not matter, I believe
<Regenaxer> I don't use any version-specific features (I hope ;)
<Regenaxer> Are the crashes segfaults?
<tankf33der> trying get coredump file
<Regenaxer> ok, good
<Regenaxer> I think make, link or range are not the problem. Perhaps it is a bug in 'gc' itself?
<tankf33der> sure.
<tankf33der> out of functions scope.
<Regenaxer> Well, the crash is usually always inside 'gc'
<Regenaxer> but the reason typically are non-safe data
<Regenaxer> They are overwritten somewhere, and *later* strange things happen
<Regenaxer> (or not
<Regenaxer> )
<tankf33der> http://ix.io/2oOs
<tankf33der> : (range 1 100000)
<tankf33der> Segmentation fault (core dumped)
<tankf33der> # ./picolisp
<Regenaxer> ok
<Regenaxer> No indication for the reason though
<tankf33der> as is.
<Regenaxer> Did you put this $Jam check only in cons
<Regenaxer> or also into all other following?
<tankf33der> http://ix.io/2oO6
<tankf33der> only this.
<Regenaxer> The other are needed too
<tankf33der> i dont understand how to modify cons3 and consSym, dont have time and energy to experiment.
<Regenaxer> ok, but it is exactly the same
<Regenaxer> just replace (=0 P)
<Regenaxer> with (val $Jam)
<Regenaxer> So the code triggers always instead of empty avail list
<Regenaxer> But ok, don't worry. Perhaps this is not a good idea for other reasons too
<tankf33der> http://ix.io/2oOv
<tankf33der> under valgrind.
<Regenaxer> same
<Regenaxer> Heap corrupted after gc
<Regenaxer> in cons after gc I believe
<Regenaxer> Cant be seen here, needs gdb
<Regenaxer> anyway, this does not help, too late
<Regenaxer> corruption happens a long time before that
<tankf33der> one more thing:
<tankf33der> (range 1 100000) - crash
<tankf33der> (gc)(range 1 100000) - ok
<tankf33der> from two independent sessions.
<Regenaxer> ok
<tankf33der> from two independent repl sessions.
<Regenaxer> It must have to do with allocating the next heap chunk
<Regenaxer> as I said, problem *inside* gc
<tankf33der> T
<Regenaxer> With your test, it calls gc for every cell, but the heap gets bigger
<Regenaxer> so at some point another heap is alloc()ed
<Regenaxer> there must be something wrong
<Regenaxer> I dig into it visually
<tankf33der> cool.
razzy has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
<Regenaxer> Looks all good
<Regenaxer> and also, it works without the debug-gc
<Regenaxer> I finish signals first
<Regenaxer> In any case, I'm glad we found the error in the mapping functions!
<Regenaxer> This is really hardcore stuff
<Regenaxer> You see the complexity if you look at the stack diagram below "Apply args:" in doc/structures
<Regenaxer> And this diagram shows only one part of the data being saved
<Regenaxer> The other part are the argument data. Tey are stored in a separat spaghetti stack
<Regenaxer> all mangled on a single stack :)
Blukunfando has joined #picolisp
<tankf33der> eh.
<Regenaxer> I got the make error again!
<Regenaxer> So we have still a similar issue somewhere
<rob_w> makefile errors ?
<Regenaxer> Not make itself, but the pil21 process building pil21
<Regenaxer> ok, basic signals work
<Regenaxer> : (loop (println (inc (0))) (wait 1000))
<Regenaxer> 1
<Regenaxer> 3
<Regenaxer> 2
<Regenaxer> (wait 1000)
<Regenaxer> ! # Ctrl-C hit
<Regenaxer> Not released yet, not completely finished
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
<aw-> hi all
<aw-> i'm looking for a simpler way to write this:
<Regenaxer> Hi aw-
<aw-> (filter '((N) (unless (= (car N) Value) N)) *Mylist)
<aw-> i feel like this is wrong
<Regenaxer> (filter '((N) (<> N Value) ... ?
<Regenaxer> is the car needed?
<Regenaxer> (filter '((X) (<> (car X) Value) ... ?
<Regenaxer> (filter '((X) (<> (car X) Value)) *Mylist)
<aw-> (setq *Mylist (list (cons "one" 1) (cons "two" 2) (cons "three" 3)))
<aw-> (filter '((N) (unless (= (car N) "two") N)) *Mylist)
<Regenaxer> ok
<aw-> trying to remove one entry from the list based on the car
<Regenaxer> (filter '((X) (<> (car X) "two")) *Mylist)
<aw-> hmmm... looks similar
<Regenaxer> yes, but the 'unless' is a tautology
<aw-> i tried with (delete)
<Regenaxer> delete looks at elements, not the CARs
<Regenaxer> and 'assoc' searches only the first
<Regenaxer> *for the first
<aw-> yeah it didnt work for a list of lists
<Regenaxer> 'group' would work, but is more expensive
<Regenaxer> and also not really useful
<Regenaxer> filter is fine I think
<aw-> oh ok
<aw-> i will try with (<>)
<aw-> thanks!
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
razzy has quit [Quit: Connection closed]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
Blukunfando has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
orivej has joined #picolisp
orivej_ has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
twelvemonkeys has quit [Ping timeout: 246 seconds]
twelvemonkeys has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]
stultulo has joined #picolisp
f8l has quit [Ping timeout: 264 seconds]
stultulo is now known as f8l
stultulo has joined #picolisp
f8l has quit [Ping timeout: 246 seconds]
stultulo is now known as f8l
stultulo has joined #picolisp
f8l has quit [Ping timeout: 256 seconds]
stultulo is now known as f8l
stultulo has joined #picolisp
f8l has quit [Ping timeout: 258 seconds]
stultulo is now known as f8l