00:21
beneroth_ has joined #picolisp
00:24
beneroth has quit [Ping timeout: 240 seconds]
02:00
michelp has quit [Ping timeout: 260 seconds]
02:01
pointfree has quit [Ping timeout: 260 seconds]
02:03
michelp has joined #picolisp
02:03
pointfree has joined #picolisp
02:09
reedef has quit [Ping timeout: 245 seconds]
04:02
orivej has joined #picolisp
04:39
Lambdajack has quit [Quit: AFK]
05:08
orivej has quit [Ping timeout: 240 seconds]
05:37
immasheepherrder has joined #picolisp
06:27
<
aw- >
Regenaxer: here?
06:29
<
aw- >
in native spec: C char # Character (UTF-8, 1-4 bytes)
06:29
<
aw- >
how would the letter 'B' (char 66) be encoded then? is it '0 0 0 66' or '66 0 0 0' or ???
06:29
<
Regenaxer >
*only* 66
06:30
<
Regenaxer >
for C <= 127 it is a single byte
06:37
<
aw- >
hmmm, but in C a 'char' is only 1 byte right?
06:37
<
aw- >
why PicoLisp C can be 1-4 bytes?
06:37
<
aw- >
why can PicoLisp 'char' be 1-4 bytes
06:37
<
Regenaxer >
This is not a PicoLisp feature
06:37
<
Regenaxer >
it is the spec of UTF-8
06:38
<
aw- >
hmm.. so PicoLisp char is actually an array of 1-4 bytes?
06:39
<
Regenaxer >
you may call it so, but physically it is a symbol name, which in turn is a
*number*
06:39
<
Regenaxer >
a number with its bytes representing the UTF-8 char
06:40
<
Regenaxer >
in the simple case of "B" the name is the number 66
06:42
<
Regenaxer >
A more complicated case:
06:42
<
Regenaxer >
the EUR char € is hex A4
06:43
<
Regenaxer >
it is 20AC in Unicode
06:43
<
Regenaxer >
in UTF-8 this is E2 82 AC
06:43
<
Regenaxer >
3 bytes
06:45
<
Regenaxer >
so the
*number* in the name is E2 + 82<<8 + AC<<16
06:45
<
Regenaxer >
the lowest byte first
06:46
<
Regenaxer >
the symbol name "ABC" is encoded as 65 + 66<<8 + 67<<16
06:47
<
Regenaxer >
For application programming, you can ignore all this though
06:48
<
aw- >
can you tell me is it possible to pass a void* pointer to a C function from picolisp?
06:48
<
aw- >
how do i encode it in (struct) ?
06:48
<
Regenaxer >
A void pointer is just a pointer
06:49
<
Regenaxer >
The pointers in 'native' don't have a type
06:49
<
Regenaxer >
'N' (and 'P' in pil21)
06:50
<
aw- >
if I do (strct P 'N ...)
06:50
<
Regenaxer >
'native' and also C don't care
06:50
<
Regenaxer >
It is what you
*do* with the pointer
06:51
<
aw- >
i just want to know how to send it to a C function
06:51
<
Regenaxer >
you can cast a pointer to any other type
06:51
<
Regenaxer >
in this sense C is untyped
06:52
<
Regenaxer >
types exist only statically
06:52
<
Regenaxer >
at
*compile* time
06:52
<
Regenaxer >
but 'native' does not compile
06:52
<
Regenaxer >
it is an interpreter
06:52
<
aw- >
does (struct P 'N NIL) work?
06:53
<
Regenaxer >
what do you mean?
06:53
<
aw- >
in the native docs, it says use NIL specification for void
06:53
<
aw- >
i guess for extracting a a datastructure
06:54
<
Regenaxer >
void is a
*return* type
06:54
<
Regenaxer >
or nothing in this case
06:54
<
Regenaxer >
the returned value is anything, will be ignored
06:59
orivej has joined #picolisp
07:04
Green_flame has joined #picolisp
07:05
immasheepherrder has quit [Ping timeout: 240 seconds]
07:13
rob_w has joined #picolisp
07:26
mtsd has joined #picolisp
07:31
<
aw- >
ok thanks Regenaxer
07:32
Green_flame has quit [Ping timeout: 268 seconds]
07:34
Green_flame has joined #picolisp
07:42
Green_flame has quit [Quit: Green_flame]
07:54
beneroth__ has joined #picolisp
07:57
beneroth_ has quit [Ping timeout: 264 seconds]
08:19
mtsd has quit [Quit: Leaving]
08:30
beneroth__ has quit [Read error: Connection reset by peer]
09:17
<
tankf33der >
Regenaxer: can i put ansi escape sequences to terminal without callling 'tput ?
09:18
<
Regenaxer >
yes, just 'prin'
09:18
<
Regenaxer >
See e.g. @lib/vip.l
09:26
<
tankf33der >
works.
09:36
<
tankf33der >
will do this as warmup:
09:37
<
Regenaxer >
yeah :)
09:38
<
Regenaxer >
nice warmup ;)
10:01
<
aw- >
i will mail the list shortly ;)
10:02
<
Regenaxer >
Good :)
10:02
<
Regenaxer >
Publishing a lib?
11:01
<
tankf33der >
Regenaxer: tweeted.
11:11
beneroth has joined #picolisp
11:17
orivej has quit [Ping timeout: 260 seconds]
11:17
orivej_ has joined #picolisp
12:57
<
beneroth >
[OT] python community is harassing a presenter based on their "Code of Conduct" because his talk was a rebuttal on another (good) talk and some people find it was not nice from this presenter to call the other one "wrong" and in violation of their CoC. Of course the other presenter didn't felt violated by this talk, the complaints are from unrelated other people.
12:59
<
beneroth >
<3 picolisp community. quality over quantity. fashion people should follow and ruin something else (or nothing, ideally).
13:58
immasheepherrder has joined #picolisp
14:42
immasheepherrder has quit [Remote host closed the connection]
14:43
immasheepherrder has joined #picolisp
15:09
immasheepherrder has quit [Remote host closed the connection]
16:25
karswell has quit [Remote host closed the connection]
17:14
rob_w has quit [Quit: Leaving]
21:58
orivej_ has quit [Ping timeout: 268 seconds]