beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
<viaken> Fault tolerance? I've not kept up with recent dev.
<beneroth> you mean the picolisp quiche edition?
<beneroth> it's basically about not being able to crash the current process, especially when using PicoLisp as a shared library via FFI.
aw- has left #picolisp [#picolisp]
aw- has joined #picolisp
_whitelogger has joined #picolisp
aw- has joined #picolisp
rob_w has joined #picolisp
<abu[7]> Since libreadline version 8.3.1 PicoLisp crashes in readline on signals (e.g. Ctrl-C) !!
<tankf33der> morning
<abu[7]> Hi tankf33der!
<tankf33der> abu[7]: can not repeat on this readline version
<abu[7]> It does not crash?
<tankf33der> maybe i do something wrong.
<tankf33der> no crash
<abu[7]> Just Ctrl-C or Ctrl-Z
<abu[7]> or send SIGTERM
<abu[7]> Here it crashes on Termux and on Debian
<abu[7]> on an older Debian with 8.2. it is OK
<tankf33der> if i press Ctrl-C in : mode it switches to ! mode
<tankf33der> no crash
<tankf33der> alpine linux
<abu[7]> I see
<tankf33der> llvm20
<abu[7]> Readline is 8.3 ?
<tankf33der> latest 8.3.1
<abu[7]> "Fixed signal checking in callback mode to handle signals that arrive before
<abu[7]> readline restore's the application's signal handlers.
<abu[7]> "
<abu[7]> So something was changed
<tankf33der> no crash no debian 13 too here, readline 8.2-6. how you get newer version of readline?
<abu[7]> I have 8.3.1 on Termux and 8.3-2 on Debian
<abu[7]> apt install'ed
<abu[7]> Perhaps 8.3.1 was still OK?
<tankf33der> unknown.
<abu[7]> I send a mail to bug-readline@gnu.org
rick42_ has joined #picolisp
tankf33der_ has joined #picolisp
beneroth_ has joined #picolisp
beneroth has quit [*.net *.split]
viaken has quit [*.net *.split]
rick42 has quit [*.net *.split]
tankf33der has quit [*.net *.split]
tankf33der_ is now known as tankf33der
viaken has joined #picolisp
rob_w has quit [Quit: Leaving]
beneroth has joined #picolisp
beneroth_ has quit [Ping timeout: 265 seconds]
azynheira has joined #picolisp
iogrt has joined #picolisp
<azynheira> Hello all
<iogrt> hello!
<abu[7]> Hi!
<azynheira> I dont know if anybody already tried the new stuff from today
<iogrt> what's new
<azynheira> But I am getting compilation errors
<azynheira> building the so library version of pil
<azynheira> Maybe I am doing something wrong ...
<abu[7]> The one just released a few min ago?
<abu[7]> Perhaps I forgot some file?
<azynheira> ~/pil21/src ❯ make so
<azynheira> lib.so.c:213:15: error: incomplete definition of type 'struct tm'
<azynheira>    return Time->tm_year+1900 | (Time->tm_mon+1) << 16 | Time->tm_mday << 24;
<azynheira>           ~~~~^
<azynheira> lib.so.c:188:15: note: forward declaration of 'struct tm'
<azynheira> static struct tm *Time;
<azynheira>               ^
<azynheira> lib.so.c:213:37: error: incomplete definition of type 'struct tm'
<azynheira>    return Time->tm_year+1900 | (Time->tm_mon+1) << 16 | Time->tm_mday << 24;
<azynheira>                                 ~~~~^
<azynheira> lib.so.c:188:15: note: forward declaration of 'struct tm'
<azynheira> static struct tm *Time;
<azynheira>               ^
<azynheira> lib.so.c:213:61: error: incomplete definition of type 'struct tm'
<azynheira>    return Time->tm_year+1900 | (Time->tm_mon+1) << 16 | Time->tm_mday << 24;
<iogrt> oh, I'm still on 24.3.30, NixOS distribution seems a bit outdated
<abu[7]> Hmm
<azynheira> Is there a minimal version of clang that I can recall?
<abu[7]> clang installation?
<azynheira> yes
<azynheira> I am using 14
<abu[7]> Should be good
<azynheira> I think we test a few months ago and it was ok
<azynheira> yeah
<abu[7]> Must be with lib.so.c
<abu[7]> it is new
<abu[7]> Here it works fine
<azynheira> I assumed so, I just wanted to be sure it was not my fault
<azynheira> maybe I have some strange header files ... let me check
<azynheira> make so should do it right?
<abu[7]> lib.so.c is just lib.c with some parts removed
<abu[7]> T
<abu[7]> just make so
<abu[7]> (cd src; make so)
<azynheira> yes thats me
<azynheira> I have make clean first
<abu[7]> oh
<azynheira> unless my sys/time.h is garbage
<abu[7]> The normal Pil builds?
<azynheira> yes
<abu[7]> I look at:
<abu[7]> $ diff src/lib.c src/lib.so.c
<abu[7]> Removed something critical perhaps?
<azynheira> But it works on your side
<abu[7]> yes
<abu[7]> Removed includes are only readline and ffi
<azynheira> Whats failing is a Time struct
<abu[7]> struct tm *Time
<azynheira> yes
<abu[7]> this did not change
<abu[7]> strange
<azynheira> lib.so.c:213:15: error: incomplete definition of type 'struct tm'
<azynheira>    return Time->tm_year+1900 | (Time->tm_mon+1) << 16 | Time->tm_mday << 24;
<azynheira> incomplete definition ?
iogrt has quit [Quit: Client closed]
<abu[7]> strange indeed
<azynheira> yes
<azynheira> It I include time.h
<azynheira> it works
<azynheira> replace
<azynheira> sys/timh.
<azynheira> sys/time.h
<azynheira> by time.h
<azynheira> dont know why
<azynheira> #include <time.h>
<azynheira> both pil and so build fine
<abu[7]> Hmm, perhaps the readline includes include time.h
<azynheira> ~/pil21/src 7s ❯ rg time.h
<azynheira> httpGate.c
<azynheira> 11:#include <time.h>
<azynheira> 13:#include <sys/time.h>
<azynheira> sysdefs.c
<azynheira> 13:#include <time.h>
<azynheira> 20:#include <sys/time.h>
<azynheira> pico.h
<azynheira> 19:#include <time.h>
<azynheira> interesting
<azynheira> some include sys/time.h
<azynheira> and some include time.h
<abu[7]> I better put <time.h> into pico.h
<azynheira> whats the difference ?
<abu[7]> I think it worked because readline was included
<abu[7]> moment
iogrt has joined #picolisp
<abu[7]> I release again
<azynheira> what was the problem ?
<abu[7]> time.h it seems
<azynheira> I dont get it, some folk say sys/time.h is better for portability some dont
<abu[7]> yeah, it is a mess
<abu[7]> Can you download again?
<azynheira> Doing it now
<abu[7]> I added #include <time.h> to pico.h
<azynheira> now both work again
<abu[7]> 👍 :)
<azynheira> Why does it work on your side ?
<abu[7]> Some system includes differ probably
<abu[7]> They all load each other :)
<azynheira> So it just depends on your local instalation
<azynheira> yeah
<azynheira> The wonders of C and the including of includes :P
<abu[7]> sigh
<azynheira> :-)
<iogrt> I have another topic, I was wondering how namespaces work, specifically their structure and if it would be possible to define a namespace for my data stored on the database
<iogrt> I took a look at what `pico` returns but I don't see how those symbols point to a definition
<abu[7]> Namespaces are just 'idx' trees
<abu[7]> They have a tilde as a special marker
<abu[7]> YoÜ can treat them as normal Lisp structures
<abu[7]> and thus store and retrieve from a DB
<abu[7]> (setq newNamespace otherNamespace)
<beneroth> namespaces are basically a thing during read-time
<abu[7]> (symbols '(newNamespace pico))
<abu[7]> yes
<beneroth> my recommendation would be to not use them heavily, and not use them in any symbols to be stored in the database
<beneroth> you can do it, but namespace ordering / definitions need to be always the same when writing/reading/loading from database.
<abu[7]> DB symbols are not a problem unless the order is changed
<beneroth> the picolisp symbol (I mean normal symbol, not externals - all symbols in general) does not know in which namespace it is
<abu[7]> I use them in PilBox for DBs
<beneroth> abu[7], T, but coming from other namespacing systems one can easily expect that order of namespaces doesn't matter, that it's just as additional prefixes - this is not how it works in picolisp
<abu[7]> true
azynheira has quit [Ping timeout: 250 seconds]
<beneroth> iogrt, simply speaking, a namespace in picolisp is just a named tree of global symbols, where the reader (R from REPL) places the symbol instead of the default global symbol tree/collection
<beneroth> hm...not sure if this is so simple to understand xD
<abu[7]> I think it is :)
<abu[7]> The rules are here:
<abu[7]> "Invariant namespace order"
<beneroth> yeah its simple, but maybve not simple to communicate. I think namespace is a topic where (like with arrays) people often come with quite complicated assumptions how it works...
<abu[7]> right
<beneroth> instead of sticking to the precise definition :)
<abu[7]> In Cl and Scheme it is about *definitions*, not symbols
iogrt has quit [Quit: Client closed]
<abu[7]> they talk about function and variable namespaces
<abu[7]> in pil it is strictly symbols
iogrt has joined #picolisp
<iogrt> but what does the tree do? replace the symbol with something else right?
<iogrt> trying to break away at my assumptions
<abu[7]> It is for lookup
<abu[7]> The reader sees "(a b c)" and must find or create the symbols a, b and c
<iogrt> and once it finds them what does it do? no replacement?
<abu[7]> Next time 'a' is seen it must find the same sym
<iogrt> just a matter of knowing if they exist or not?
<abu[7]> right
<abu[7]> Why replace?
<iogrt> like I'd think the namespace would hold the definition of the symbol
<abu[7]> No, the definition is *in* the symbol
<abu[7]> in the value
<iogrt> hmm okay, so namespaces don't help me much it seems like
<abu[7]> Nametpaces are only about *names*
<abu[7]> : (symbols 'ap 'pico)
<abu[7]> -> (pico)
<abu[7]> ap: foo
<abu[7]> -> NIL
<abu[7]> ap: ap
<abu[7]> -> (\~ (foo))
<abu[7]>
<abu[7]> ap: (all 'ap)
<abu[7]> -> (foo) # ap~foo
<abu[7]> A namespace holding a single symbol
<iogrt> yeah okay
<iogrt> I really need a meta-language for my case then
<abu[7]> Ideal for Lisp then :)
beneroth has quit [Read error: Connection reset by peer]
iogrt has quit [Ping timeout: 250 seconds]
azynheira has joined #picolisp
<azynheira> Also, adding
<azynheira> soTest.c:20:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
<azynheira> #include <stdlib.h>
<abu[7]> ah
<abu[7]> ok
<azynheira> to get rid of this warning
<azynheira> on soTest.c
<abu[7]> Doing, thanks!
<azynheira> Its being picky ... but nevertheless :-)
<abu[7]> No, good you tell this. Debian does not complain
<abu[7]> Released
<azynheira> :-)
iogrt has joined #picolisp
iogrt has quit [Ping timeout: 250 seconds]
iogrt has joined #picolisp
<iogrt> started looking at the web gui programming and this link seems broken: https://software-lab.de/doc/form/form.html
azynheira24 has joined #picolisp
azynheira has quit [Ping timeout: 250 seconds]
azynheira24 has quit [Ping timeout: 250 seconds]
<abu[7]> iogrt: Sorry, the form docs are no longer maintained
<iogrt> that's okay. You decided to stop documenting libraries?
<abu[7]> They were outdated
<abu[7]> and never really complete
<iogrt> I think I got it the picolisp-explored series covered the important parts, the rest I can read the code
<abu[7]> ok
<abu[7]> the form docs had benn written by Matthias
<abu[7]> a big task
<iogrt> the mechanism of communication is interesting, was there a reason for having to route to a new port? why not just a new url?
<abu[7]> It needs its own process
<abu[7]> for each session
<iogrt> hmm I see
<abu[7]> so each process gets its own port to listen
<abu[7]> in some way it *is* a new URL
<iogrt> I think I'd like something more web standards based, but the GUI library seems very handy for form elements, I'll have to think
<abu[7]> Usually behind httpGate, so the port is encoded in the path
<iogrt> also, I totally lose control of the repl once I start a server
<abu[7]> Should not be :)
<abu[7]> I can show next Friday
<abu[7]> The REPL is always running in dev mode
<iogrt> yes, I'll hold off on spamming this chat too much
<abu[7]> no problem
<abu[7]> not much traffic here ;)
<iogrt> problem seems to be when I try Ctrl-D'ing out after starting a server, I can't get out and also start losing keystrokes
iogrt has quit [Quit: Client closed]
beneroth has joined #picolisp