ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
beneroth_ has joined #picolisp
beneroth has quit [Ping timeout: 240 seconds]
michelp has quit [Ping timeout: 260 seconds]
pointfree has quit [Ping timeout: 260 seconds]
michelp has joined #picolisp
pointfree has joined #picolisp
reedef has quit [Ping timeout: 245 seconds]
orivej has joined #picolisp
Lambdajack has quit [Quit: AFK]
orivej has quit [Ping timeout: 240 seconds]
immasheepherrder has joined #picolisp
<aw-> Regenaxer: here?
<Regenaxer> Yes
<aw-> hi
<aw-> in native spec: C char # Character (UTF-8, 1-4 bytes)
<aw-> how would the letter 'B' (char 66) be encoded then? is it '0 0 0 66' or '66 0 0 0' or ???
<Regenaxer> *only* 66
<aw-> oh
<Regenaxer> for C <= 127 it is a single byte
<aw-> hmmm, but in C a 'char' is only 1 byte right?
<aw-> why PicoLisp C can be 1-4 bytes?
<aw-> why can PicoLisp 'char' be 1-4 bytes
<Regenaxer> This is not a PicoLisp feature
<Regenaxer> it is the spec of UTF-8
<aw-> hmm.. so PicoLisp char is actually an array of 1-4 bytes?
<Regenaxer> you may call it so, but physically it is a symbol name, which in turn is a *number*
<Regenaxer> a number with its bytes representing the UTF-8 char
<Regenaxer> in the simple case of "B" the name is the number 66
<Regenaxer> A more complicated case:
<Regenaxer> the EUR char € is hex A4
<Regenaxer> no
<Regenaxer> it is 20AC in Unicode
<Regenaxer> in UTF-8 this is E2 82 AC
<Regenaxer> 3 bytes
<Regenaxer> so the *number* in the name is E2 + 82<<8 + AC<<16
<Regenaxer> the lowest byte first
<Regenaxer> the symbol name "ABC" is encoded as 65 + 66<<8 + 67<<16
<Regenaxer> For application programming, you can ignore all this though
<aw-> hmmm
<aw-> ok
<aw-> can you tell me is it possible to pass a void* pointer to a C function from picolisp?
<aw-> how do i encode it in (struct) ?
<Regenaxer> A void pointer is just a pointer
<Regenaxer> The pointers in 'native' don't have a type
<Regenaxer> 'N' (and 'P' in pil21)
<aw-> if I do (strct P 'N ...)
<Regenaxer> 'native' and also C don't care
<Regenaxer> It is what you *do* with the pointer
<aw-> ok..
<aw-> i just want to know how to send it to a C function
<Regenaxer> you can cast a pointer to any other type
<Regenaxer> yes
<Regenaxer> in this sense C is untyped
<Regenaxer> types exist only statically
<Regenaxer> at *compile* time
<aw-> ?
<Regenaxer> but 'native' does not compile
<Regenaxer> it is an interpreter
<aw-> does (struct P 'N NIL) work?
<Regenaxer> what do you mean?
<aw-> in the native docs, it says use NIL specification for void
<aw-> i guess for extracting a a datastructure
<Regenaxer> yes
<Regenaxer> void is a *return* type
<aw-> ohh i see
<Regenaxer> or nothing in this case
<Regenaxer> the returned value is anything, will be ignored
orivej has joined #picolisp
Green_flame has joined #picolisp
immasheepherrder has quit [Ping timeout: 240 seconds]
rob_w has joined #picolisp
mtsd has joined #picolisp
<aw-> ok thanks Regenaxer
Green_flame has quit [Ping timeout: 268 seconds]
Green_flame has joined #picolisp
<Regenaxer> :)
Green_flame has quit [Quit: Green_flame]
beneroth__ has joined #picolisp
beneroth_ has quit [Ping timeout: 264 seconds]
mtsd has quit [Quit: Leaving]
beneroth__ has quit [Read error: Connection reset by peer]
<tankf33der> Regenaxer: can i put ansi escape sequences to terminal without callling 'tput ?
<Regenaxer> yes, just 'prin'
<Regenaxer> See e.g. @lib/vip.l
<tankf33der> cool.
<tankf33der> works.
<Regenaxer> :)
<tankf33der> will do this as warmup:
<Regenaxer> yeah :)
<Regenaxer> nice warmup ;)
<tankf33der> done.
<aw-> Regenaxer:
<aw-> i will mail the list shortly ;)
<Regenaxer> Good :)
<Regenaxer> Publishing a lib?
<aw-> native lib
<tankf33der> Regenaxer: tweeted.
beneroth has joined #picolisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #picolisp
<Regenaxer> ok
<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.
<beneroth> <3 picolisp community. quality over quantity. fashion people should follow and ruin something else (or nothing, ideally).
<Regenaxer> T
immasheepherrder has joined #picolisp
immasheepherrder has quit [Remote host closed the connection]
immasheepherrder has joined #picolisp
immasheepherrder has quit [Remote host closed the connection]
karswell has quit [Remote host closed the connection]
rob_w has quit [Quit: Leaving]
orivej_ has quit [Ping timeout: 268 seconds]