IRC channel logs

2022-09-26.log

back to list of logs

***attila_lendvai_ is now known as attila_lendvai
<cassepipe>Hi ! Just here to report that the link to SICP in the guile webstie is a 404
<dsmith-work>Monday Greetings, Guilers
***attila_lendvai_ is now known as attila_lendvai
<tricon>Top o' the week to ya, dsmith-work.
***ft_ is now known as ft
<lechner>Hi, is the reflective resolve-interface the best way to call procedures in a module programmatically?
<dsmith-work>lechner: Not sure what you mean.
<lechner>dsmith-work: yeah, i was struggling with that language. i would like to open a module for which I have the name in a string
<lechner>Hi, Guile places compiled .go files near the .scm sources. What if the folder is owned by someone else?
<dsmith-work>lechner: That's where the installed system .go files are. Normally they end up under ~/.cache/guile/ccache/
<lechner>dsmith-work: what happens when guile runs as root on scm files in a user-owned directory?
<dsmith-work>Probably drops them in ~root/.cache/
<dsmith-work>Ya, that's what it does
<dsmith-work>sudo ./hello.scm
<dsmith-work>;;; compiled /root/.cache/guile/ccache/3.0-LE-8-4.6/home/dales/hello.scm.go
<lechner>dsmith-work: thank you so much! sorry about the basic questions.
<tricon>lechner: it's a good question.
<lechner>tricon: phew! i should be able to investigate myself, but i am super new
<lechner>Hi, what is the best way to fork and drop privileges while staying in Guile, please?
<jpoiret>i don't think there are guile primitives for dropping privileges, you might want to call the syscalls directly
<jpoiret>depends on what you mean by dropping privileges though :)
<jpoiret>if it's only setuid/gid, then guile should have you covered
<lechner>jpoiret: thanks! i was more worried about primitive-fork as (ice-9 popen) does not seem to cover my use case (but the program is single-threaded)
<jpoiret>you have all the reasons in the world to be worried about primitive-fork
<jpoiret>i wouldn't recommend it, as guile code might call async-signal unsafe functions without you noticing, which is UB
<jpoiret>the cleaner way would be to code a small C function that you would load through extensions