00:01
<
beneroth >
makes sense. nice idea with the additional linking!
00:02
<
beneroth >
I hadn't much need for native yet, that is the only reason I didn't do much with it. (CLI wrapping I use a lot, but usually it's not relevant for performance, so no need to go FFI)
00:03
<
aw- >
you could theoretically link with epoll as well, and then create event-based I/O code as well:
00:04
<
beneroth >
wonderful idea!
00:04
<
aw- >
native is not so easy to wrap your head around until you've actually used it
00:04
<
aw- >
also hey beneroth working late again? ;)
00:05
<
beneroth >
I'm not sure if you need epoll, can't you work the (task) mechanism for that?
00:05
<
beneroth >
s/work/use
00:05
<
beneroth >
aw-, yeah ^^'
00:05
<
aw- >
beneroth: epoll is a totally different approach
00:06
<
beneroth >
I'm kinda in the last third of rewriting my stack (new iteration)
00:08
<
aw- >
it's morning here, will have breakfast now :)
00:08
<
beneroth >
have a nice breakfast and a good day!
04:19
<
tankf33der >
Nistur: you should take a look to my pil21 test suit, it has a lot combinations and will show ideas how to create sandbox and experiment.
04:45
orivej has joined #picolisp
04:56
_whitelogger has joined #picolisp
05:16
orivej has quit [Ping timeout: 264 seconds]
05:53
stultulo has joined #picolisp
05:55
f8l has quit [Ping timeout: 264 seconds]
05:55
stultulo is now known as f8l
06:08
_whitelogger has joined #picolisp
06:41
_whitelogger has joined #picolisp
06:48
freemint has joined #picolisp
06:59
freemint has quit [Ping timeout: 256 seconds]
07:45
freemint has joined #picolisp
08:11
freemint has quit [Ping timeout: 260 seconds]
08:16
freemint has joined #picolisp
08:18
orivej has joined #picolisp
08:20
<
beneroth >
Regenaxer, I like to call a method on This, but not the method from the current class but the (super) from the parent class, how to do? just ((method ..) This ...) ?
08:21
<
beneroth >
so like (super), but the caller being another method on This, not the message we want to super
08:22
<
beneroth >
or is the only way to handle the argument specially in the called method (invoking super) ?
08:27
<
beneroth >
hm.. turned out I don't need that
08:27
orivej has quit [Ping timeout: 240 seconds]
08:27
<
beneroth >
but still I would like to know... :-)
08:28
orivej has joined #picolisp
08:28
<
beneroth >
direct method invocation must be bad because there is no message passing environment, I think
08:29
freemint has quit [Quit: Leaving]
08:29
<
Regenaxer >
Hmm, I use (method 'foo2> '+Cls2) sometimes
08:30
<
Regenaxer >
also directly:
08:30
<
Regenaxer >
(dm zuCaption> ()
08:30
<
Regenaxer >
~(method 'zuCaption> '+lf) )
08:30
<
beneroth >
ah and This is still bound to the current object, therefore it is okay?
08:31
<
beneroth >
(not This changing to '+Cls2 ?)
08:31
<
Regenaxer >
It is just method sharing
08:31
<
Regenaxer >
not changing
08:31
<
Regenaxer >
just reuse the code
08:31
<
beneroth >
ok, therefore (super) (extra) etc. can still work :)
08:31
<
beneroth >
yeah nice
08:31
<
beneroth >
my use case was method A decorating the super method, and method B invoking directly the super method
08:32
<
beneroth >
thanks, I save this as a note :)
08:32
<
beneroth >
kinda funny I never needed Class-specific method invocation
08:34
<
beneroth >
~(method 'zuCaption> '+lf) is beautiful :))
08:34
<
beneroth >
code is data :))
08:35
<
beneroth >
Regenaxer, can we be arrogant smugs about other Lisps neglecting List Processing? :P
08:37
<
Regenaxer >
I don't know enough about other Lisps ;)
08:40
<
beneroth >
tztztz, you're caring too less about other languages and programming fashions ;-)
08:42
<
Regenaxer >
true, very lazy
08:42
<
beneroth >
you get stuff done
08:43
<
Regenaxer >
yeah, it is more efficient for me
08:43
<
beneroth >
merely procrastinating by learning what other people do is lazy (unless one is a journalist, I guess)
08:43
<
Regenaxer >
But it would be wise to look more at other stuff
08:44
<
beneroth >
you look at Knuth, good enough
08:44
<
beneroth >
if you would look at more stuff, you would get confused and your output diluted, I suspect
08:44
<
beneroth >
it's the trap most other fall in
08:44
<
beneroth >
well maybe you wouldn't
08:45
<
beneroth >
but there is only so much time
08:46
<
beneroth >
most programmers don't control the stack their working with. most don't care, even. therefore so many things get redone endlessly and are full of bugs.
08:47
<
beneroth >
hard to control for bugs if you don't control the stack, especially when the stack gets updates every two weeks...
08:51
orivej has quit [Quit: No Ping reply in 180 seconds.]
08:51
orivej has joined #picolisp
08:59
orivej has quit [Read error: Connection reset by peer]
08:59
orivej has joined #picolisp
09:01
<
Regenaxer >
yes, it is a very nice feeling to be in control
09:09
orivej has quit [Quit: No Ping reply in 180 seconds.]
09:11
orivej has joined #picolisp
09:13
<
beneroth >
I love that everything in PicoLisp is just PicoLisp.
09:14
<
Regenaxer >
With pil21 we have a little more dependencies though: libffi and libreadline
09:20
orivej has quit [Ping timeout: 240 seconds]
09:21
orivej has joined #picolisp
09:21
<
beneroth >
we get something in exchange
09:23
<
beneroth >
and we're aware of the price, I'd believe
09:38
orivej has quit [Ping timeout: 256 seconds]
09:38
orivej has joined #picolisp
10:04
orivej has quit [Ping timeout: 256 seconds]
10:04
orivej has joined #picolisp
10:12
aw- has quit [Quit: Leaving.]
10:12
aw- has joined #picolisp
10:12
aw- has quit [Client Quit]
10:12
aw- has joined #picolisp
10:12
orivej has quit [Ping timeout: 264 seconds]
10:12
aw- has quit [Client Quit]
10:13
orivej has joined #picolisp
10:18
aw- has joined #picolisp
10:40
<
tankf33der >
Regenaxer: hi
10:40
<
tankf33der >
why this code is ok on pil64 and different on pil21
10:42
<
Regenaxer >
Hi tankf33der
10:42
<
Regenaxer >
uint8_t b;
10:42
<
Regenaxer >
the first element must be a byte
10:43
<
Regenaxer >
The question is how this struct is aligned
10:43
<
Regenaxer >
it wont use a single byte probably
10:43
<
Regenaxer >
So what is the offset to uint32_t i;
10:43
<
Regenaxer >
depends on the compiler settings
10:46
<
tankf33der >
-123 is a byte
10:46
<
tankf33der >
aligned is: 0 4 8
10:47
<
tankf33der >
last digits of addresses ^^^^
10:47
<
tankf33der >
without pads.
10:47
<
Regenaxer >
A byte is a positive number, no?
10:47
<
tankf33der >
-123 is positive number
10:48
<
Regenaxer >
yes, but 4 bytes, so it works only if little endian
10:48
<
Regenaxer >
if it is 0 4 8 offsets
10:48
<
Regenaxer >
better use 123 0 0 0 for 4 bytes
10:49
<
Regenaxer >
or 0 0 0 123 if the byte is aligned at the end of that field
10:49
<
Regenaxer >
C in general expands chars to ints when passed to functions
10:49
<
Regenaxer >
all highly depending on the compiler
10:50
<
Regenaxer >
and perhaps compiler options
10:50
<
tankf33der >
but results are different betweet pil21 and pil64
10:50
<
Regenaxer >
Is it the same lib?
10:51
<
Regenaxer >
same build I mean
10:53
<
tankf33der >
of course
10:53
<
Regenaxer >
ok, then pil21 and pil64 should be the same
10:53
<
Regenaxer >
What difference?
10:54
<
Regenaxer >
Why do you print without spaces? :) "%d%d%ju",
10:58
<
Regenaxer >
What if you declare 'b' as uint32_t in the struct?
11:05
orivej has quit [Ping timeout: 265 seconds]
11:30
<
tankf33der >
always diffrent
11:31
<
tankf33der >
What if you declare 'b' as uint32_t in the struct?
11:31
<
tankf33der >
^^ again pil64 is ok, pil21 wrong or garbage.
11:35
<
Regenaxer >
*All* numbers are different?
11:35
<
Regenaxer >
all three?
11:36
<
tankf33der >
(struct P 'P -123 -1234567 (1234567890123456789 . 8))
11:36
<
tankf33der >
(native "./native.so" "arg1" 'S P) )
11:36
<
tankf33der >
"12312345671234567890123456789"
11:36
<
tankf33der >
(println
11:36
<
tankf33der >
uint32 uint32 uint64
11:36
<
tankf33der >
pil64 ok, pil21 different
11:37
<
Regenaxer >
'P' is not supported in pil64 btw
11:38
<
tankf33der >
it eats 'P anyway.
11:38
<
Regenaxer >
not checked
11:38
<
Regenaxer >
same as NIL perhaps?
11:38
<
Regenaxer >
anyway, ok
11:39
<
Regenaxer >
what is "j" for printf?
11:39
<
Regenaxer >
does the buffer 'r' contain the right things?
11:40
<
Regenaxer >
ie. which part goes wrong?
11:40
<
Regenaxer >
sending or reveiving?
11:40
<
tankf33der >
under investigation
11:41
<
Regenaxer >
receiving is just a string, so probably ok
11:42
<
Regenaxer >
Probably it helps if you look with gdb what it does
11:52
<
tankf33der >
its the easiest combination. without padding.
11:52
<
tankf33der >
frustrating.
11:57
<
tankf33der >
all three uint32_t works on both.
12:04
<
Regenaxer >
strange
12:04
<
Regenaxer >
What might be different?
12:05
<
tankf33der >
all uint64_t works only on pil64.
12:05
<
Regenaxer >
hmm, so uint64_t is the problem?
12:05
<
tankf33der >
unknown, still playing.
12:06
<
tankf33der >
my idea was create all possible struct combinations of byte,int,long and check equal of pil21 vs. pil64.
12:07
<
Regenaxer >
good idea
12:08
<
tankf33der >
all uint8_t works.
12:08
<
tankf33der >
all uint8_t works on both.
12:08
<
Regenaxer >
again: What is the "j" format?
12:09
<
Regenaxer >
why not "l" ?
12:10
<
tankf33der >
lint blamed
12:10
<
tankf33der >
%ju - uint64_t
12:10
<
tankf33der >
%jd - int64_t
12:10
<
tankf33der >
in C99
12:10
<
Regenaxer >
I never saw j
12:10
<
Regenaxer >
%ld or %lu
12:11
<
tankf33der >
trying
12:11
<
Regenaxer >
or %lX I use most
12:11
<
Regenaxer >
for debugging
12:13
<
tankf33der >
%lu the same
12:13
<
tankf33der >
pil21 wrong, pil64 as expected.
12:14
<
tankf33der >
[mpech@lambda pil21-tests]$ pil native.l
12:14
<
tankf33der >
native-OK
12:14
<
tankf33der >
"1231234567139691180892080"
12:14
<
tankf33der >
"12312345671234567890123456789"
12:14
<
tankf33der >
: [mpech@lambda pil21-tests]$ pil21 native.l
12:14
<
tankf33der >
native-OK
12:14
<
tankf33der >
[mpech@lambda pil21-tests]$
12:14
<
tankf33der >
so, i see the last uint64_t is always wrong.
12:15
<
Regenaxer >
I check
12:16
<
Regenaxer >
Which part? filling 'r' from the args?
12:16
<
Regenaxer >
s->b, s->i, and s->l are correct?
12:16
<
Regenaxer >
Where exactly does it go wrong?
12:17
<
Regenaxer >
Do you do printf's in C to track all states?
12:17
<
tankf33der >
correct questions. i do my best.
12:17
<
Regenaxer >
There must be exactly one point where it goes wrong in pil21
12:17
<
Regenaxer >
yes, I know
12:18
<
Regenaxer >
you are hunting :)
12:19
<
Regenaxer >
I suspect it is the
*reading* from the buffer into the result list
12:19
<
Regenaxer >
it is the complicated part
12:19
<
Regenaxer >
'natRet' in src/main.l
12:20
<
Regenaxer >
((and (pair Spec) Val) # Arrary or structure
12:21
<
tankf33der >
all uint32_t correct in both.
12:21
<
Regenaxer >
check the case with 64 bit numbers, where it goes wrong
12:22
<
Regenaxer >
static char r[BUFSIZ];
12:22
<
Regenaxer >
fprintf(stderr, "%ld %ld %ld\n", s->b, s->i, s->l);
12:22
<
Regenaxer >
sprintf(r, "%d%d%ju", s->b, s->i, s->l);
12:22
<
Regenaxer >
to see if the numbers arrive correctly
12:23
<
Regenaxer >
if so, natBuf must be wrong
12:25
<
tankf33der >
checking.
12:25
<
Regenaxer >
I try similar
12:25
<
Regenaxer >
fill the buffer manually:
12:25
<
Regenaxer >
(setq P (native "@" "malloc" 'N 32))
12:25
<
Regenaxer >
(for (I . B) (1 2 3 4 5 4 7 8 1 2 3 4 5 4 7 8 1 2 3 4 5 4 7 8)
12:25
<
Regenaxer >
(byte (+ P I -1) B) )
12:25
<
Regenaxer >
the read with struct
12:26
<
tankf33der >
show me struct you work with ?
12:26
<
tankf33der >
we must synced
12:27
<
Regenaxer >
correct
12:28
<
Regenaxer >
(setq P (native "@" "malloc" 'N 32))
12:28
<
Regenaxer >
(for (I . B) (1 2 3 4 5 4 7 8 1 2 3 4 5 4 7 8 1 2 3 4 5 4 7 8)
12:28
<
Regenaxer >
(byte (+ P I -1) B) )
12:28
<
Regenaxer >
(msg (struct P '(N N N)))
12:28
<
Regenaxer >
(578435496729051649 578435496729051649 578435496729051649)
12:28
<
Regenaxer >
this is correct
12:28
<
Regenaxer >
(hex 578435496729051649)
12:28
<
Regenaxer >
-> "807040504030201"
12:29
<
Regenaxer >
So
*reading* the struct works?
12:29
<
Regenaxer >
1 2 3 ... in little endian
12:29
<
Regenaxer >
Where else might it go wrong?
12:31
<
tankf33der >
read this
12:32
<
Regenaxer >
the printf shows that the written data are wrong
12:32
<
tankf33der >
yea, in pil21
12:32
<
tankf33der >
only on pil21
12:32
<
Regenaxer >
I try directly
12:33
<
Regenaxer >
example is too involved
12:33
<
tankf33der >
(msg (struct P '(N N N)))
12:33
<
tankf33der >
this one is working
12:33
<
tankf33der >
as i tried before.
12:33
<
tankf33der >
try B I N
12:34
<
tankf33der >
when all three are equal, it works in any combinations.
12:34
<
Regenaxer >
hmm, this works too:
12:34
<
Regenaxer >
(setq P (native "@" "malloc" 'N 32))
12:34
<
Regenaxer >
(msg (struct P '(N N N) (123456789 . 8) (123456789 . 8) (123456789 . 8)))
12:35
<
Regenaxer >
so writing is also OK
12:35
<
tankf33der >
you should check when not all three are equal.
12:35
<
tankf33der >
use any first and last N
12:36
<
tankf33der >
let me try if two and last in N
12:36
<
Regenaxer >
works too
12:36
<
Regenaxer >
(setq P (native "@" "malloc" 'N 32))
12:36
<
Regenaxer >
(msg (struct P '(N N N) (123456789 . 8) (123456789 . 8) (123456789 . 8)))
12:36
<
Regenaxer >
-> (123456789 1234567 123456789)
12:36
<
Regenaxer >
for (struct P '(N I N) (123456789 . 8) (1234567 . 4) (123456789 . 8))
12:37
<
Regenaxer >
So structure access is correct
12:37
<
Regenaxer >
It must be the C lib
12:37
<
tankf33der >
two is wrong too if last is N
12:37
<
Regenaxer >
Which two?
12:37
<
tankf33der >
uint32 and uint64
12:38
<
tankf33der >
[mpech@lambda pil21-tests]$ pil native.l
12:38
<
tankf33der >
"1231234567890123456789"
12:38
<
tankf33der >
123 139917231304624
12:38
<
tankf33der >
: [mpech@lambda pil21-tests]$ pil21 native.l
12:38
<
tankf33der >
123 1234567890123456789
12:38
<
tankf33der >
native-OK
12:38
<
tankf33der >
"123139917231304624"
12:38
<
tankf33der >
native-OK
12:38
<
Regenaxer >
I want to try without C lib in between
12:39
<
Regenaxer >
Like this? (struct P '(N I N) (123 . 4) (123 . 4) (123 . 8))
12:39
<
Regenaxer >
this gives -> (528280977531 123 0)
12:40
<
Regenaxer >
must be of course
12:40
<
Regenaxer >
(struct P '(I I N) (123 . 4) (123 . 4) (123 . 8))
12:40
<
Regenaxer >
gives -> (123 123 123)
12:40
<
Regenaxer >
So all correct?
12:41
<
Regenaxer >
The C program does too much
12:41
<
Regenaxer >
we must get to the point
12:41
<
Regenaxer >
isolate the part which goes wrong
12:43
<
Regenaxer >
Can you paste a simple example where pil21 goes wrong?
12:43
<
Regenaxer >
Ignore pil64
12:43
<
Regenaxer >
just pil21
12:43
<
Regenaxer >
then print intermediate values
12:43
<
Regenaxer >
to see
*where* it goes wrong
12:43
<
Regenaxer >
either when writing to the buffer
12:43
<
Regenaxer >
or when reading it
12:44
<
Regenaxer >
best print the contents of the buffer as bytes
12:44
<
Regenaxer >
in a for(;;) loop
12:44
<
Regenaxer >
not uintXX values
12:44
<
Regenaxer >
we don't know how C alignes them
12:45
<
tankf33der >
i can check aling in stderr
12:46
<
Regenaxer >
for (char *p = r, i = 0; i < 24; ++i) printf("%x ", *p++;
12:47
<
Regenaxer >
best to clear the buffer first
12:47
<
Regenaxer >
with memset
12:47
<
Regenaxer >
all zeroes
12:47
<
Regenaxer >
then store the values and print the hex bytes
12:47
<
Regenaxer >
so we see what C does with the values
12:48
<
Regenaxer >
There may be garbage bytes in between
12:58
<
Regenaxer >
ah, it is a string! I forgot
12:59
<
Regenaxer >
can you paste all code again?
13:03
<
Regenaxer >
So this is already wrong? 1234567,139945236610992
13:03
<
tankf33der >
always
13:03
<
tankf33der >
1234567,1234567890123456789
13:04
<
Regenaxer >
so s->u64 is wrong?
13:04
<
Regenaxer >
can you print it?
13:04
<
Regenaxer >
printf("%lu\n", s->u64);
13:05
<
tankf33der >
fprintf(stderr, "%d,%lu\n", s->u32, s->u64);
13:05
<
tankf33der >
fprintf(stderr, "%p,%p\n", &s->u32, &s->u64);
13:05
<
tankf33der >
already
13:05
<
tankf33der >
see the link
13:05
<
Regenaxer >
you print the addresses
13:05
<
Regenaxer >
I wonder if the value arrives correctly
13:05
<
tankf33der >
16:05 <tankf33der> fprintf(stderr, "%d,%lu\n", s->u32, s->u64);
13:06
<
tankf33der >
this one prints addresses ?
13:06
<
Regenaxer >
sorry, yes
13:06
<
Regenaxer >
&s->u64); is address
13:06
<
Regenaxer >
s->u64); is correct
13:06
<
tankf33der >
so i got wrong value in function.
13:07
<
Regenaxer >
cause it is padded?
13:07
<
Regenaxer >
(1234567 . 4) (0 . 4) ?
13:07
<
tankf33der >
yea, manual padding
13:07
<
tankf33der >
because fprintf(stderr, "%p,%p\n", &s->u32, &s->u64);
13:07
<
Regenaxer >
this puts the next long in the wrong place
13:08
<
tankf33der >
prints 0 and 8 at the end.
13:08
<
Regenaxer >
struct arg1s {
13:08
<
Regenaxer >
uint32_t u32;
13:08
<
Regenaxer >
uint64_t u64;
13:08
<
Regenaxer >
4 bytes plus 8 bytes
13:09
<
tankf33der >
4 bytes, 4 bytes padding, 8 bytes
13:09
<
Regenaxer >
cause of alignment?
13:09
<
tankf33der >
in this case.
13:09
<
tankf33der >
0x55699ea15040,0x55699ea15048
13:09
<
tankf33der >
^^^ fprintf(stderr, "%p,%p\n", &s->u32, &s->u64);
13:10
<
tankf33der >
in this case yes.
13:10
<
Regenaxer >
Sorry, the bytes in 'r' are not needed
13:10
<
Regenaxer >
the struct must be dumped
13:10
<
Regenaxer >
it has the wrong values
13:10
<
Regenaxer >
(struct P 'N (1234567 . 4) (0 . 4) (1234567 ...
13:10
<
Regenaxer >
does not match
13:10
<
Regenaxer >
somehow
13:11
<
tankf33der >
but ok in pil64
13:11
<
Regenaxer >
How do you know (0 . 4) is needed?
13:12
<
tankf33der >
because i manually align first field and insert additional 4 bytes
13:12
<
Regenaxer >
the problem is between (struct P 'N ( ...) and fprintf(stderr, "%d,%lu\n", s->u32, s->u64);
13:13
<
Regenaxer >
what you tell struct and what C believes of the struct does not match
13:13
<
Regenaxer >
yes, &s->u32, &s->u64 is 8 bytes
13:13
<
tankf33der >
all above ok in pil64.
13:13
<
Regenaxer >
is u32 right aligned in the buf?
13:14
<
Regenaxer >
Forget pil64
13:14
<
Regenaxer >
debug pil21
13:14
<
Regenaxer >
Locate exactly the place where it goes wrong
13:14
<
tankf33der >
i cant.
13:16
<
Regenaxer >
Fact is that the first place is wrong already
13:16
<
Regenaxer >
1234567,139945236610992
13:18
<
Regenaxer >
try (struct P 'N (`(hex "12345678") . 4) (0 . 4) (`(hex "1234567812345678" . 8)))
13:18
<
Regenaxer >
then hexdump the struct
13:18
<
tankf33der >
hexdump ?
13:18
<
Regenaxer >
for (char *p = (char*)&s ...
13:18
<
Regenaxer >
not 'r'
13:19
<
Regenaxer >
we must see what arrives in the struct
13:19
<
Regenaxer >
No need to print the other stuff
13:20
<
Regenaxer >
cause we know that s->u64 is wrong
13:20
<
Regenaxer >
So I want to know what is in the struct
13:21
<
Regenaxer >
to see if (struct P 'N ...) creates the wrong data
13:21
<
Regenaxer >
it must be 12345678000000001234567812345678
13:22
<
Regenaxer >
the for loop over 32 bytes
13:27
<
Regenaxer >
I don't understand, cause
13:27
<
Regenaxer >
(struct P '(I I N) (123 . 4) (0 . 4) (123 . 8))
13:27
<
Regenaxer >
gives correct result
13:27
<
Regenaxer >
-> (123 0 123)
13:28
<
Regenaxer >
or is
*both* write and read wrong with the same offset?
13:29
<
tankf33der >
trying.
13:33
<
tankf33der >
what i see.
13:34
<
Regenaxer >
Was interrupted
13:35
<
Regenaxer >
is "40 ffffffd0 ffffffd3 64 2c 56..." the output?
13:35
<
Regenaxer >
can't be
13:35
<
tankf33der >
code above.
13:36
<
tankf33der >
#(struct P 'N (1234567 . 4) (0 . 4) (1234567890123456789 . 8))
13:36
<
tankf33der >
(struct P 'N (`(hex "1234567") . 4) (0 . 4) (`(hex "1234567812345678") . 8))
13:36
<
Regenaxer >
yes, no spaces
13:36
<
Regenaxer >
between the bytes
13:36
<
tankf33der >
which one to use on picolisp side ?
13:36
<
Regenaxer >
yes, Pil side is good
13:36
<
Regenaxer >
(`(hex "1234567") . 4) (0 . 4) ...
13:37
<
tankf33der >
the i should post new output.
13:37
<
Regenaxer >
the bytes are signed
13:37
<
Regenaxer >
could be (unsigned char*)
13:37
<
Regenaxer >
but does not matter
13:38
<
Regenaxer >
still the bytes are nonsense
13:38
<
Regenaxer >
moment, interrupt
13:38
<
Regenaxer >
should be 78 56 34 ... for little endian, no?
13:39
<
tankf33der >
$ pil21 native.l
13:39
<
tankf33der >
0x55b5e7141040,0x55b5e7141048
13:39
<
tankf33der >
19088743,140376140649616
13:39
<
tankf33der >
"19088743,140376140649616"
13:39
<
tankf33der >
40 10 14 ffffffe7 ffffffb5 55 0 0 40 16 3c 5c fffffffe 7f 0 f :
13:39
<
tankf33der >
native-OK
13:39
<
tankf33der >
with new picolisp side.
13:39
<
Regenaxer >
40 10 14 is complete nonsense
13:40
<
Regenaxer >
hmm, you filled other numbers
13:40
<
Regenaxer >
not (hex "1234567812345678")
13:40
<
Regenaxer >
I want the above hex numbers
13:41
<
Regenaxer >
to see the bytes
13:42
<
tankf33der >
(hex "1234567") is first part of output:
13:42
<
tankf33der >
19088743,139751040578704
13:43
<
Regenaxer >
I want to see the 16 bytes in the struct
13:43
<
Regenaxer >
not decimal numbers
13:44
<
Regenaxer >
try (struct P 'N (`(hex "12345678") . 4) (0 . 4) (`(hex "1234567812345678" . 8)))
13:44
<
Regenaxer >
then the dump must be
13:44
<
Regenaxer >
78 56 34 ...
13:44
<
Regenaxer >
then 00 00 00 00
13:45
<
Regenaxer >
then the long
13:45
<
Regenaxer >
or 0 0 0 0 without padding
13:45
<
tankf33der >
ir coredumps.
13:45
<
tankf33der >
it coredumps.
13:46
<
Regenaxer >
I cannot compile here now. Perhaps in one hour
13:47
<
tankf33der >
the same nonsense.
13:47
<
tankf33der >
let me try call from C and hexdump.
13:48
orivej has joined #picolisp
13:48
<
Regenaxer >
I try later
13:48
<
Regenaxer >
this is too difficult to do in irc :)
13:49
<
tankf33der >
$ gcc native.c && ./a.out
13:49
<
tankf33der >
1234567,1234567890123456789
13:49
<
tankf33der >
20 ffffffbf 73 ffffffbc fffffffc 7f 0 0 27 ffffffbf 73 ffffffbc fffffffc 7f 0 f 1234567,1234567890123456789
13:49
<
tankf33der >
0x7ffcbc73bf20,0x7ffcbc73bf28
13:52
<
Regenaxer >
I would do gcc -o x.so -shared x.c
13:52
<
Regenaxer >
let me try now
13:52
<
Regenaxer >
I'm helping my wife though
13:52
<
Regenaxer >
can't fully concentrate
13:52
<
tankf33der >
its ok
13:52
<
Regenaxer >
Preparing Sushi course
13:52
<
tankf33der >
i am on vacation.
13:53
<
Regenaxer >
yeah, I know :)
13:53
<
tankf33der >
lets take a break.
13:53
<
tankf33der >
ping me later.
13:53
<
Regenaxer >
but it nags me :)
14:11
<
Regenaxer >
Ah, my fault! The pointer is wrong
14:11
<
Regenaxer >
not &s !!
14:12
<
Regenaxer >
s
*is* a pointer
14:12
<
Regenaxer >
now I get:
14:12
<
Regenaxer >
78 56 34 12 0 0 0 0 d0 33 a5 8f 7e 0 0 0
14:13
<
Regenaxer >
so the long is bad
14:13
<
Regenaxer >
(`(hex "12345678123456") . 8) works
14:13
<
Regenaxer >
78 56 34 12 0 0 0 0 56 34 12 78 56 34 12 0
14:13
<
Regenaxer >
So I know the problem is with bignums
14:14
<
Regenaxer >
"12345678123456" still fits into a short
14:14
<
Regenaxer >
and thus works
14:15
<
Regenaxer >
Now I check 'natRet' what goes wrong with the number
14:15
<
Regenaxer >
not natRet
14:17
<
tankf33der >
sounds good
14:17
<
Regenaxer >
getting close
14:17
<
Regenaxer >
(T (set (i64* Ptr) X)
14:18
orivej has quit [Ping timeout: 258 seconds]
14:19
<
Regenaxer >
found it
14:19
orivej has joined #picolisp
14:19
<
Regenaxer >
(dig X) must be (val (dig X))
14:19
<
Regenaxer >
I use the pointer instead of the value
14:21
<
Regenaxer >
also in another place, fix it
14:21
<
Regenaxer >
I better check all sources
14:23
<
Regenaxer >
oops, one more such case in 'pathSize'
14:23
<
Regenaxer >
Hard to detect
14:23
<
Regenaxer >
cause numbers up to 60 bits work
14:24
<
Regenaxer >
Works now
14:25
<
Regenaxer >
Released!
14:27
orivej_ has joined #picolisp
14:30
orivej has quit [Ping timeout: 260 seconds]
14:37
<
tankf33der >
i will play.
14:47
<
Regenaxer >
I will continue with io.l later
14:47
<
Regenaxer >
perhaps finish this weekend
14:47
<
Regenaxer >
Now on a walk
14:58
orivej has joined #picolisp
15:00
<
tankf33der >
yea, works and nothing is broken.
15:01
orivej_ has quit [Ping timeout: 258 seconds]
15:10
<
Regenaxer >
I think we should move src/net.l out of the base system
15:10
<
Regenaxer >
-> lib/net.l
15:10
<
Regenaxer >
and use 'native'
15:11
<
Regenaxer >
More flexible, and not time critical
15:12
<
Regenaxer >
pil21 will also have a 'buffer' function
15:12
<
Regenaxer >
to allocate directly on the stack
15:12
<
Regenaxer >
Less need for 'malloc'
15:44
jibanes has quit [Ping timeout: 264 seconds]
15:46
jibanes has joined #picolisp
15:46
orivej has quit [Ping timeout: 258 seconds]
15:47
orivej has joined #picolisp
15:55
orivej has quit [Read error: Connection reset by peer]
15:56
f8l has quit [Ping timeout: 240 seconds]
15:56
orivej has joined #picolisp
16:05
orivej has quit [Quit: No Ping reply in 180 seconds.]
16:05
orivej has joined #picolisp
16:07
f8l has joined #picolisp
16:26
orivej_ has joined #picolisp
16:26
orivej has quit [Read error: Connection reset by peer]
16:32
jibanes has quit [Ping timeout: 240 seconds]
16:34
jibanes has joined #picolisp
16:51
orivej_ has quit [Ping timeout: 246 seconds]
16:52
orivej has joined #picolisp
17:07
orivej has quit [Quit: No Ping reply in 180 seconds.]
17:09
orivej has joined #picolisp
17:20
orivej has quit [Ping timeout: 240 seconds]
17:21
orivej has joined #picolisp
17:23
<
tankf33der >
implemented combinations with and without padding, works. perfect test for both native and struct.
18:50
orivej has quit [Ping timeout: 256 seconds]
18:50
orivej_ has joined #picolisp
19:15
orivej_ has quit [Ping timeout: 260 seconds]
19:15
orivej has joined #picolisp
19:39
orivej has quit [Quit: No Ping reply in 180 seconds.]
19:41
orivej has joined #picolisp
19:57
orivej has quit [Read error: Connection reset by peer]
19:57
orivej_ has joined #picolisp
20:05
orivej_ has quit [Ping timeout: 260 seconds]
20:05
orivej has joined #picolisp
20:16
orivej_ has joined #picolisp
20:17
orivej has quit [Read error: Connection reset by peer]
20:25
orivej_ has quit [Read error: Connection reset by peer]
20:25
orivej has joined #picolisp
20:46
orivej has quit [Ping timeout: 258 seconds]
20:46
orivej_ has joined #picolisp
20:56
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
20:57
orivej has joined #picolisp
21:06
orivej has quit [Quit: No Ping reply in 180 seconds.]
21:08
orivej has joined #picolisp
21:33
alexshendi has quit [Remote host closed the connection]
22:10
orivej has quit [Ping timeout: 246 seconds]
22:10
orivej has joined #picolisp
22:38
orivej has quit [Ping timeout: 258 seconds]
22:38
orivej has joined #picolisp
22:49
orivej has quit [Ping timeout: 256 seconds]
22:50
orivej has joined #picolisp
22:57
orivej has quit [Ping timeout: 256 seconds]