<
tankf33der>
morning
<
tankf33der>
found pil crashing
<
Regenaxer>
Hi tankf33der!
<
tankf33der>
yeah, simpler code ok
<
Regenaxer>
gc issue perhaps?
<
tankf33der>
it crashes when this change:
<
tankf33der>
crash not in this line, but dipper inside function
<
Regenaxer>
I think 'or' or '=' are not the reason
<
Regenaxer>
Can you find out where it crashes? core file
<
Regenaxer>
Probably 'gc'
<
tankf33der>
finally
<
tankf33der>
this is smallest code crashes
<
tankf33der>
crashes around **Mod call
<
tankf33der>
trying get backtrace from core
<
Regenaxer>
On Termux it does not crash. I try Debian
<
Regenaxer>
Floating point exception
<
tankf33der>
backtrace tells about _rand function
<
tankf33der>
i think you are trivially smashing the stack
<
Regenaxer>
I check
<
tankf33der>
even simpler code
<
Regenaxer>
cool, thanks!
<
Regenaxer>
In Pil Floating point exception is usually a division by zero
<
Regenaxer>
but 'rand' does not divide
<
Regenaxer>
haha, tankf33der, it is even a lot simpler
<
Regenaxer>
$ pil21/pil -"trace 'rand"
<
Regenaxer>
rand : 2 1
<
Regenaxer>
Floating point exception
<
Regenaxer>
$ pil21/pil +
<
Regenaxer>
: (rand 2 1)
<
Regenaxer>
Floating point exception
<
tankf33der>
Ah, right
<
Regenaxer>
Is this new?
<
Regenaxer>
It happens also in the Debian testing
<
Regenaxer>
(21 6 30)
<
Regenaxer>
I think 'rand' expects (rand <from> <to>)
<
tankf33der>
correct, but i am using it wrongly
<
tankf33der>
my fault :)
<
Regenaxer>
I tried on Arm/Termux
<
Regenaxer>
it does not crash, but returns nonsens
<
Regenaxer>
I add a check
<
Regenaxer>
return NIL
<
Regenaxer>
or do something reasonable
<
Regenaxer>
I check
<
Regenaxer>
Thanks for finding!!
<
Regenaxer>
Also negative arguments
<
Regenaxer>
I see. 'rand' does not divide, but uses '%'
<
Regenaxer>
which is also a division
<
Regenaxer>
I think it is best if 'rand' throws an argument error
<
tankf33der>
Let it be this away.
<
Regenaxer>
Without check?
<
tankf33der>
Throw error after check
<
Regenaxer>
I better check for negative numbers, and second >= first
inara has quit [Quit: Leaving]
inara has joined #picolisp
<
Regenaxer>
Fixed it. Testing.
<
Regenaxer>
Released
<
tankf33der>
what about negative arguments, I thout rand should support it
<
tankf33der>
it worked before
<
Regenaxer>
I think it never worked
<
Regenaxer>
I tried also pil64
<
Regenaxer>
: (rand -1 -9)
<
Regenaxer>
-> 1481765932
<
tankf33der>
leave it as is
<
Regenaxer>
I add a note to the reference
<
tankf33der>
all tests passed.
<
Regenaxer>
Great :)
<
tankf33der>
it is so hard to code after long pause, almost impossible.
<
Regenaxer>
Why did you pause?
<
Regenaxer>
Changed also doc/refR.html
<
tankf33der>
was a rest.
<
tankf33der>
i am implementing integer factoring - Pollard's rho method.
<
tankf33der>
faster than trial division.
<
tankf33der>
my long time wish to implement something faster than exponential.
<
Regenaxer>
Is it a rosetta task?
<
tankf33der>
yeap :)
aw- has joined #picolisp
aw- has quit [Client Quit]
aw- has joined #picolisp
razzy has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
razzy has quit [Quit: Lost terminal]
razzy has joined #picolisp
<
razzy>
i remember why i dislike locate. because i search for file after changes and updatedb takes too long.
<
Regenaxer>
Me too, I prefer 'find' and similar tools
<
Regenaxer>
Slower, but does not on a possiblt outdated database
<
Regenaxer>
I search locally, knowing roughly were things are. updatedb indexes everything, so locate outputs tons of hits which have to be filtered
razzy has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
razzy has quit [Quit: leaving]
theruran has quit [Quit: Connection closed for inactivity]
wineroots has joined #picolisp
beneroth has joined #picolisp