IRC channel logs

2022-09-27.log

back to list of logs

<lechner>jpoiret: and then have the C function call Guile again?
<lechner>also, what is the meaning of UB, please?
<nckx>Undefined behaviour. (The proverbial poisoning your cat & setting your house on fire.)
***iyzsong-alt is now known as iyzsong
<jpoiret>lechner: you want to fork but then not execve?
<jpoiret>while it's a technical possibility that has been around for decades, it should be the last thing you want to use, see https://dl.acm.org/doi/10.1145/3317550.3321435
<jpoiret>oops, the ACM doesn't let you access it easily, see it at https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf instead
<jpoiret>you might think you're not using threads, but in Guile you most likely are since there is a GC finalization thread (which is the source of the "Error in finalization thread: Success" message by the way)
<jpoiret>the finalization thread can be disabled, since finalization can also be done via asyncs, but that highlights how complicated using fork can be
<lloda>does it make sense to do manual allocation manually in Scheme? say a function that allocates a big temporary for internal use, and the function is called over and over. Can i expect to do better than gc by e.g. keeping the temporary in a parameter and reusing it or something of the sort?
<lloda>s/manual allocation/allocation/
<lechner>jpoiret: Thanks for the article! I think Bill Gates paid for it. Joking aside, I would like to temporarily assume a different user id while remaining in Guile. Which other options do I have?
<jpoiret>lechner: isn't seteuid enough?
<jpoiret>if not, I really recommend going the C route
<lechner>jpoiret: the part to be executed as the user is also edited by the user. i think i have to drop the real uid too
<lechner>nckx: thanks!
<lechner>jpoiret: with the C extension, how would i get access to data in the parent process please?
<jpoiret>you can define procedures that can be called from scheme with arguments in C extensions
<jpoiret>that's actually how most C functions in Guile are defined
<jpoiret>for how to communicate between both processes, that's the hard part :) you'll have to pick your poison
<dsmith-work>Tuesday Greetings, Guilers
***civodul` is now known as civodul
***NullPointerErro1 is now known as NullPointerError
<lechner>jpoiret: the data structures are from a C library. are you simply suggesting to fork in C?