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.
<abcdw>wingo: We have another discussion on equality comparison raised on guile-devel: https://yhetil.org/guile-devel/47D08644-D34F-43C2-9B0C-24A790F3CEA7@abou-samra.fr/
<ArneBab>cow_2001: maybe jump right into spritely? https://spritely.institute/
<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>i did some really horrid json reading
<cow_2001>but it works as intended (for now) so i'll just push it as it is
<cow_2001>horrid https://git.sr.ht/~kakafarm/guile-clipboard-speaker/commit/a87f916ab31c586b4daf9a27391892c2af93a819
<cow_2001> https://git.sr.ht/~kakafarm/guile-clipboard-speaker/commit/a87f916ab31c586b4daf9a27391892c2af93a819#clipboard-speaker.scm-1-56
<cow_2001>oh, i could have used the match inside the filter
<cow_2001>but not quite
<old>I suspect that lslocks parse the /proc filesystem, which is extremely slow
<old>it depends on the use case I suppose
<cow_2001>i don't notice a latency
<cow_2001>(is that the right word here?)
<old>peformance bottleneck
<old>but like I said, it depends on the use case
<old>like the frequency of calling lslocks
<cow_2001>human pressing a keybinding
<cow_2001>i can't imagine it being used for any other purpose
<cow_2001>thank you for the heads up
<cow_2001>failure of programmers' imagination in how their users would use their programs https://xkcd.com/1172/
<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
<spk121>will get you halfway: https://paste.debian.net/1283840/
<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>will post an example, a moment
<rgherdt>hmm, paste.debian.net blocks my example with the message "do not spam"
<rgherdt>pasted it here, but the indentation is broken: https://dpaste.org/mdAaC
<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
<rgherdt>s/neable/enabled