IRC channel logs

2025-07-24.log

back to list of logs

<lechner>Hi, is there a way to pass the seeds in fold via 'values' instead of a list, please? i.e something like this, which doesn't work: (fold (lambda (this seeds) (receive (sum product) seeds (values (+ this sum) (* this product)))) (values 0 1) '(1 2 3 4)) thanks!
<identity>lechner: you could do (call-with-values (λ () (values 0 1)) list)
<identity>mv-returns are invalid in argument position
<lechner>identity / thanks! does that work with fold, though?
<identity>i meant that as in (fold (lambda …) (call-with-values (λ () (values 0 1)) list) …)
<mwette>lechner: (sxml fold) has fold-values
<mwette>(fold-values (lambda (item s1 s2) (values new-s1 new-s2)) input orig-s1 orig-s2)
<mwette>note changed order arguments to fold-values wrt fold
<lechner>mwette / i like that. thanks!
<lechner>identity / thanks!
<mgd>Hello. I'm trying to learn guile and I'm writing a little program to parse a http response from an api. Have I done anything wrong here? https://paste.debian.net/1387695/
<mgd>the corresponding manifest.scm file has guile and guile-json
<mwette>Since you use https, I think you may need guile-crypt. But I'm have no depth in guix.
<mwette>s/I'm/I/
<mwette>guile-crypt doesn't look like a package, so maybe it's included in guile
<mwette>maybe it's guile-gcrypt
<lechner>mwette / fold-values is beautiful. thank you!
<janneke>mwette: your simple match macros helped me find and fix/work-around the match bug in mes
<janneke>interestingly, your simple/minimal match implementation triggered exactly the same error as the reference implementation for match that ships with mes
<janneke>it's most probably a hygiene problem with the define-macro based syntax-rules
<janneke>anyway, mescc now runs with nyacc 2.02.06 \o/
<mwette>Oh, good. There's a paper by Dybvig called "Syntax Abstraction: The syntax-case expander" that provide some insight.
<mwette>In that paper there's a reference to syntax-rule impl: William Clinger and Jonathan Rees. "Macros that work."
<mwette>FYI, rework of C parser coming in 2.03. I had to modify the lalr parse machine to support this: typedef int foo; int bar(foo foo); Also added support for __int128, and "canonicalized" the int types to reduce the number that need to be handled downstream.
<mwette>The hoot docs (https://files.spritely.institute/docs/guile-hoot/0.6.1/Building-from-source.html) indicate hoot is in the main branch of guile.git but I don't see it there. What did I miss?
<dthompson>mwette: you need to build guile from main in order to build hoot
<ArneBab>guile-xyz.scm says (uri (string-append "https://spritely.institute/files/releases" "/guile-hoot/guile-hoot-" version ".tar.gz"))
<ArneBab>⇒ different repo
<dthompson>(at least until the next 3.0.x release... whenever that is)
<ArneBab>⇒ guix shell guile-hoot guile-next
<ArneBab>guile-hoot gives you a guild that can build wasm