orivej has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 265 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
orivej has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
<
Regenaxer>
Hi tankf33der!
<
Regenaxer>
Interesting! Without central server?
<
Regenaxer>
I'm quite content with DeltaChat atm
<
tankf33der>
pil32 and pil64 cant work under alpinelinux
<
tankf33der>
musl based.
<
tankf33der>
looks like they hang and do nothing.
<
tankf33der>
alpi386:~# pil @lib/mike.l +
<
tankf33der>
this one works.
<
tankf33der>
alpi386:~# cat picolisp/lib/mike.l
<
tankf33der>
alpi386:~#
<
tankf33der>
(msg 'ok)
<
tankf33der>
repl is broken somehow.
<
tankf33der>
alpi386:~# cat picolisp/lib/mike.l
<
tankf33der>
(msg 'ok)
<
tankf33der>
alpi386:~#
<
tankf33der>
=============
<
tankf33der>
### alarm ###
<
tankf33der>
(let N 6
<
tankf33der>
(wait 2000)
<
tankf33der>
(test 6 N)
<
tankf33der>
(alarm 1 (inc 'N))
<
tankf33der>
(test 7 N)
<
tankf33der>
(alarm 0) )
<
tankf33der>
==============
<
tankf33der>
this code is doesnt work under musl!
<
Regenaxer>
I'm on my way home (from Dentist)
<
tankf33der>
i know aw is alpine user
<
tankf33der>
i use edge branch (rolling releases)
<
Regenaxer>
Hmm, strange
<
tankf33der>
also in repl i cant enter (== 1 1)
<
tankf33der>
because this is musl
<
tankf33der>
not libc
<
Regenaxer>
Not POSIX compatible?
<
tankf33der>
i think a very compatible.
<
tankf33der>
rewritten from scratch, very stable, bla-bla-bla.
<
tankf33der>
this edge versions will 3.11 after a year and if i reinstall 3.10 it will work as before.
<
tankf33der>
in repl:
<
tankf33der>
(== 1 1)
<
tankf33der>
when i enter ) cursor jump to ( and freeze.
<
tankf33der>
Ctrl-C helps.
<
Regenaxer>
yeah, some stdio issue
<
tankf33der>
im testing on alpinelinux for a year, only edge branch this year
<
tankf33der>
always worked before.
<
Regenaxer>
also on musl?
<
Regenaxer>
I think the differences mentioned won't matter
<
Regenaxer>
Can you strace to see where exactly it fails?
<
tankf33der>
installing latest stable 3.10.2
<
tankf33der>
./bin/picolisp cant enter any char
<
tankf33der>
pil + much better
<
Regenaxer>
also no echo?
<
Regenaxer>
bin/picolisp uses no raw mode
<
Regenaxer>
ie. does nothing special to stdio
mtsd has joined #picolisp
<
tankf33der>
thats why.
<
tankf33der>
i entered (== 1 1)
<
Regenaxer>
newselect
<
Regenaxer>
no idea
<
Regenaxer>
select() system call?
<
Regenaxer>
it gets timeout immediately
<
Regenaxer>
Maybe the arguments passed don't match somehow
<
tankf33der>
this is under libc.
<
tankf33der>
so musl
<
Regenaxer>
yes, 9.select(1, [0],
<
Regenaxer>
[] on musl, ie no file descriptor
<
Regenaxer>
[0] is stdin
<
Regenaxer>
So the passed arguments dont match
<
Regenaxer>
The C call to select
<
tankf33der>
check line: 221
<
tankf33der>
2141 - select no longer modifies timeout on failure (or at all)
<
tankf33der>
now i have musl 1.1.24
<
Regenaxer>
"select no longer modifies timeout"
<
tankf33der>
alpinelinux 3.10 - 1.1.22
<
tankf33der>
alpinelinux 3.9 - 1.1.20
<
Regenaxer>
? (not (member *TargetOS '("Linux" "Android")))
<
Regenaxer>
in src64/io.l
<
Regenaxer>
this
*uses* the fact that timeout is modified
<
Regenaxer>
on Linux
<
Regenaxer>
gives better performance
<
Regenaxer>
see man select(2)
<
Regenaxer>
"On Linux, select() also modifies ..."
<
Regenaxer>
So musl breaks that!
<
Regenaxer>
Same on pil32, src/io.c
<
Regenaxer>
#ifndef
__linux__
<
Regenaxer>
gettimeofday(&tt,NULL);
<
Regenaxer>
t = tt.tv_sec*1000 + (tt.tv_usec + 500)
<
Regenaxer>
So this is definitely the reason
orivej has quit [Ping timeout: 240 seconds]
mtsd has quit [Ping timeout: 240 seconds]
rob_w has joined #picolisp
mtsd has joined #picolisp
mtsd has quit [Ping timeout: 245 seconds]
mtsd has joined #picolisp
beneroth has joined #picolisp
<
Regenaxer>
hmm, one thing I don't understand: select() is a system call, thus handled in the kernel. How can musl mess with that?
rob_w has quit [Quit: Leaving]
<
beneroth>
hi Regenaxer
<
beneroth>
musl the C library?
<
Regenaxer>
Hi beneroth! Yes, see discussion this morning
<
tankf33der>
musl is replace for libc
<
Regenaxer>
yeah, I know it is pselect internally on Linux
<
Regenaxer>
still, select() is just a glue to a system call
<
Regenaxer>
Seems the timing was calculated in libc and not in the kernel
<
Regenaxer>
Well, in fact I believe it is poll(2) intnerally
<
Regenaxer>
"The Linux ppoll() system call modifies its tmo_p argument."
<
Regenaxer>
Weird, it then says that glibc
*hides* it in case of Linux
<
Regenaxer>
Why do they do that? It is a very useful value
<
Regenaxer>
Without, I need two gettimeofday ssystem call for each select/poll call
<
Regenaxer>
What a waste as the value seems there already!
<
Regenaxer>
Is there no portable way to get the timeout diff?
<
Regenaxer>
Without doing 3 system calls instead of one?
<
Regenaxer>
Why are they messing around with such basic things after decades?
cil_z has joined #picolisp
freemint has joined #picolisp
<
cil_z>
good afternoon
<
Regenaxer>
Hi cil_z!
<
cil_z>
hello Regenaxer
<
Regenaxer>
I'll answer your question in the list late
<
Regenaxer>
out at the moment
<
DKordic>
Good morning everyone.
<
Regenaxer>
Hi DKordic!
<
cil_z>
Thanks Regenaxer!
<
Regenaxer>
No prob :)
<
Regenaxer>
It is good that you are asking
mtsd has quit [Ping timeout: 276 seconds]
<
beneroth>
hi cil_z
<
beneroth>
hi tankf33der
mtsd has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
<
Regenaxer>
Ah, haha, cil_z, sorry! This time the question is from Kashyap, not you :)
<
cil_z>
Beneroth, hello!
<
cil_z>
Regenaxer ;-)
freemint has joined #picolisp
mtsd has quit [Ping timeout: 245 seconds]
mtsd has joined #picolisp
freemint has quit [Ping timeout: 268 seconds]
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
beneroth has quit [Quit: Leaving]
freemint has quit [Ping timeout: 240 seconds]
andyjpb has joined #picolisp
<
jcowan>
I operate day to day on newlib, and it's amazing how much stuff assumes glibc, usually without realizing it.
<
Regenaxer>
I believe
bitmapper has joined #picolisp
<
bitmapper>
anyone online?
<
bitmapper>
i got ersatz picolisp building with graalvm native-image
<
bitmapper>
it works
*very* well
<
Regenaxer>
oracle java?
<
bitmapper>
graalvm is a version of the jvm that supports AOT compilation
<
bitmapper>
i used the open source version
<
Regenaxer>
Did it compile right out of the box?
<
bitmapper>
it did, just needed a config to help deal with the reflection
freemint has joined #picolisp
<
bitmapper>
going to measure properly, but from what i can tell it uses 2mb of memory
<
Regenaxer>
Ah, that's nice. OpenJDK grabs 600 mb or so
<
bitmapper>
stuck on macos, so this is my last resort :p
<
Regenaxer>
How do you mean "stuck on macros"?
<
Regenaxer>
ah, haha! Sorry :)
<
Regenaxer>
If you wait a year or so, Pil will perhaps run on MacOS again
<
Regenaxer>
LLVM based
<
bitmapper>
the only thing is you can't call java functions from picolisp
<
Regenaxer>
Currently researching
<
Regenaxer>
You can
<
bitmapper>
no, i meant in this version
<
bitmapper>
it is literally a native version of the program, it can't JIT
<
Regenaxer>
In current PicoLisp you can call a JVM via piqes
<
Regenaxer>
It is used heavily in Android apps
<
bitmapper>
what's even crazier is you can intermix languages on graalvm
<
bitmapper>
C, Java, JS, R, Python, Ruby
<
bitmapper>
it's a really interesting platform
<
Regenaxer>
Sorry, interrupt
karswell has quit [Read error: No route to host]
<
bitmapper>
you can call java methods, but you have to add them to the reflection config
cil_z has quit [Ping timeout: 276 seconds]
<
tankf33der>
bitmapper: what i need to ersatz on graal?
<
bitmapper>
i'll upload the config in a second
<
tankf33der>
or post to mailling list?
<
tankf33der>
reddit?
<
tankf33der>
blog post?
<
tankf33der>
perfect
mtsd has quit [Quit: Leaving]
bitmapper has quit [Ping timeout: 245 seconds]
freemint has quit [Ping timeout: 250 seconds]
freemint has joined #picolisp
bitmapper has joined #picolisp
andyjpb has quit [Ping timeout: 252 seconds]
orivej has joined #picolisp
bitmapper has quit [Remote host closed the connection]
bitmapper has joined #picolisp
bitmapper has quit [Ping timeout: 240 seconds]
karswell has joined #picolisp
andyjpb has joined #picolisp
bitmapper has joined #picolisp
<
bitmapper>
aww, ersatz picolisp is missing pr, wr, and rd
<
bitmapper>
i don't have the knowledge to add the missing stuff
<
jcowan>
And you a bitmapper, too! Read bytes and take them apart into bits, or the opposite.
<
bitmapper>
it's moreso that i don't know java
<
jcowan>
On Linux, how does pil map the external bytes to internal bits, little-endian or big-endian? I suppose it's little-endian.
<
bitmapper>
i guess it's either ersatz with graal or minipicolisp since i'm on macos
xkapastel has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
freemint has joined #picolisp
andyjpb has quit [Ping timeout: 265 seconds]