IRC channel logs

2022-09-17.log

back to list of logs

<lilyp>Zelphir: you could version string-utils, but then it'll complain that the one loaded has the wrong version
<lilyp>alternatively, use GUILE_LOAD_PATH to your advantage, where you make the string-utils you want show up earlier
<Zelphir>lilyp: So if the one I am using directly in my project is loaded before the other one, would it load the string-utils of the package later and thus have all required functions in it?
<Zelphir>And how would it work, if the functions in those libraries were disjunct?
<Zelphir>Sorry, need to leave.
<apteryx>is there anything I can do to determine what kind of data is held by a Guile process memory? I have a Guile program holding 10 GiB of resident memory, I'd like to know why
<spk121>apteryx: there is the 'gc-stats' procedure, but, that doesn't have much detail
<apteryx>can I call this on a running process (it's PID 1 ^^')
<daviid>pid 1? sheperd (?)
<daviid>*shepherd
<spk121>apteryx: well you can add a repl to any program and then use that repl to call gc-stats
<spk121> https://paste.debian.net/1254148/
<spk121>That adds a repl to a program that is allocating GC'able blocks. You can log into that repl with 'nc localhost 8080' and then call gc-stats there
<spk121>There's probably some way of using environment variables with BDW GC, but, I don't know offhand.
<lilyp>apteryx: "sudo herd eval root '(gc-stats)'"
***NullPointerErro1 is now known as NullPointerError
***taiju` is now known as taiju
<rekado>Hi Guilers, I just learned that I cannot tell Guile’s chown to operate on the symlink instead of its target.
<rekado>is there a way to accomplish this some other way?
<rekado>I only want to chown a symlink and keep the ownership of the target unaltered
<unmatched-paren>rekado: you know how stat() follows links but lstat() doesn't? seems like it's the same for chown; there's also an lchown function: https://man7.org/linux/man-pages/man3/lchown.3p.html
<unmatched-paren>maybe try using (lchown)?
<unmatched-paren>i have no idea whether guile has an equivalent, but it's worth a try
<unmatched-paren>rekado: ach "lchown is unsupported at present"
<unmatched-paren>i guess you could simply use the ffi interface
***Furor is now known as Colere
<rekado>I’m trying to do that in a tiny Guile script; defining FFI stuff is not worth the effort in this case.
<rekado>I’ll reluctantly shell out
<unmatched-paren>rekado: untested: https://paste.debian.net/1254176/
<unmatched-paren>oops, forgot to import ice-9 exceptions
<rekado>unmatched-paren: thank you
<unmatched-paren>no problem
<rekado>uid_t and gid_t are not defined; I guess I could just use unsigned ints there
<unmatched-paren>hmm, okay
<rekado>works with uint32
<rekado>thanks again!
<rekado>I’d love to see lchown (and Guix’s mkdir-p) in Guile proper.
***daviwil_ is now known as daviwil
<mwette>rekado: you can probably strip out the right stuff from https://paste.debian.net/1254185/
<mwette>^that's just the first few lines provided to nyacc's ffi-helper
<unmatched-paren>rekado: Hmm, I just realized that lchmod is a little inefficient as it re-binds `proc` every time it's called
<mwette>delay+force will fix that
<antipode>rekado: I sent a patch for various things like lchown (not sure if it actually includes lchown in particular) some months ago, there has been a little progress in getting it merged.
<antipode>sneek: later tell rekado: see https://logs.guix.gnu.org/guile/2022-09-17.log#213447 for lchown
<sneek>Okay.
<apteryx>lilyp: thanks!