IRC channel logs
2023-06-22.log
back to list of logs
<abcdw>wingo: Yep, figured it out quite quickly it was because the comparison inside compare-and-swap happens with eq? or some similiar mechanism, not eqv? or equal? and I was providing two identical lists instead of using the same list. <cow_2001>is there a way of finding who owns a file lock? (checks the mans) yes there is, but it's the shell command lslocks. <old>cow_2001: file lock are cooperative in their nature <old>so one could for example, take the lock on file X then write its PID to file X.lock <old>that would be one way <cow_2001>i think instead of using pid file i ended up implementing a lock file. now i don't need to know the locking process's pid because lslocks knows it. <cow_2001>but it works as intended (for now) so i'll just push it as it is <cow_2001>oh, i could have used the match inside the filter <old>I suspect that lslocks parse the /proc filesystem, which is extremely slow <old>it depends on the use case I suppose <old>peformance bottleneck <old>but like I said, it depends on the use case <old>like the frequency of calling lslocks <cow_2001>i can't imagine it being used for any other purpose <old>okay anything with human frequency is fine <rgherdt>hi! Is there a way to get a debugger open when an exception is thrown in a srfi-18 thread different than the primordial one? In my case I'm experimenting with Guile's web server and would like to have the server running in the background in a way I can redefine stuff, but still get a debugger to investigate any exceptions that occur <spk121>rgherdt: there is definitely some way to do it. I don't know how. But I can tell you how <spk121>to add a repl in another thread so you can inspect global variables and such, so that <cow_2001>thought spawned child process would be killed when parent main process is killed. was wrong. need to (sigaction SIGHUP some-child-process-killing-handler) or something <rgherdt>spk121: cool, will check it out. Thanks! <rgherdt>actually just by using (ice-9 threads) instead of srfi-18 seems to behave as I want, the REPL is not blocked and the debugger fires up. Awesome <rgherdt>hmm, actually the debugger seemed to work, but it doesn't behave correctly, like typing ,bt I get "Unbound variable: t". And telnet hangs. <rgherdt>hmm, paste.debian.net blocks my example with the message "do not spam" <rgherdt>actually I just took the example from the manual ("Web examples") and tried running it in a different thread, also neable the repl server as you suggested