IRC channel logs

2023-10-11.log

back to list of logs

<antipode>sneek: later tell ohyllad: for interpreting (#:key value) stuff, you can use lambda* / define*.
<sneek>Got it.
<antipode>sneek: later tell mirai: also, you can wrap the package object (or any other lowerable object supporting cross-compilation, relaly), in a with-parameters that sets %current-target-system to what you want.
<sneek>Okay.
<antipode>sneek: later tell mirai: relaly->realy
<sneek>Got it.
<RhodiumToad>there's also let-keywords if you have a key-value list other than in function args
<antipode>sneek: later tell graywolf: variables don't have source locations, the values inside the variable might have a location. Also, on the syntax level, there is syntax-sourcev.
<sneek>Okay.
<antipode>sneek: later tell ohyllad (from RhodiumToad): there's also let-keywords if you have a key-value list other than in function args
<sneek>Okay.
<antipode>(question was from #guix)
<antipode>(misposted my reply -- sneek is cross-channel though)
<old>So I just read this: https://wiki.c2.com/?CommonLispConditionSystem
<old>I wonder why Scheme does not have this?
<haugh>old, unless I'm missing something, this is what SRFI-34 provides via `guard'
<haugh>that is, handler-bind seems analagous to guard. I don't know how these "restarts" compare to conts/prompts
<RhodiumToad>the difference seems to be in how resuming is done
<RhodiumToad>I don't see any reason yet why that couldn't be implemented with prompts
<old>RhodiumToad: I think it could be done with prompt
<old>It is actually the first time I see a decoupling between the selection of action and the action themself
<old>I wonder if this scale well
<graywolf>Is there a way to load a file (module) and extract single variable from it without poluting the current namespace, and do it multiple times? Use case: I need to read a variable (guix package if that matters) from the same module but from different directories (git worktrees).
<sneek>graywolf, you have 1 message!
<sneek>graywolf, antipode says: variables don't have source locations, the values inside the variable might have a location. Also, on the syntax level, there is syntax-sourcev.
<graywolf>Hm, I have "a" solution: https://paste.debian.net/plain/1294767 ; But it only works in my case, because reloading single module is enough. Is there nicer "proper" solution? Or do I need to use (module-uses) and recursively reload everything?
<mwette>graywolf (use-modules ((foo bar) #:select (baz)))
<mwette>or (let ((foo-1 (@ (foo bar) baz)) (foo-2 (@ (bar foo) baz)) ...) ...)
<RhodiumToad>that's not the question
<RhodiumToad>specifically, that only works once
<mwette>right. Then use the stuff from the "module reflection" part of the manual
<RhodiumToad>I didn't see anything there that would help.
<graywolf>I realize this is not exactly common usage case for a module system :)
<graywolf>Documentation in this part of guile seems to be somewhat thiner, make-fresh-user-module for example is not documented at all. So I was curious if I missed something that would make this easier.
<jpoiret>graywolf: i think make-fresh-user-module is documented in the sandboxing part of the manual
<graywolf>jpoiret: I do not see it there, and neither in Procedure Index. Maybe I've just missed it.
<graywolf>I think I do not understand how to use (@ (ice-9 ftw) ftw). Why does this code get directory-not-readable? https://paste.debian.net/plain/1294800
<graywolf>I do have permissions, the ls -la works just fine. I assume I am calling it wrong, but I am unsure what is the right way...
<mwnaylor>What is ftw?
<dthompson>file tree walk
<mwnaylor>Thx. That sounds like something I could use. Does it descend through subdirectories?
<dthompson>yeah. see also file-system-fold for a more general purpose procedure.