<dsmith-work>Oh that would have been wonderful to have when I doing lots of Python a few years ago. ***civodul` is now known as civodul
***chimp_ is now known as Psybur
<daviid>dsmith-work: you could still install and play with it though ... *daviid just installed hy, aptitude install python3-pip, then pip3 install --user hy <daviid>dsmith-work: debian-next informs me python3-hy is in unstable, soon in testing ... fwiw <sneek>I think I remember stis in #guile 24 days ago, saying: o/. <daviid>procrastinating, i rarely use python :), but if ihave, hy is so much better ***berndj-blackout is now known as berndj
<sneek>I've been running for 50 seconds <sneek>This system has been up 1 minute ***regtur_ is now known as regtur
***taw10_ is now known as taw10
<troydm>hi all, how do I stop Guile process? I've tried (quit) from inside a function which is executed when signal is caught but I get <troydm>this is called from inside a thread which is created using (make-thread call <troydm>or rather I'm catch a signal via C routine, which calls Guile which kinda needs to stop process which it does not <troydm>also would be nice to be able to run some code before guile exits when I press Ctrl-D or Ctrl-C when in REPL or typing (quit) from REPL <troydm>typing (quit) from REPL btw works fine ***Noisytoot_ is now known as Noisytoot
<tohoyn>troydm: any use for Guile procedure kill? <tohoyn>you can use getpid to find out the current process id <troydm>I still don't get why uncaught throw is happening when I call (quit) indirectly <tohoyn>^module/ice-9/boot-9.scm in the Guile sources <tohoyn>troydm: you could also take a look at procedure primitive-exit <troydm>I think I might handle signal handling via Guile and then call terminating code, this way it will work in general <troydm>any examples how to catch SIGTERM? <troydm>hmm, actually primitive-exit kinda works but there is only one problem, terminfo is messed up <troydm>maybe because I'm using (activate-readline) when starting REPL <troydm>I need to throw 'quit in REPL's thread, that way it would work <troydm>but I'm not quite sure how this is possible <troydm>are there no ways to signal scheme's repl to stop? <troydm>I start it via scm_shell(argc, argv); call <troydm>well I could literally call C's exit via hooking some C procedure to Guile and then calling it <troydm>but that is not something that I would like to do <troydm>yup, activate-readline is culprit of primitive-exit messing terminal state <tohoyn>troydm: see also "man pthread-exit" ***karlosz_ is now known as karlosz
<troydm>dsmith-work: it does, but in my case I'm calling a quit from a thread which is not a main REPL thread and this unfortunately does nothing <troydm>and I'm not sure how to stop guile, primitive-exit messes terminal settings because I use (activate-readline) <troydm>without using readline it works fine, but I need readline <troydm>as I'm not familiar with Guile, my question still remains if there is no other way to cleanly stop Guile process from another thread which is not main REPL <dsmith-work>Seems like readline should install some kind of atexit handler. Oh, but primitive-exit might be C _exit() ? <troydm>I've checked readline module's code and there is only one exit-hook lambda which just writes history file and clears it <troydm>which is probably not what restores stty settings back to normal <troydm>probably readline library itself adds somekind of a hook to _exit or something I don't know <troydm>because if I exit a process with primitive-exit, stty's echo is disabled which is probably due to readline handling echo internally <troydm>also I'm looking at scm_shell source code and I don't see how this handles REPL, I don't see any loops <troydm>exit (scm_exit_status (scm_eval_x (scm_compile_shell_switches (argc, argv), ┊scm_current_module ())));¬ <troydm>which is called from unwind_readline <troydm>some kind of mechanism to call function on unwinding built into Guile? <troydm>it would have been nice to have some kind of deactive readline function that would disable readline, that would have solved the issue <troydm>well, it seems like unwind_readline is registered as dynamic unwind handler via scm_dynwind_unwind_handler and since when quiting via primitive-exit no unwinding takes place the stty doesn't getts restored <troydm>this is generally the issue because there is no graceful way to shutdown Guile REPL from another thread or even from and another REPL (like the one over remote tcp)