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
_whitelogger has joined #picolisp
orivej has joined #picolisp
libertas has quit [Ping timeout: 260 seconds]
_whitelogger has joined #picolisp
razzy has joined #picolisp
patrixl has quit [Quit: Leaving.]
_whitelogger has joined #picolisp
patrixl has joined #picolisp
patrixl has left #picolisp [#picolisp]
patrixl has joined #picolisp
lodsw has quit [*.net *.split]
_whitelogger has joined #picolisp
<Regenaxer> tankf33der: Implemented 'clip'
<Regenaxer> (and alse 'reverse', 'flip' and 'trim')
<Regenaxer> 'waitFd' event handler was finished before that, but not really tested
<tankf33der> i will play
<Regenaxer> good
razzy has quit [Quit: Connection closed]
<aw-> Regenaxer tankf33der hi
<aw-> is there a 'standard' way to validate if data is _actually_ PLIO when sent using (rd) ?
<aw-> when received* using (rd)
anddam has quit [Quit: WeeChat 2.7.1]
anddam has joined #picolisp
<Regenaxer> Hi aw-! No, there is no check
<Regenaxer> A separate validator can be imagined, but there is not much redundancy to check for
<aw-> does the PLIO format use a special header in the message?
<Regenaxer> no
<Regenaxer> Plio is just an expression
<Regenaxer> You could wrap your own header
<Regenaxer> Plio by itself may be a single byte
<Regenaxer> (and often is, e.g. when reading the DB)
<Regenaxer> You can see PLIO on the same level an an s-exwr
<Regenaxer> you wont want to send redundancy with each parenthesis
<aw-> hmmm I see
<aw-> so validate is just checking if the data matches what I send
<Regenaxer> No, you define some protocol
<Regenaxer> plio is just the raw data
<aw-> ok ok
<Regenaxer> Typical use case is rpc
<Regenaxer> then you have commands and arguments
<Regenaxer> these need to be checked, authenticated etc.
<aw-> right
<tankf33der> aw-: o/
<aw-> ok next question
<aw-> when parent process (fork) some child process, and child sets a global variable (setq *Myvar 1234), how can I make that variable appear in the parent?
<aw-> (tell 'setq *Myvar 1234) ?
<Regenaxer> 'tell' is only from parent to child, and from child to siblings. You can use 'boss'
<Regenaxer> Needs @lib/boss.l
<aw-> boss?
<Regenaxer> It uses 'hear'
<aw-> ohhh
<aw-> and fifo
<Regenaxer> Except that, you could use named pipes
<Regenaxer> yes
<aw-> yaeh i guess a named pipe would wokr
<Regenaxer> T
<Regenaxer> Boss is a little easier perhaps
<Regenaxer> I load it in all apps
<aw-> i see..
<Regenaxer> I use it to reload files in a running app
<Regenaxer> $ psh <app>
<tankf33der> today's two commits are ok
<Regenaxer> : (boss 'load "file.l")
<Regenaxer> Thanks tankf33der
<Regenaxer> So the next started child inherits the loaded file
<aw-> Regenaxer: is (tell) the only way to make a child process do something?
<Regenaxer> Depends what you mean with only way
<Regenaxer> it is the easiest to send something from parent
<Regenaxer> or child to child
<Regenaxer> But you can of cours use anything else
<Regenaxer> sockets, pipes, files
<Regenaxer> signals of course
<Regenaxer> (doc '*Sig1)
libertas has joined #picolisp
<Regenaxer> So in your case, just (boss 'setq '*Myvar 1234)
<Regenaxer> Think well about how to quote
<Regenaxer> (boss 'setq '*Myvar '(some expression))
<Regenaxer> this evaluates in the parent
<Regenaxer> (boss 'setq '*Myvar (some expression))
<Regenaxer> this evals in the current process
<Regenaxer> so often you use 'lit' here to build an epression to be further evaluated by the boss
<tankf33der> there is code for ring code
<tankf33der> receive number from left neib, decrement, send to right neib. Stop when number became zero.
<aw-> good info
<aw-> thanks
<tankf33der> simpler the same above
Blukunfando has joined #picolisp
<tankf33der> verification prove model of protocol used by delta chat
<tankf33der> passed.
Blukunfando has quit [Ping timeout: 260 seconds]
libertas has quit [Ping timeout: 256 seconds]
libertas has joined #picolisp
libertas has quit [Remote host closed the connection]
libertas has joined #picolisp
razzy has joined #picolisp
karswell_ has quit [Ping timeout: 246 seconds]
<beneroth> tic-tac-toe in a single call to printf
<Regenaxer> haha, cool
<tankf33der> just enter (later) in repl in pil21 hangs
<tankf33der> http://ix.io/2ow5
<tankf33der> hangs too, dont eat cpu when hanged.
<Regenaxer> ok, probably waitFd()
<tankf33der> :)
<Regenaxer> Needs strace or so perhaps
<tankf33der> http://ix.io/2owd
<Regenaxer> ? empty
<Regenaxer> ah, now
<Regenaxer> The parent, right? Is waiting
<Regenaxer> 'later' is too heavy
<Regenaxer> uses the full machinery
<Regenaxer> too early to test, so *later* :D
<tankf33der> ok
<tankf33der> (key) the same
<Regenaxer> No, (key) works fine
<Regenaxer> I sets to (raw) mode
<Regenaxer> Try (prog1 (key) (raw NIL))
<Regenaxer> I think (key) can be redesigned
<Regenaxer> so thit it sets cooked mode by itself
<tankf33der> broken.
<tankf33der> (prog1 (key) (raw NIL))
<tankf33der> try this and press arrow up
<Regenaxer> As we now use readline, key conflicts
<tankf33der> hangs, like (later)
<Regenaxer> I think it is not broken
<Regenaxer> you just have raw mode
<tankf33der> ok
<Regenaxer> Arrow key sends an escape sequence
<Regenaxer> you need something like (prog1 (list (key) (key) (raw NIL))
<Regenaxer> or (while (key) ...
<Regenaxer> with delay
<Regenaxer> All tricky :)
<Regenaxer> Problem is that raw mode and readline conflict
<Regenaxer> So readline is not echoing
<Regenaxer> So I said better redesign (key)
<Regenaxer> It should set cooked mode by itself
<Regenaxer> different from pil32/64
<Regenaxer> No problem probably, as (key) is not needed for line input any more
<Regenaxer> afp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
razzy has quit [Quit: Connection closed]
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
elioat has quit [*.net *.split]
elioat has joined #picolisp
aw- has quit [*.net *.split]
aw- has joined #picolisp
Blue_flame has quit [Ping timeout: 246 seconds]
f8l has quit [*.net *.split]
twelvemonkeys has quit [*.net *.split]
casaca has quit [*.net *.split]
casaca has joined #picolisp
twelvemonkeys has joined #picolisp
f8l has joined #picolisp
Nistur has quit [*.net *.split]
DerGuteMoritz has quit [*.net *.split]
Nistur has joined #picolisp
DerGuteMoritz has joined #picolisp
f8l has quit [Remote host closed the connection]
stultulo has joined #picolisp
stultulo is now known as f8l
Blukunfando has joined #picolisp