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 <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>guile-crypt doesn't look like a package, so maybe it's included in guile <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. <dthompson>mwette: you need to build guile from main in order to build hoot <dthompson>(at least until the next 3.0.x release... whenever that is) <ArneBab>guile-hoot gives you a guild that can build wasm