<razzy>
is SSA(static single assignment) condition required and checked by make?
<razzy>
when building pil21?
<Regenaxer>
What is an SSA condition?
<razzy>
Regenaxer I have read "Program is in SSA form if every variable
<razzy>
is only assigned once"
<Regenaxer>
correct
<razzy>
it is to ease optimizations
<razzy>
is it checked? do i need to conform to it when making changes?
<razzy>
yeah, propably is
<Regenaxer>
Not by 'make', but by the LLVM assembleb
<razzy>
thx
<aw->
Regenaxer hi
<aw->
i have a question regarding (sync).. if it's called in a child process and the parent was killed with -KILL (-9), the (sync) seems to raise an error "Broken pipe".. and
<aw->
in the child i have a (finally (dosomething) ..) .. and (dosomething) just prints a message to STDOUT
<aw->
that message doesn't appear on my terminal, unless I type something
<aw->
could it be related to (raw) mode?
<Regenaxer>
The parent should *never* be killed with -9
<aw->
yes i know
<aw->
just.. *if*
<Regenaxer>
With SIGTERM (-15) it will kill all children first
<Regenaxer>
Then broken pipe is correct
<Regenaxer>
To the second one: Is stdout writing to the terminal?
<aw->
yes
<Regenaxer>
I use 'msg' usually
<Regenaxer>
So, yes, in raw mode the stream is not flushed
<aw->
so (sync) uses 'msg for the Broken pipe message?
<Regenaxer>
You could call (flush)
<aw->
ah, (flush)!
<Regenaxer>
No, 'msg' is a debug message
<Regenaxer>
Just prints to stderr
<aw->
yes msg outputs to STDERR
<aw->
i use it as well
<Regenaxer>
'sync' does not print anything
<Regenaxer>
it is probably the signal caught
<Regenaxer>
I think the process is in waitFd
<Regenaxer>
i.e. a select() system call
<aw->
right
<Regenaxer>
this call is interrupted by any signal
<Regenaxer>
then it calls sighandler
<Regenaxer>
(I remember now, as I built all this again for pil21 recently ;)
<aw->
so sighandler outputs to stderr
<Regenaxer>
sighandler also does not print
<Regenaxer>
does it say "Select error ... ?
<aw->
i'm just trying to figure out how to handle the error
<Regenaxer>
Better to avoid this error
<aw->
it outputs: [app.l:110] sync write: Broken pipe
<aw->
?
<aw->
and a question mark on a newline
<Regenaxer>
How does it happen?
<Regenaxer>
You said not to kill with -9
<aw->
but the output from (finally (dosomething) ... doesn't appear on the console unless i type a character
<Regenaxer>
ah, ok, so it is indeed sync
orivej has joined #picolisp
<aw->
i sent kill -9 to the parent
<Regenaxer>
yes
<Regenaxer>
don't do that :)
<aw->
just testing, i want to handle the case where parent is dead and child processes are still running
<Regenaxer>
You get corrupted data
<aw->
i know!!
<aw->
that's not the point here
<aw->
i need to handle the situation, some people do it
<Regenaxer>
Redirect stderr?
<aw->
yes i can do that with (err "/dev/null" (sync))
<Regenaxer>
T
<aw->
but my output from (finally (dosomething) .. doesnt appear unless i type something
<aw->
that's the issue
<Regenaxer>
ok, but this is fixed with either (flush) or (out 2 ...)
<Regenaxer>
But then (sync) is not the only place
<Regenaxer>
Such errors may happen everywhere
<aw->
right.. that's why i have (finally)
<aw->
where do i put (flush) ?
<Regenaxer>
After printing something, but you don't print, right?
<aw->
it prints only if i type a character in the console
<aw->
what concerns me is this:
<aw->
] sync write: Broken pipe
<aw->
?
<aw->
the question mark, seems like it's waiting for input or something
<Regenaxer>
yes
<Regenaxer>
sync calls writeErr
<Regenaxer>
So it is a normal error
<aw->
Regenaxer in your programs, in the child process how do you detect if the parent process died?
<Regenaxer>
You can 'catch' it
<Regenaxer>
The child does not detect it automatically
<aw->
i use (sync) ;) which i guess is a hack
<Regenaxer>
The write() in sync fails in this case
<aw->
yes exactly
<Regenaxer>
You could 'tell' directly
<Regenaxer>
To detect if the parent lives:
<Regenaxer>
(kill 0 *PPid)
<aw->
ahhhhhhh kill -0
<aw->
omg i can't believe i forgot that
<aw->
OK that works perfectly!
<aw->
thank you
<Regenaxer>
:)
<aw->
i had one other question
<aw->
(listen 'cnt1 ['cnt2]) .. if cnt2 is 1000, then the socket will close after 1 second
<aw->
is there a way to do that with a named pipe?
<Regenaxer>
Block only a limited time on the pipe?
<aw->
i try (timeout) and (abort) ..
<aw->
yes
<Regenaxer>
yes, abort
<Regenaxer>
(timeout) is just a task
<aw->
hmmm
<Regenaxer>
Does it not work?
<aw->
so (abort) aborts the prg if there's no return value before 'cnt seconds?
<aw->
it works, was just wondering if that's recommended for blocking reads on an FD
<Regenaxer>
I think it is fine
<Regenaxer>
It interrupts with a signal
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
<Regenaxer>
Interrupts anything, not just a read
<aw->
i see
<aw->
ok great
<aw->
one last question sorry: is there a way to handle _other_ signals? like 21 or 22 ?
<Regenaxer>
There are certain signals handled by pil
<Regenaxer>
others need 'native' to install handlers
<aw->
yes i saw USR1 and USR2 and HUP
<Regenaxer>
yes
<Regenaxer>
in main.l they are initialized
<aw->
ok i guess that will do
<Regenaxer>
I think it is tricky
<Regenaxer>
You cannot do things in the signal handler
<Regenaxer>
The interpreter may be in garbage collection
<Regenaxer>
or other critical stuff
<aw->
i see
<Regenaxer>
21 is SIGTTIN ?
<aw->
yes and 22 is SIGTTOU
<Regenaxer>
this is handled
<Regenaxer>
see main.l
<Regenaxer>
On startup all interested signals are initialized
<Regenaxer>
all the same in pil32, pil64 and pil21
<aw->
ok i see it
<Regenaxer>
For a new signal, sighandler needs probably be extended
<Regenaxer>
unless your signal handler just sets a global flag
<aw->
not so important at this point
<aw->
was just curious
<Regenaxer>
ok
<aw->
ok thanks for your help :)
<Regenaxer>
welcome :)
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
rob_w has joined #picolisp
<aw->
picolisp question
<aw->
is there an easy way to ensure one function _always_ gets called before another?
<aw->
ex: each time (dosomething) is called, (dosomethingfirst) runs
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
<aw->
i was thinking of using 'redef to change (dosomething)
<aw->
maybe 'conc ??
<beneroth>
'trace
<beneroth>
maybe?
<beneroth>
debug mode though
<beneroth>
redef
<beneroth>
ah
<beneroth>
no
<beneroth>
aw-, 'daemon
<beneroth>
I believe (daemon) is what you want :)
<razzy>
why was llvm chosen? it seems overcomplicated.
<beneroth>
razzy, compatibly to a wide range of CPU architectures
<beneroth>
instead of writing a picolisp implemention for each CPU architecture
<aw->
beneroth: awesome! thanks!
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
<beneroth>
aw-, alternatively look at the source code of 'trace, it uses (conc) to edit the functions
<beneroth>
but daemon should be the right tool (I haven't used it yet)
<aw->
no no this is exactly what i wanted
orivej has quit [Ping timeout: 256 seconds]
<Regenaxer>
razzy, llvm is not so complicated. Just the llvm-ir code is terribly verbose
orivej_ has joined #picolisp
<Regenaxer>
Besides this, it is extremely simple
<aw->
beneroth: testing now, not sure how it works
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
<rob_w>
Regenaxer, what was the url to reach the db view .. 10.0.0.113/!work ?
<rob_w>
ah nevermind
<Regenaxer>
ok :)
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
rob_w has quit [Quit: Leaving]
miskatonic has joined #picolisp
<beneroth>
Regenaxer, (+List +Ref +String) for identifiers (because multiple spellings/variants of the "same" identifier are in use)
<beneroth>
could I do that as multiple separate properties, but I want all to go into the same single index tree ?
<beneroth>
I think not doable without a custom +index class, or?
<Regenaxer>
yeah, cause (rel . +Cls) is the tree
<beneroth>
of course
<beneroth>
thx
<beneroth>
so could be done with a custom index prefix class which takes an attribute as an argument
<beneroth>
but not with the built-ins
<beneroth>
story is usual: there is a single, string-based identifier
<beneroth>
then it gets reformed into a new variant
<beneroth>
then again
<beneroth>
then again
libertas has quit [Ping timeout: 246 seconds]
<beneroth>
and all formats are of course used, by people, by systems, all nicely mixed
libertas has joined #picolisp
<beneroth>
maybe I go with an extra (+Id +Entity) (rel alias (+List +Ref +String) ...
<Regenaxer>
Not sure
<Regenaxer>
If you have a single index, you have to check for all properties during search
<Regenaxer>
So not much is gained
<Regenaxer>
(+List +Ref +String) is the most natural
<Regenaxer>
Search is easy, but does not distinguish which value matched
<Regenaxer>
I think I would go with separate properties, each its own index, and search in parallel with select
orivej_ has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
<beneroth>
yeah that would be other idea
<beneroth>
I only need one match
<beneroth>
both properties are +Key's
<beneroth>
so when querying, it doesn't/shouldn't matter which property is used, both uniquely identify the object
<beneroth>
but I need to store both values, as both are possibly used in queries.
<beneroth>
and in certain circumstances (when communicating with third party systems) I need to use one or the other property
<beneroth>
so currently my plan is more along the lines of (alias (+Key +Ref +String)) (name1 (+String)) (name2 (+String))
<beneroth>
maybe a custom prefix class for the two name properties which automatically updates 'alias
<Regenaxer>
I would say (+Key +Ref never makes sense
<beneroth>
ah
<beneroth>
right
<beneroth>
I meant (alias (+List +Key +String))
<Regenaxer>
(+Key +Ref2 sommtimes
<beneroth>
T
<Regenaxer>
ah, ok
<beneroth>
wrongly typed, not wrongly thought
<Regenaxer>
yep :)
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Ping timeout: 260 seconds]
razzy has quit [Quit: Connection closed]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
libertas has quit [Remote host closed the connection]
razzy has joined #picolisp
orivej has joined #picolisp
orivej_ has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #picolisp
miskatonic has joined #picolisp
miskatonic has quit [Remote host closed the connection]
miskatonic has joined #picolisp
<beneroth>
Regenaxer, (trace 'nsp~func) is not possible?
<Regenaxer>
Must be possible
<beneroth>
-- Can't trace
<beneroth>
but yeah
<beneroth>
I just put the trace into the namespaced file, then it worked
<Regenaxer>
I just tried here, works
<beneroth>
okay. nevermind.
<beneroth>
if it occurs again I will look into it.
<Regenaxer>
I'd like to know the reason
razzy has quit [Quit: Connection closed]
_whitelogger has joined #picolisp
mario-go` has joined #picolisp
emacsoma1 has joined #picolisp
emacsomancer has quit [*.net *.split]
mario-goulart has quit [*.net *.split]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
elioat has quit [Remote host closed the connection]