00:12
jibanes has quit [Ping timeout: 260 seconds]
00:14
jibanes has joined #picolisp
00:18
aw- has joined #picolisp
00:35
jibanes has quit [Ping timeout: 264 seconds]
00:36
jibanes has joined #picolisp
00:52
jibanes has quit [Ping timeout: 256 seconds]
00:53
jibanes has joined #picolisp
01:03
jibanes has quit [Ping timeout: 246 seconds]
01:05
jibanes has joined #picolisp
01:12
jibanes has quit [Ping timeout: 240 seconds]
01:14
jibanes has joined #picolisp
01:36
jibanes has quit [Ping timeout: 256 seconds]
01:38
jibanes has joined #picolisp
01:47
jibanes has quit [Ping timeout: 240 seconds]
01:49
jibanes has joined #picolisp
02:25
jibanes has quit [Ping timeout: 240 seconds]
02:27
jibanes has joined #picolisp
02:38
jibanes has quit [Ping timeout: 272 seconds]
02:40
jibanes has joined #picolisp
02:45
jibanes has quit [Ping timeout: 256 seconds]
02:46
jibanes has joined #picolisp
02:56
jibanes has quit [Ping timeout: 264 seconds]
02:58
jibanes has joined #picolisp
03:17
jibanes has quit [Ping timeout: 256 seconds]
03:19
jibanes has joined #picolisp
06:20
orivej has quit [Ping timeout: 260 seconds]
07:01
<
Regenaxer >
tankf33der: Now with a fresh mind, I think I could fix the problems (except ^Z of course)
07:02
<
Regenaxer >
released. Can you test later?
07:14
<
aw- >
Regenaxer: hi
07:14
<
Regenaxer >
Hi aw-!
07:15
<
Regenaxer >
aw-, btw, I noticed that I need to change PilBox from MIT/X11 to GPL
07:15
<
Regenaxer >
cause it contains the readline library file
07:15
<
Regenaxer >
in the TGZ
07:16
<
Regenaxer >
The Debian maintainer also complained
07:16
<
Regenaxer >
about readline
07:16
<
aw- >
well, that is not good
07:16
<
Regenaxer >
I told him that he may change to GPL for package
07:16
<
Regenaxer >
yes, old trouble
07:17
<
aw- >
right, perhaps dual license
07:17
<
aw- >
or get rid of readline ;)
07:17
<
Regenaxer >
Difficult
07:17
<
Regenaxer >
or impossible
07:18
<
Regenaxer >
I think there is no full alternative
07:19
<
aw- >
i have a question about (native)
07:19
<
aw- >
if i call a function that expects a u8 argument (0-255), and i provide 257 as the argument
07:19
<
aw- >
is it normal for the program to interpret it as 2 ?
07:20
<
Regenaxer >
yes, it is masked
07:20
<
aw- >
256 = 0, 257 = 1 ...
07:20
<
aw- >
ok so picolisp is doing that
07:20
<
Regenaxer >
hmm, not sure
07:20
<
tankf33der >
Regenaxer: all passed.
07:21
<
Regenaxer >
in fact C does not support such arguments
07:21
<
Regenaxer >
values smaller than an int are always converted
07:21
<
Regenaxer >
register or stack argument
07:22
<
Regenaxer >
tankf33der, great! :)
07:22
<
aw- >
what about a pointer to an array?
07:22
<
aw- >
the items in the array are integers
07:23
<
aw- >
or, are they 8-bit unsigned integers?
07:23
<
Regenaxer >
whatever you define
07:23
<
Regenaxer >
a string for example is a structure of 8-bit values
07:23
rob_w has joined #picolisp
07:24
<
Regenaxer >
whether signed or unsigned depends on how the program interprets them
07:24
<
Regenaxer >
this is for all values
07:24
<
Regenaxer >
an array of integers may be interpreted as an array of bytes or whatever
07:25
<
Regenaxer >
I C,
*data* have no type
07:25
<
Regenaxer >
the code does
07:25
<
Regenaxer >
static types, existing only at compile time
07:28
<
aw- >
ok so my issue is on the native side, it only accepts an array of 8-bit integers
07:28
<
aw- >
but on picolisp side if I send a list with values (257 257) then on native side i get [1, 1]
07:28
<
Regenaxer >
How do you mean that?
07:29
mtsd has joined #picolisp
07:29
<
aw- >
i'm trying to figure out who is converting it to [1, 1]
07:29
<
Regenaxer >
257 can never be a byte value
07:29
<
aw- >
native or picolisp
07:29
<
Regenaxer >
it is already stored as 1
07:29
<
aw- >
ok ok that makes sense
07:30
<
Regenaxer >
So you do not have function args as bytes
07:30
<
Regenaxer >
but pointers to arrays of bytes, right?
07:30
<
Regenaxer >
byte args make not really sense
07:31
<
Regenaxer >
or, they do, but are passed as ints
07:31
<
Regenaxer >
How is the array built?
07:31
<
Regenaxer >
from 'native' or from C code?
07:38
<
aw- >
from picolisp with (struct)
07:38
<
aw- >
(struct X NIL 257 257) .. then I pass X as argument to the (native) function
07:40
<
Regenaxer >
So 257 is illegal
07:40
<
Regenaxer >
not runtime-checked by 'struct'
07:42
<
Regenaxer >
yes, src/main.l line 1183: (set Ptr (i8 (int Val)))
07:42
<
Regenaxer >
It simply truncates to 8 bit
07:43
<
Regenaxer >
equivalent to (struct X NIL (& 257 (hex "FF")) ...
07:43
<
aw- >
ok perfect, that's what I wanted to know
07:52
<
Regenaxer >
tankf33der, I found a fix for the ^Z issue
07:52
<
Regenaxer >
I think it was indeed my fault
07:53
<
Regenaxer >
I inserted a check whether readline is initialized
07:53
<
Regenaxer >
Because when Vip is called from the shell, readline is not used and thus not initialized
08:03
<
Regenaxer >
hmm, but not 100%
08:04
<
Regenaxer >
Now it is bad in the REPL
08:06
<
Regenaxer >
ok, but now it seems OK
08:07
<
Regenaxer >
needed a different check in one case
08:07
<
Regenaxer >
testing
08:08
<
tankf33der >
what you do in testing?
08:10
<
Regenaxer >
Seems good now :)
08:11
<
Regenaxer >
So pil21 is perfect now?
08:14
aw- has quit [Ping timeout: 260 seconds]
08:16
aw- has joined #picolisp
08:16
Regenaxer has quit [*.net *.split]
08:16
inara has quit [*.net *.split]
08:22
inara has joined #picolisp
08:22
Regenaxer has joined #picolisp
08:22
<
tankf33der >
Regenaxer: pil21 is perfect as always.
08:22
<
Regenaxer >
hehe ;)
08:24
<
Regenaxer >
Now I released a new chess.tgz
08:25
<
tankf33der >
i wonder why (call 'python) works
08:25
<
tankf33der >
and (call 'irb) fails in pil21
08:25
<
Regenaxer >
What is irb?
08:25
<
tankf33der >
because calling 'irb in pil64 works.
08:25
<
tankf33der >
repl for ruby
08:26
<
Regenaxer >
Can you try to trace (call 'irb)?
08:26
<
Regenaxer >
What the difference is
08:27
<
Regenaxer >
It immediately dumps a traceback?
08:28
<
Regenaxer >
reading from stdin
08:29
<
tankf33der >
this is pil64:
08:29
<
tankf33der >
$ pil +
08:29
<
tankf33der >
: (call 'irb)
08:29
<
tankf33der >
irb(main):001:0>
08:29
<
Regenaxer >
Most probably has to do with readline
08:29
<
Regenaxer >
how it initialized I/O
08:30
<
Regenaxer >
How about ./pil -"call 'irb" + ?
08:30
<
Regenaxer >
avoids readline
08:32
<
Regenaxer >
Vim also does not work:
08:32
<
Regenaxer >
: (call 'vim)
08:32
<
Regenaxer >
Vim: Error reading input, exiting...
08:32
<
Regenaxer >
Vim: Finished.
08:33
<
Regenaxer >
Same with ./pil -"call 'vim" +
08:33
<
Regenaxer >
Used to work in pil64
08:33
<
tankf33der >
this is my last issue.
08:34
<
Regenaxer >
'call' needs some setup then
08:34
<
Regenaxer >
not only the tty cleanlp
08:34
<
Regenaxer >
cleanup
08:34
<
Regenaxer >
but also stop/start readline
08:35
<
Regenaxer >
The whole readline stuff is indeed hard to get righy
08:41
<
Regenaxer >
I try rlSigBeg + rlSigEnd in 'call'
08:42
<
Regenaxer >
Not sure where
08:42
<
Regenaxer >
in parent or in child
08:43
<
Regenaxer >
and is all that terminal handling still needed?
08:43
<
Regenaxer >
'call' is tough
08:43
<
Regenaxer >
already in pil32 + pil64
08:45
<
Regenaxer >
(rlSigBeg) does not work
08:45
<
Regenaxer >
I give up
08:47
<
Regenaxer >
The problem is that pil changes the terminal settings (key, raw) and readline does that too. Then programs like vip or irb also want to do that. A mess!
08:49
<
Regenaxer >
I don't find a way to "uninitialize" readline
08:51
<
Regenaxer >
Perhaps remove (initReadline) from 'main', and do it later on demand?
08:51
<
Regenaxer >
Then at least the command line call would work
08:53
<
Regenaxer >
Hmm, no, (initReadline) only initializes variables. Does not call any readline function
08:54
<
Regenaxer >
So why does -"call 'vim" not work?
09:05
<
Regenaxer >
btw, in pil64 pil -"call 'vim" also does not work
09:15
<
Regenaxer >
: (call "./pil" "-println 123" "-bye")
09:16
<
Regenaxer >
Does not work well if called without "-bye"
09:28
orivej has joined #picolisp
11:09
<
Regenaxer >
I give up trying to improve 'call'
11:23
orivej has quit [Ping timeout: 265 seconds]
11:27
<
tankf33der >
Regenaxer: it is ok, lets leave it as is. what you think?
11:28
<
Regenaxer >
yeah, I don't understand what exactly goes wrong
12:21
<
tankf33der >
Regenaxer: deleting irb issue from file.
13:08
<
aw- >
Regenaxer: do you have an example of (native) T specification? "Direct lisp value" ?
13:08
<
aw- >
result* specification
13:09
<
Regenaxer >
I'm out atm, will look later
13:13
<
beneroth >
I would think this means a PLIO encoded value
13:13
<
beneroth >
(which can be any picolisp value)
13:13
<
beneroth >
but I cannot be certain
13:16
<
aw- >
that could be interesting..
13:24
orivej has joined #picolisp
13:34
<
Regenaxer >
Ah, no, it means pointer to Lisp data
13:35
<
Regenaxer >
For a PLIO encoded value there is a new function 'plio'
13:36
<
Regenaxer >
With native + T you could do anything, e.g. access built-in Lisp functions, or implement an array of Lisp items
13:36
<
Regenaxer >
(for the latter take care of gc!)
13:39
<
aw- >
oh interesting for (plio)
13:39
<
Regenaxer >
'plio' is used in @lib/net.l iirc
13:40
<
aw- >
so i can pass plio to a C function as a pointer?
13:40
<
Regenaxer >
address of a buffer
13:41
<
aw- >
ah yes i see it in @lib/net.l
13:42
<
aw- >
so (udp) is sending data encoded with plio
13:45
mtsd has quit [Quit: Leaving]
13:51
orivej_ has joined #picolisp
13:51
orivej has quit [Ping timeout: 260 seconds]
14:02
<
Regenaxer >
BTW, calling built-in functions needs quite some knowledge about how they work:
14:02
<
Regenaxer >
$: (%@ "_cons" T '(T x 1 2))
14:02
<
Regenaxer >
-> (1 . 2)
14:02
<
Regenaxer >
$: (%@ "_cons" T '(T x (+ 3 4) (* 3 4)))
14:02
<
Regenaxer >
-> (7 . 12)
14:02
<
Regenaxer >
The 'x' can be anything, is ignored by 'cons'
14:10
<
beneroth >
thanks, noted :)
14:11
<
Regenaxer >
hi beneroth :)
14:31
<
tankf33der >
Regenaxer: do you have tests for T calls?
14:31
<
Regenaxer >
Not specially
14:31
<
tankf33der >
i will add all above, just in case
14:31
<
Regenaxer >
They are the simplest of all args and return values
14:31
<
Regenaxer >
ok, good
14:32
<
Regenaxer >
Then better use
14:32
<
Regenaxer >
(%@ "_cons" T '(T cons (+ 3 4) (* 3 4)))
14:32
<
Regenaxer >
i.e. with 'cons' instead of 'x'
14:32
<
Regenaxer >
as this is the normal case
14:32
<
Regenaxer >
(cons (+ 3 4) (* 3 4))
14:33
<
Regenaxer >
The interpreter functions get the whole expression
15:13
rob_w has quit [Remote host closed the connection]
15:59
jibanes has quit [Ping timeout: 272 seconds]
16:01
jibanes has joined #picolisp
16:17
jibanes has quit [Ping timeout: 256 seconds]
16:19
jibanes has joined #picolisp
16:30
jibanes has quit [Ping timeout: 256 seconds]
16:32
jibanes has joined #picolisp
16:45
jibanes has quit [Ping timeout: 260 seconds]
16:46
jibanes has joined #picolisp
16:52
jibanes has quit [Ping timeout: 240 seconds]
16:53
jibanes has joined #picolisp
17:01
jibanes has quit [Ping timeout: 260 seconds]
17:02
jibanes has joined #picolisp
17:11
jibanes has quit [Ping timeout: 246 seconds]
17:13
jibanes has joined #picolisp
17:26
jibanes has quit [Ping timeout: 240 seconds]
17:29
jibanes has joined #picolisp
17:34
jibanes has quit [Ping timeout: 260 seconds]
17:35
jibanes has joined #picolisp
17:40
jibanes has quit [Ping timeout: 272 seconds]
17:41
jibanes has joined #picolisp
18:02
jibanes has quit [Ping timeout: 240 seconds]
18:05
jibanes has joined #picolisp
18:12
jibanes has quit [Ping timeout: 260 seconds]
18:13
jibanes has joined #picolisp
18:59
jibanes has quit [Ping timeout: 264 seconds]
19:00
jibanes has joined #picolisp
19:07
jibanes has quit [Ping timeout: 260 seconds]
19:07
jibanes has joined #picolisp
19:08
Blukunfando has joined #picolisp
19:44
jibanes has quit [Ping timeout: 260 seconds]
19:46
jibanes has joined #picolisp
20:10
jibanes has quit [Ping timeout: 256 seconds]
20:12
jibanes has joined #picolisp
20:13
f8l has quit [Remote host closed the connection]
20:13
f8l has joined #picolisp
20:17
jibanes has quit [Ping timeout: 260 seconds]
20:18
jibanes has joined #picolisp
20:56
orivej_ has quit [Ping timeout: 240 seconds]
20:59
jibanes has quit [Ping timeout: 272 seconds]
21:00
jibanes has joined #picolisp
21:06
jibanes has quit [Ping timeout: 264 seconds]
21:06
jibanes has joined #picolisp
21:07
orivej has joined #picolisp
21:13
jibanes has quit [Ping timeout: 256 seconds]
21:15
jibanes has joined #picolisp
21:37
jibanes has quit [Ping timeout: 256 seconds]
21:38
jibanes has joined #picolisp
22:21
jibanes has quit [Ping timeout: 272 seconds]
22:22
jibanes has joined #picolisp
22:28
jibanes has quit [Ping timeout: 240 seconds]
22:29
jibanes has joined #picolisp
22:32
orivej has quit [Ping timeout: 256 seconds]
22:36
jibanes has quit [Ping timeout: 256 seconds]
22:38
jibanes has joined #picolisp
22:46
orivej has joined #picolisp
22:51
jibanes has quit [Ping timeout: 246 seconds]
22:53
jibanes has joined #picolisp
23:11
jibanes has quit [Ping timeout: 260 seconds]
23:13
jibanes has joined #picolisp
23:19
jibanes has quit [Ping timeout: 260 seconds]
23:21
jibanes has joined #picolisp
23:27
jibanes has quit [Ping timeout: 256 seconds]
23:28
jibanes has joined #picolisp
23:35
jibanes has quit [Ping timeout: 240 seconds]
23:37
jibanes has joined #picolisp
23:47
jibanes has quit [Ping timeout: 264 seconds]
23:49
jibanes has joined #picolisp