<m_mans>
it seem that such subprocess doesn't stopped when I press Ctrl-C and Ctrl-D in debug mode
<m_mans>
I miss something I suppose
<Regenaxer>
^C should stop here. Probably the signal goes to 'curl'
<Regenaxer>
Several ^C don't help?
<Regenaxer>
hmm, no, it waits in pil most of the time. I would expect it to stop
<m_mans>
Main process stops, and after several second I see the error message (I suppose it's from that subprocess) - something related to "error writing to pipe"
<beneroth>
probably the pil IPC ?
<beneroth>
(parent and children are by default connected by pipes)
<Regenaxer>
no ipc involved here, just 'call'
<m_mans>
most time it should be in curl (because of long polling)
<beneroth>
ah, I see.
<m_mans>
in general it's in the IPC family as I understand
<beneroth>
maybe add an additional wait to give you time to issue the Ctrl-c during debugging?
<Regenaxer>
Yeah, so it is not clear here who gets the ^C
<beneroth>
m_mans, maybe you want to put (abort) around the (call) ?
<Regenaxer>
m_mans, 'call' does no I/O to pil
<beneroth>
T
* beneroth
would like to have a nice secure TLS connector without using curl...
* beneroth
also uses curl right now to talk to a SOAP API
<Regenaxer>
or print something before and after the call, so you can stop between that
<m_mans>
what woud happen when they will stop in production mode?
<Regenaxer>
Also, (in '(curl ...) or (pipe (exec 'curl might be more useful than just 'call'
<Regenaxer>
I believe two ^C should always work
<Regenaxer>
'call' makes its own process group, while 'in' or 'pipe' don't (iirc)
<m_mans>
oh, sorry. I use exactly (in '(curl) ..!
<m_mans>
not just call
<Regenaxer>
ah, ok
<m_mans>
then it's more clear?
<Regenaxer>
bash sends signals to all processes in the group I think
<Regenaxer>
So 'call' is kind of detached
<m_mans>
I should try and see when does curl stop
<Regenaxer>
eg if you (call 'vi)
<Regenaxer>
you want signals go to only vi
<Regenaxer>
Do (in ..) or (pipe ..) not stop everything?
<Regenaxer>
What happens if you first do "killall curl", then stop pil?
<m_mans>
let me try
<beneroth>
I would expect broken pipes when you use (in) or (out) and kill the called program
<Regenaxer>
I think otherwise pil gets the kill, and curl continues running because of 'call'
<beneroth>
Regenaxer, but its a sub-process, so also killed, no?
<Regenaxer>
yes, broken pipes may occur, if the called program does not handle them
<m_mans>
no, as I told, in fact no 'call there, just 'in
<Regenaxer>
no, it is a separate process
<m_mans>
T
<Regenaxer>
bash sends ^C signals only to processes in the same process group
<Regenaxer>
pgid
<beneroth>
ah yeah, but I mean when I do "kill <pid>"
<beneroth>
OK
<beneroth>
bbl
<Regenaxer>
yes, kill <pid> always works
<Regenaxer>
unless it is not ignored by the process
<Regenaxer>
Ah, it is not the process group
<Regenaxer>
it is the terminal control probably
<Regenaxer>
tcsetpgrp(0,pid);
<Regenaxer>
done by 'call' only
<Regenaxer>
It is all a mess :(
<Regenaxer>
Perhaps whe strategy in in, out, pipe, call should be done differently?
<Regenaxer>
I'm not sure if it is perfect now
<Regenaxer>
Many years ago I tuned around it a lot until it seemed OK
<Regenaxer>
but who knows?
<Regenaxer>
I asked several Unix gurus, but nobody could tell me exactly how it should be
<m_mans>
ok. I've tried a little.
<m_mans>
1) I did -main -go +
<m_mans>
(no client here)
<m_mans>
while curl is working, I pressed ^C once
<Regenaxer>
Without curl it stops immediately, right?
<m_mans>
when curl exits after a few seconds, I see this error "^C(23) Failed writing body" and then Picolisp stops
<m_mans>
so ^C pressed once doesn't stops curl
<Regenaxer>
This message must be from curl
<m_mans>
but I suppose it stops pil subprocess
<Regenaxer>
is curl called in a pipe?
<m_mans>
or main process
<Regenaxer>
'in' or 'pipe' ?
<m_mans>
'in'
<Regenaxer>
ok
<m_mans>
I can add some message to *Bye, right?
<Regenaxer>
you can strace all processes in separate terminals
<Regenaxer>
yes, *Bye is also good
<m_mans>
ah, T
<Regenaxer>
strace is easier, no code modification
<m_mans>
trying more :)
<Regenaxer>
ok :)
<Regenaxer>
bbl
<aw->
"American scientists are now working on a brand new rice cooker. They're writing it in Picolisp."
<beneroth>
I completed the MOOCs AI (by Peter Norvig & Sebastian Thrun) and ML (by Andrew Ng) in 2011 (two of the 3 first ones by Stanford people)
<beneroth>
was work. enjoyed it. the ML one was much more practical (programming exercises and exams), the AI was more a general introduction
<beneroth>
haven't used that knowledge in practice yet, but the deeper general understanding I found pretty useful
<aw->
sweet
<aw->
beneroth: did you put it on your CV ?
<beneroth>
yes, even put the pdf certificates I got for completing with high scores, but so far it didn't happen that I tried to sell myself to people who could actually understand this above the "oh he took a class which I don't understand what it even is about".. so the certificates I took out again
<aw->
i see
<beneroth>
I usually get contracts from existing word of mouth reputation and my little network.
<aw->
haha yeah same here, much easier
<beneroth>
good enough
<aw->
doesn't work for everyone though
<aw->
have you encountered companies/hiring managers who didn't recognize your MOOC certificates? i.e: who thought it was BS
<beneroth>
maybe I could land better contracts with more reputation and visibility (I have like zero online presence), but I'm not sure if I really could within switzerland and/or with the amount of effort I would find acceptable to put into it
<beneroth>
at the moment my main customer is very close to where I live, has enough issues to have reasons to contract me for quite a longer time, and rest of time I spend webhosting and working on my own products
<beneroth>
other customers I found among my webhosting clients (I took over the webhosting business from another company, which had it as a side-business, not well maintained the last years)
<aw->
yeah that sounds nice, lots of ffreedom
<beneroth>
right. good enough for now, but not the long-term career I would like to stay in (freelancing = fixing other peoples crap, usually without the freedom to fix it right)
<beneroth>
so I hope that in the next few years I can change from contracting to a product business model
<beneroth>
last and this year I actually did/do a lot of custom applications based on my database/webframework (based on pil)
<beneroth>
need to polish and enhance my existing stuff before I can build serial products on top of it (or turn it itself into a product)
<beneroth>
also so far I have only implemented a few pieces of my vision
<beneroth>
everything takes more time than hoped.
<Regenaxer>
ret - Cool, the picolisp rice cooker! Must have for my wife
<beneroth>
but the tendency is good. so I continue :)
<beneroth>
Regenaxer, :D
<beneroth>
I still don't get it.
<aw->
beneroth: yes, productize your business, always good idea :)
<aw->
Regenaxer: haha i knew you would like that one
<Regenaxer>
:)
<beneroth>
are real "us scientists" behind this account? what is the context? why do rice cooker need software?
<aw->
beneroth: it's a bot account
<Regenaxer>
High tech, today's cookers ;)
<beneroth>
ok I see :)
<beneroth>
Regenaxer, IoT! running apache and a directory listing vulnerability on it!
<aw->
there's often bots tweeting random things with the word picolisp
<joebo>
my first approach would be to build nested lists for each object "{" and then traverse and look for "red" as a property and then mark that list as being "dead" and then filter to remove all dead branches and then sum
<joebo>
or maybe use aw's json parser
libertas has quit [Ping timeout: 255 seconds]
libertas has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]