IRC channel logs
2025-08-26.log
back to list of logs
<cow_2001>could use (@ (web client) http-post), but i don't know how to use its "#:streaming? #t" properly with subprocesses. when i tried using it as the input to a "spawn"ed aplay, it just hanged <dsmith>cow_2001, Try it with `strace -f` See what's happening at the syscall level. <dsmith>cow_2001, How does aplay behave when it's stdout is closed... <dsmith>I assume the argument of "-" means use stdin, but my man page for aplay doens't mention that. I assume that pipeline works from a shell command line? <cow_2001>works, yeah. the manpage says you don't need "-" <dsmith>You say it just hangs? Did the strace reveal what process was waiting for something? <dsmith>old, Ah, didn't see your paste. So it's blocked on a wait() ? <dsmith>SO the line 35 is the apley? And line 38 is waiting on it? <dsmith>I'm suspicions of closing the output port. Maybe try disabling the (close pipeline-output-port) and see if that makes a difference. <cow_2001>dsmith: i do not know how to read strace :\ <dsmith>If you run it with -ff, it will create a separate file for each fork. <dsmith>[pid 58912] read(0, strace: Process 58898 detached <dsmith>So it looks like that process was blocked reading from stdin <dsmith>[pid 58912] execve("/usr/bin/aplay", ["aplay", "-"], 0x7fff7cf74dc0 /* 69 vars */ <unfinished ...> <dsmith>I dont see it execing curl. But it looks like aplay is waiting on stdin <dsmith>Yep. That's the first read() on stdin. <cow_2001>and aplay is trying to read the topmost stdin instead of waiting to be fed stuff on the pipeline? <dsmith>By stdin I mean fd 0. There seems to be a pipe and a dup2 that pipes something into aplay, but I can't tell what it is. Too confusing. <dsmith>And I didn't see curl execed in all that. I see guile and aplay, but not curl. <civodul>rlb, wingo: it looks like there’s a commit on Savannah (main) that’s not on Codeberg, so i guess there’s some confusion <wingo>hmm, yes i think, i think i have some wip-whippet thigns still only on the old place (inertia) <civodul>in Guix we removed commit access on Savannah for almost everyone to reduce the likelihood of mistakes <civodul>and i turned on mirroring on Codeberg (so Codeberg pushes to Savannah) <civodul>(i haven’t been following guile-devel though so maybe i’m just repeating what others said) <civodul>hi lloda! yes, i would love to see it <civodul>i was actually hoping Someone Else™ would take care of it <civodul>it hasn’t happened yet but i’m happy to provide guidance to whoever steps up <lloda>any outstanding bugs that should be fixed before? <ArneBab>civodul: did you spot my email where I asked for merge-permission on codeberg? <rlb>civodul: oh, obviously didn't know/remember codeberg was already the primary. <whereiseveryone>feels a bit unnecessarily complicated for introducing and explaining when <identity>whereiseveryone: i assume this is the reason: “It so happens that the optimizer works best within a lexical context, because all of the uses of bindings in a lexical context are visible, so [using] ‘(let () ...)’ can sometimes lead to important speed improvements.” (info "(guile) Local Inclusion") <identity>whereiseveryone: also, your implementation matches (when #true) because ‘pattern ...’ matches pattern 0 or more times; (begin) is not valid code, though it may be accepted at the REPL <identity>though i think ‘pattern . patterns’ is slightly more idiomatic for that than ‘pattern patterns ...’ <identity>it still annoys me that somewhere in the guile manual there are ‘rest ...’ patterns <identity>whereiseveryone: well, (begin) is simply not valid code, as it has to contain at least one sub-expression, as defined by the standard, or elsewhere <identity>whereiseveryone: or do you mean that as “how can (begin pattern ...) expand to an invalid begin form”? if so, you can imagine (begin pattern ...) being equivalent to (cons 'begin pattern), if ‘pattern ...’ matches '((display "hello") 42) then it will be (begin (display "hello") 42), but if ‘pattern ...’ matches zero forms, it will be '(), and (cons 'begin '()) will be (begin), which is not valid; to guard against that, you <identity>either match a pattern one-or-more times like ‘pattern patterns ...’ or do (begin #false pattern ...) <identity>it is more common to do (begin (if #false #false) pattern ...), as ‘if’ with the <test> evaluating to #false and no <else> specified returns an unspecified value, or (begin (values) pattern ...), where (values) returns zero values, for ‘returns unspecified [number of] values’ <dsmith>Line 1 dups fd 11 -> 3, And then line 4 dups 3 -> 0 <dsmith>Should the first two lines be *after* the other 3? <dsmith>Instead of stdin being what was fd 3 it's actually what was fd 11 <cow_2001>dsmith: i was using (@ (web client) http-post). there are two versions of the same procedure - one that uses the program "curl" and pipes its output to "aplay", and another that uses http-post with a #:streaming? #t response-body, which is supposed to be an input port you could provide as the stdin to "aplay" <cow_2001>http-post takes the key #:streaming? #t denoting that instead of returning a string or bytevector as the second value (the first is the response headers), it returns an input port <cow_2001>the second value returned by http-post is the response body