03:56
_whitelogger has joined #picolisp
05:00
razzy has joined #picolisp
06:34
rob_w has joined #picolisp
08:16
<
tankf33der >
Regenaxer: what if after leak fix it can run in 8k stack
08:19
<
Regenaxer >
It cannot run in 8k now?
08:19
<
Regenaxer >
I depends what you call
08:21
<
Regenaxer >
I have not searched for the places yet where 'save' is called in some kind of loop. Maybe not so many
08:22
<
Regenaxer >
In those places it depends how often the loop is executed. It uses more and more stack in each iteration
08:22
<
Regenaxer >
only a few bytes
08:24
<
Regenaxer >
Perhaps I can look this evening
08:24
twelvemonkeys has quit [Ping timeout: 246 seconds]
08:26
twelvemonkeys has joined #picolisp
08:27
<
tankf33der >
this is llvm or your leak
08:27
<
Regenaxer >
My leak of course
08:27
<
tankf33der >
huge.l can be run in 8k for years
08:27
<
Regenaxer >
The heap size is not an issue
08:28
<
Regenaxer >
Only how often a loop is executed
08:38
<
Regenaxer >
Perhaps there are not as many cases as I was afraid of
08:40
<
Regenaxer >
The 'del' function is the one I saw yesterday
08:40
<
Regenaxer >
if you pass a var with a very long list
08:41
<
Regenaxer >
each iteration uses 16 byte
08:41
<
Regenaxer >
Hi beneroth
08:41
<
beneroth >
Regenaxer, what do you think about +Key and partial string indexing?
08:42
<
beneroth >
would be (+IdxFold +Key +String) okay?
08:42
<
beneroth >
partial indexing for partial search
08:42
<
Regenaxer >
OK if they don't collide
08:43
<
beneroth >
ah, the +Key than applies to all parts?
08:43
<
beneroth >
so substrings?
08:43
<
Regenaxer >
There is no 'select' filter predicate for such a combination
08:43
<
beneroth >
the whole string is unique, but parts collide
08:43
<
Regenaxer >
+IdxFold AND +Key
08:44
<
Regenaxer >
You could try
08:44
<
beneroth >
what do you recommend? staying with just (+IdxFold +String) or (+Key +String) instead?
08:45
<
beneroth >
it's kind of a value table
08:46
<
Regenaxer >
I don't know atm whether the above combination works. Perhaps it does
08:46
<
beneroth >
ok, I'll find out
08:46
<
beneroth >
unless you say it's stupid :)
08:47
<
Regenaxer >
Not sure ;)
08:47
<
beneroth >
another option would be splitting it into 2 properties
08:47
<
beneroth >
one for +Key and one for partial string search
08:47
<
beneroth >
but kinda... spacey
08:48
orivej has joined #picolisp
08:48
<
Regenaxer >
I think it may work. (+Sn +Idx... is something similar
08:48
<
Regenaxer >
as (+Key +IdxFold ...
08:49
<
beneroth >
I think it will not work
08:49
<
beneroth >
I want (+IdxFold +Key +String). But I guess either way the substrings are expected to be unique
08:50
<
beneroth >
hmmm I don't have many values here
08:50
<
beneroth >
forgot that. I just keep it (+Key +String) and make a full scan for partial matches
08:50
<
Regenaxer >
ok, saves space at least
08:50
<
beneroth >
but I will think a bit more about the +Key +Idx story
09:08
mario-go` has joined #picolisp
09:08
lodsw has quit [Ping timeout: 265 seconds]
09:08
mario-goulart has quit [Remote host closed the connection]
09:11
Regenaxer has quit [Ping timeout: 246 seconds]
09:12
lodsw has joined #picolisp
09:16
orivej has quit [Quit: No Ping reply in 180 seconds.]
09:17
orivej has joined #picolisp
09:32
orivej_ has joined #picolisp
09:32
orivej has quit [Ping timeout: 256 seconds]
09:40
orivej_ has quit [Ping timeout: 246 seconds]
09:41
orivej has joined #picolisp
09:45
Regenaxer has joined #picolisp
09:57
orivej has quit [Ping timeout: 265 seconds]
09:57
orivej_ has joined #picolisp
10:01
<
beneroth >
Regenaxer, what is the best way to check if a symbol has (any) properties or not?
10:07
<
tankf33der >
would say, yes
10:08
<
tankf33der >
beneroth: you dont have big list to choose from
10:09
<
beneroth >
thanks tankf33der :))
10:09
<
beneroth >
I just wondered if there might be another way
10:17
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
10:19
orivej has joined #picolisp
10:36
libertas has joined #picolisp
10:47
<
Regenaxer >
Hmm, getl is not good, as it conses a list
10:47
<
Regenaxer >
But there is no direct function
10:48
<
Regenaxer >
Could check with 'adr' whether the tail is a number
10:48
<
Regenaxer >
But I think this is not a good idea anyway
10:48
<
Regenaxer >
There might be other, non-related, properties
10:48
<
Regenaxer >
So the list is not empty despite your app did not put any
10:49
<
Regenaxer >
Better keep track in some other way
10:58
orivej has quit [Quit: No Ping reply in 180 seconds.]
11:00
orivej has joined #picolisp
11:21
<
beneroth >
Regenaxer, yeah I guessed that getl is constructing
11:21
<
beneroth >
it is about a (box), so there will be no properties beside the ones I added, I believe
11:23
<
Regenaxer >
Probably, but the principle of properties is that they are freely added or removed
11:23
orivej has quit [Quit: No Ping reply in 180 seconds.]
11:24
<
Regenaxer >
Are these DB symbols? If so, there is 'lieu'
11:24
orivej has joined #picolisp
11:33
orivej_ has joined #picolisp
11:34
<
beneroth >
no (box), used to collect values during import, before validating the values and store them in the database
11:36
orivej has quit [Ping timeout: 256 seconds]
11:41
<
Regenaxer >
Why got an association list, or idx?
11:41
<
Regenaxer >
why *net
11:41
<
Regenaxer >
(I'm
*lying* on the couch and can't write ;)
11:53
orivej has joined #picolisp
11:55
orivej_ has quit [Ping timeout: 260 seconds]
12:03
orivej has quit [Quit: No Ping reply in 180 seconds.]
12:04
orivej has joined #picolisp
12:09
<
Regenaxer >
Oh, closer inspection shows thatd'del' is ok
12:13
orivej_ has joined #picolisp
12:14
twelvemonkeys has quit [Ping timeout: 260 seconds]
12:14
orivej has quit [Read error: Connection reset by peer]
12:15
twelvemonkeys has joined #picolisp
12:31
<
tankf33der >
added non crypto hash functions to pil21-test repo
12:41
<
Regenaxer >
I'm stupid! The 'save' stack leaks are not a problem :) Most cases where 'save' is in a loop are correct, eg in the map functions. The only bad one is in 'repl', will fix
12:43
orivej_ has quit [Ping timeout: 260 seconds]
12:43
orivej has joined #picolisp
12:55
rob_w has quit [Quit: Leaving]
13:05
razzy has quit [Quit: Connection closed]
13:06
<
Regenaxer >
Now investigating the gc bug during build
13:10
orivej has quit [Ping timeout: 256 seconds]
13:11
orivej has joined #picolisp
13:15
<
Regenaxer >
It is not a gc bug
13:18
<
tankf33der >
not a bug?
13:18
<
Regenaxer >
It is a bug
13:18
<
Regenaxer >
But -"gc 400" does not change anything
13:18
<
Regenaxer >
I strange bug
13:18
<
Regenaxer >
Only a single line in base.ll is different
13:19
<
Regenaxer >
a comment line
13:19
orivej has quit [Ping timeout: 260 seconds]
13:19
orivej has joined #picolisp
13:20
<
Regenaxer >
Args is printed without namespace prefix in pil21
13:43
<
beneroth >
yeah yeah that namespacing... ;-)
13:43
<
beneroth >
Regenaxer, mostly to make use of the built-in "redef" warning
13:43
<
Regenaxer >
Now I see that it is in fact not a bug
13:43
<
beneroth >
idx with a (Key . Val) could also be used, aye
13:43
<
beneroth >
whats your common pattern for such tasks?
13:44
<
beneroth >
Regenaxer, oh what is it then? conceptual error?
13:44
<
beneroth >
ordering?
13:44
<
Regenaxer >
It is just that when building with standard pil it
*does* have a symbol Args
13:44
<
beneroth >
is the stuff already present you refer to at that stage?
13:44
<
Regenaxer >
which overshadows that in priv
13:45
<
Regenaxer >
So it print correctly with a prefix :)
13:45
<
Regenaxer >
beneroth, which stuff?
13:46
<
Regenaxer >
Anyway, the printed comment is correct
13:47
<
Regenaxer >
So the question is if there is still another bug in build, which just does not show up currently
13:48
Guest83967 has quit [Quit: irc_error]
13:48
Guest83967 has joined #picolisp
13:48
<
beneroth >
stuff = internal symbols. I have no idea what I'm talking about
13:49
<
Regenaxer >
well, yes
13:49
<
Regenaxer >
at least one symbol, 'Args'
13:49
<
beneroth >
yeah ;-)
13:49
<
Regenaxer >
It is in standard pil, but not (yet) in pil21
13:50
<
Regenaxer >
So everything correct
13:50
<
Regenaxer >
printing without prefix in the comment
13:50
<
Regenaxer >
I print the Lisp expression as a comment into src/base.ll during build
13:52
<
Regenaxer >
I think it comes from lib/pilog.l in standard pil
13:53
<
Regenaxer >
in pil21 lib/pilog.l has its own private namespace
13:53
Guest83967 is now known as Blue_flame
13:54
<
beneroth >
has pil21 (nsp) yet? :P
13:54
<
Regenaxer >
I used it now to find out why the output is different
14:06
orivej has quit [Quit: No Ping reply in 180 seconds.]
14:08
orivej has joined #picolisp
14:08
<
Regenaxer >
tankf33der, what do you wish next in pil21?
14:09
<
Regenaxer >
Should we start with 'native'? I is a tough issue, I avoided until now ;)
14:10
<
tankf33der >
did you fixed everything related to gc?
14:11
<
Regenaxer >
no idea
14:11
<
Regenaxer >
no symptoms atm
14:12
<
tankf33der >
then try read issue.md file
14:12
<
Regenaxer >
Perhaps it was fixed in the course of other changes, perhaps not
14:12
<
Regenaxer >
OK, I did
14:12
<
Regenaxer >
that's why I fixed the map functions
14:13
<
Regenaxer >
# eval does not apply
14:13
<
Regenaxer >
no more env offsets
14:14
<
Regenaxer >
the test must be changed
14:14
<
Regenaxer >
only '@' is handled by the env offset
14:14
<
Regenaxer >
Same for 'run'
14:15
<
Regenaxer >
doc/diff:
14:15
<
Regenaxer >
- Lambda-binding environment offset for 'eval' and 'run' only for '@'
14:17
<
Regenaxer >
'dm' is not implemented at all yet, see src/flow.l
14:17
<
Regenaxer >
(de _dm (Exe)
14:18
<
Regenaxer >
So perhaps 'dm' next?
14:19
<
tankf33der >
implement comparing
14:19
<
tankf33der >
that look at left
14:19
<
tankf33der >
< and so on
14:19
<
Regenaxer >
Comparing is there, only the high level funs are missing
14:20
<
Regenaxer >
they are all the same
14:20
<
Regenaxer >
So better not too early I though, they give no now insights
14:21
<
Regenaxer >
'>' and '>=' is there
14:22
<
tankf33der >
dm then, better fix from top to bottom
14:22
<
Regenaxer >
OK. But then perhaps I should really try 'native' to see if everything works out
14:22
<
tankf33der >
will play with sha512, why it crashes
14:22
<
Regenaxer >
ok, great
14:23
<
Regenaxer >
Crashes are the most interesting things atm
14:23
<
tankf33der >
(gc 64) saves, so this is gc issue
14:23
<
Regenaxer >
they may indicate a general problem
14:23
<
Regenaxer >
Perhaps we can find that
14:24
<
Regenaxer >
Can you try to test the functions used by sha512 individually?
14:24
<
Regenaxer >
To see
*which* one
14:24
<
Regenaxer >
I do 'dm' meanwhile
14:25
<
tankf33der >
all crypto is ok and quite the same, except sha512 so this is gc or cons
14:25
<
Regenaxer >
cons is simple, probably ok
14:26
<
Regenaxer >
(if not a fundamental systematic error)
14:26
<
tankf33der >
but gc 64 saves then this is not an any function issue
14:26
<
Regenaxer >
You cant say so
14:27
<
Regenaxer >
gc 64 just causes gc
*not* to run later
14:27
<
tankf33der >
what is simplest way generate lists and run gc often?
14:27
<
tankf33der >
idea to generate lists of different length
14:28
<
tankf33der >
also get backtrace from core file
14:28
<
Regenaxer >
But then you always test 'list' or 'cons' which are probably ok
14:28
<
Regenaxer >
Does sha512 use any special functions?
14:28
<
Regenaxer >
any other?
14:29
<
tankf33der >
cut conc list
14:29
<
tankf33der >
i will try first find the test where crash happens
14:29
<
Regenaxer >
Can you point me to the source?
14:31
<
tankf33der >
it happens after latest mapcan
14:32
<
tankf33der >
or inside it, or inside list creation for mapcan
14:32
<
Regenaxer >
When it happens it is already a long time after the bug
14:32
<
Regenaxer >
gc is just the symptom usually, not the reason
14:32
<
Regenaxer >
unless, of course, gc itself is buggy
14:32
<
Regenaxer >
Let's see ...
14:36
<
Regenaxer >
One more question? How do you call (d512 ...)?
14:37
<
Regenaxer >
(d512 (range 1 9)) works ;)
14:38
<
Regenaxer >
(d512 (range 1 999999)) also
14:45
<
Regenaxer >
As for the issues, 'finally' is also not implemented yet
14:45
<
Regenaxer >
(de _finally (Exe)
14:46
<
Regenaxer >
Also coroutines are just a skeleton, a proof of concept initially
14:46
<
Regenaxer >
So as I said, you tested too early
14:47
<
Regenaxer >
the 'need' issue is fixed
14:47
<
Regenaxer >
'memq' too
14:48
<
Regenaxer >
So the first item in issues is 'fill'
14:48
<
Regenaxer >
I fix that now
14:52
orivej_ has joined #picolisp
14:52
orivej has quit [Ping timeout: 265 seconds]
14:56
<
Regenaxer >
'fill' is fixed
14:58
<
Regenaxer >
oops, not the second one
15:05
<
Regenaxer >
ok, now second issue too
15:05
<
Regenaxer >
released
15:29
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
15:31
orivej has joined #picolisp
15:40
orivej has quit [Ping timeout: 256 seconds]
15:40
orivej has joined #picolisp
15:48
orivej has quit [Quit: No Ping reply in 180 seconds.]
15:49
orivej has joined #picolisp
16:05
orivej has quit [Quit: No Ping reply in 180 seconds.]
16:07
orivej has joined #picolisp
16:15
orivej has quit [Ping timeout: 246 seconds]
16:15
orivej has joined #picolisp
16:24
twelvemonkeys has quit [Ping timeout: 260 seconds]
16:25
twelvemonkeys has joined #picolisp
16:31
orivej has quit [Ping timeout: 246 seconds]
16:31
orivej has joined #picolisp
16:46
orivej has quit [Quit: No Ping reply in 180 seconds.]
16:47
orivej has joined #picolisp
16:51
<
tankf33der >
so debug flag matters.
16:51
<
tankf33der >
playing with sha512
16:52
<
Regenaxer >
Debug mode loads more things, so the point of error moves
16:53
<
tankf33der >
when i insert println in sha512 function crash disappears
16:53
<
Regenaxer >
Yes, that's normal with this kind of bug
16:54
<
Regenaxer >
gc must run just at the right moment
16:54
<
Regenaxer >
Just playing does not help, we must locate the faulty function(s)
16:54
<
Regenaxer >
It can be anything
16:55
<
Regenaxer >
sha512 calls dozens of functions
16:55
<
Regenaxer >
arithmetics, lists functions etc
16:55
<
tankf33der >
its latest mapcan
16:55
<
tankf33der >
proven
16:55
<
Regenaxer >
Can be
*any* function
16:56
<
Regenaxer >
even 'let' if it destroys the stack
16:57
<
Regenaxer >
I asked above:
16:57
<
Regenaxer >
One more question? How do you call (d512 ...)?
16:57
<
Regenaxer >
(d512 (range 1 9)) works ;)
16:57
<
Regenaxer >
(d512 (range 1 999999)) also
16:57
<
Regenaxer >
How to call it?
17:08
<
tankf33der >
via test function
17:08
<
tankf33der >
read official test vectors and run and comparer
17:08
<
tankf33der >
read official test vectors and run and compare
17:08
<
tankf33der >
you could clone repo or download related files.
17:11
<
tankf33der >
this is not mapcan because mapcar crashed too
17:11
<
tankf33der >
this is not mapcan because mapcar crashed too
17:12
<
Regenaxer >
"this" ?
17:13
<
tankf33der >
mapcan crashed and mapcar too
17:13
<
tankf33der >
so this is something else inside
17:13
<
Regenaxer >
All map functions have very similar code
17:13
<
Regenaxer >
If one is wrong, all are
17:13
<
Regenaxer >
As a few days ago
17:14
<
Regenaxer >
The bug with the atomic tail
17:14
<
Regenaxer >
I changed
17:14
<
Regenaxer >
all map functions, see repo
17:14
<
Regenaxer >
So I thin map is not the problem
17:15
<
Regenaxer >
I thought very much about it several times
17:15
orivej has quit [Quit: No Ping reply in 180 seconds.]
17:17
<
Regenaxer >
It can be any function in sha512.l, or some other function called e.g. by 'hex'
17:17
orivej has joined #picolisp
17:19
<
Regenaxer >
Most calls are arithmetics, so the probability is high that it is one of the arithmetic functions
17:19
<
Regenaxer >
The calculations are all bignum, cause 64 bit don't fit into a short
17:19
<
tankf33der >
if i change something inside latest mapcan crash disappears
17:20
<
Regenaxer >
This does not mean anything
17:20
<
Regenaxer >
Change something else too and it may re-appear
17:21
<
Regenaxer >
How do you know that mapcan crashed?
17:22
<
Regenaxer >
What we need is a more isolated test, with fewer functions
17:22
<
tankf33der >
changing (let R in mapcan for
17:22
<
tankf33der >
(let R (list 1) ...
17:24
<
Regenaxer >
Remember: If it is really a corrupted stack or heap, the crash occurs at some random point much later
17:24
<
tankf33der >
but when i change (for (I 17 (>= 80 I) (inc I))
17:24
<
tankf33der >
(for (I 17 (>= 20 I) (inc I))
17:24
<
tankf33der >
it appears again.
17:25
<
Regenaxer >
We need a simpler test :)
17:25
<
tankf33der >
it will disappear
17:37
<
Regenaxer >
On the other hand have we tested arithmetics a lot with bigtest(s)
17:39
<
tankf33der >
yes, tested. in general they are all ok.
17:39
<
tankf33der >
even 20k digits.
17:39
<
tankf33der >
even on 20-30k digits.
17:42
<
tankf33der >
even if i call sha512 from test-sha512.l like this it crashes:
17:42
<
tankf33der >
(sha512 (make (do 64 (link (rand 0 255)))))
17:43
<
tankf33der >
so I dont use K and C read from test vector file.
17:45
<
tankf33der >
sha512 and sha256 so equal, use the same functions. like copy-paste brothers
17:45
<
tankf33der >
but sha256 dont crash.
17:46
<
Regenaxer >
Hmm, here it does not crash
17:46
<
Regenaxer >
(loop (sha512 (make (do 64 (link (rand 0 255))))) (msg (inc (0))))
17:47
<
tankf33der >
i meant use in test-sha512.l file
17:47
<
tankf33der >
in standalone of course its ok.
17:48
<
tankf33der >
if i call sha512 function from test-sha256.l file it dont crash.
17:48
orivej has quit [Ping timeout: 260 seconds]
17:48
orivej_ has joined #picolisp
17:55
<
tankf33der >
if i remove even one test vector from file crash disappears
17:55
<
Regenaxer >
Heisenbug
17:56
<
tankf33der >
maybe it is possible to run it under debug output
17:57
<
Regenaxer >
This will give no hint what is wrong
17:57
<
Regenaxer >
The only way is to find simpler tests
18:00
orivej_ has quit [Ping timeout: 264 seconds]
18:01
orivej has joined #picolisp
18:01
<
Regenaxer >
ideally with one single function ;)
18:02
<
tankf33der >
no way to do it
18:02
<
Regenaxer >
Looks like we must modify src/gc.l again
18:03
<
Regenaxer >
so that it crashes more near or inside the function
18:05
<
tankf33der >
even if i add one (gc) call crash disappears.
18:05
<
Regenaxer >
Then add more and more until it appears again ;)
18:07
<
Regenaxer >
But no, adding gc on the top level does not help
18:08
<
Regenaxer >
Then the bad function is always called with enough memory and will not call gc
18:08
<
Regenaxer >
In the past it helped to force gc in each cons etc
18:08
<
tankf33der >
backtrace from gdb
18:08
<
Regenaxer >
I'm walking the fields now and cannot test well
18:09
<
Regenaxer >
Perhaps it is chop
18:10
<
Regenaxer >
Can you produce more such dumps in various situations?
18:10
<
Regenaxer >
To see if it is always chop
18:10
<
Regenaxer >
I think mkChar is safe
18:10
<
Regenaxer >
Could also be _for
18:11
<
Regenaxer >
_for is very complicated
18:13
<
tankf33der >
it is always the same if I crash it in the same place.
18:13
<
Regenaxer >
So either for or chop
18:13
<
tankf33der >
if I switch crash it inside latest mapcan backtrace will be different
18:13
<
Regenaxer >
I take a look when I'm home
18:13
<
Regenaxer >
thanks!!
18:21
orivej has quit [Ping timeout: 260 seconds]
18:21
orivej has joined #picolisp
18:37
<
Regenaxer >
Intersting. It
*does* crash in 'hex'
18:37
<
Regenaxer >
Cause 'chop' inside 'for' is nowhere in sha512
18:39
<
Regenaxer >
Of course it does not guarantee that 'for' or 'chop' is faulty.
18:39
<
Regenaxer >
Can also be some function called before that
18:39
<
Regenaxer >
But 'hex' is very early, only at load time, right?
18:42
<
tankf33der >
[mpech@lambda crypto]$ cat test-sha512.l | grep chop
18:42
<
tankf33der >
(for (L (chop H) L (cddr L))
18:42
<
tankf33der >
chop inside for!
18:42
<
tankf33der >
afk, use my nickname to ping me.
18:43
<
Regenaxer >
I find no such place in sha512
18:43
<
Regenaxer >
(for (L (chop H)
18:43
<
Regenaxer >
I have only
18:43
<
Regenaxer >
(for (L (chop H)
18:43
<
Regenaxer >
(for (I 17 (>= 80 I) (inc I))
18:44
<
Regenaxer >
(for I 80
18:44
<
Regenaxer >
You have a different version
18:45
<
Regenaxer >
No hurry with pinging
18:45
<
Regenaxer >
I'm still walking
18:45
<
Regenaxer >
and then will shower
18:56
<
tankf33der >
it is in test-sha512.l
18:56
<
tankf33der >
thats why call sha512 function from test-sha256.l dont crash
18:58
<
tankf33der >
at the same time test-sha256 also have for-chop loop
19:15
orivej_ has joined #picolisp
19:17
orivej has quit [Ping timeout: 240 seconds]
19:39
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
19:40
orivej has joined #picolisp
20:29
orivej has quit [Quit: No Ping reply in 180 seconds.]
20:30
orivej has joined #picolisp
20:57
orivej has quit [Quit: No Ping reply in 180 seconds.]
20:58
orivej has joined #picolisp
21:08
orivej has quit [Quit: No Ping reply in 180 seconds.]
21:09
orivej has joined #picolisp
21:21
orivej has quit [Ping timeout: 265 seconds]
21:21
orivej_ has joined #picolisp
21:39
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
21:41
orivej has joined #picolisp
22:31
orivej has quit [Ping timeout: 246 seconds]
22:32
orivej has joined #picolisp
23:46
orivej has quit [Ping timeout: 240 seconds]
23:47
orivej has joined #picolisp