IRC channel logs


back to list of logs

<lechner>Hi, what's the canonical way to capture stdout from system*, please?
<flatwhatson>lechner: use pipes instead (
<vixus>hi all, could someone please point me to any documentation for the `=>` syntax? I really can't seem to find it anywhere
<flatwhatson>vixus: the "=>" syntax in what? cond?
<lechner>flatwhatson / thanks! i keep forgetting about the Guile pipes
<vixus>@flatwhatson: Spotted it here ( - Ctrl+F "System Services") and it looked like a define+evaluate shorthand of some kind
<flatwhatson>lechner: couple of examples here:
<flatwhatson>vixus: the meaning of => is given by the macro using it, it's not meaningful by itself
<flatwhatson>in this case it has some special meaning for the guix-service-type macro
<vixus>ah I see. that makes sense now, thank you
<flatwhatson>actually it might be modify-services which gives => its meaning here
<flatwhatson>matching elements of %base-services which are "guix-service-type" or "mingetty-service-type", taking their config as "config", modify it as specified
<vixus>flatwhatson: yes I think ultimately the `=>` syntax is defined here:
<vixus>and then used for modify-services here:
<gabber>\o #guile! how can i get both the standard output of a function and the return value? say, for (lambda _ (display 'foo) 42) i want 42 to be stored in some place and 'foo somewhere else. (with-output-to-string thunk) simply discards the return value, right?
<gabber>ah, i just (set!) from inside the thunk.
<freakingpenguin>Heyo. I'm writing a macro that can take either 1 or 2 arguments, but no more, and the solution I came up involves some code dupe and feels inelegant. Anyone mind taking a look and seeing if there's a better way?
<dthompson>freakingpenguin: a common strategy is to have the cases of fewer args expand to use more args
<dthompson>recursively applying the macro
<dthompson>brief forms expand to more verbose forms with desired defaults
<freakingpenguin>dthompson: Gotcha, thanks!
<dthompson>np :)
<freakingpenguin>Macros are easy right up until you start nesting defines or use ... in odd ways, then my head explodes.
<sneek>tohoyn: Greetings
<tohoyn>sneek: botsnack
<avv>Hey. I have an issue with web requests and I can't seem to find a solution online. When I receive a request with a body, and try to read it with read-request-body, it blocks for a while until the client times out. It hangs endlessly even by sending with curl on the local machine. Has anyone had the same problem?
<avv>The relevant manual page:
<avv>Nvm im really dumb. The web server handler already has a body parameter haha