IRC channel logs

2024-07-11.log

back to list of logs

<haugh>I'm having trouble with the module system and SRFI-42. I've got a module (my-mod) that imports srfi-42 entirely (which I must do or else expansions will fail), and a macro which wraps do-ec. My expansion works from inside my-mod, but if I ,use my-mod from somewhere else, a similar but not identical expansion failure occurs. What is going on with this namespace? How do I troubleshoot this?
<haugh>It's an older guile: 3.0.5
<polyex>anyone know how guile runs on freebsd?
<ArneBab>haugh: maybe you have to re-export do-ec?
<cpli>is there a `keys->alist`?
<haugh>ArneBab, just do-ec doesn't do it, but re-exporting the whole public API does, as well it should. I'm going through it manually trying to find the necessary combination. In my module I invoke (do-ec qualifier my-expression) and the error is "source expression failed to match any pattern in form (do-ec:do my-expression)". I traced do-ec:do through srfi-42/ec.scm but I can't figure out what else it
<haugh>needs besides do-ec just by reading it. It's a tricky lib.
<cpli>why does (lambda* (#:key #:allow-other-keys #:rest rest) rest) give the error:
<cpli>Undefined symbol #f
<haugh>ArneBab, FYI it was the generic dispatch operator #{:}#
<haugh>So to be clear to anyone who ever finds this log, if you're exporting a custom eager comprehension that wraps do-ec, you need to #:use-module ((srfi srfi-42) #:select (: do-ec)) #:re-export (:)
<haugh>Oh, and all the other generators if you want the option to use those directly... :/
<ArneBab>haugh: arg …
<ArneBab>cpli: you did not give a key?
<fnat>Is there any idiomatic way of converting an assoc list into a ("compatible") record?
<fnat>As opposed to creating the record by reading one field at the time from the assoc-list, I mean.
<rickame>any problem running guile on freebsd?
<bjoli>haugh: If you don't mind bringing some other code along, my own goof loop will not only produce better code than srfi-42 (no mutation) and more powerful in general: https://git.sr.ht/~bjoli/goof-loop
<bjoli>it is more or less foof-loop, but with subloops, a higher order loop protocol and some extra clauses (like :continue)
<bjoli>I thought about making it a SRFI, but three kids are limiting my computer time :)
<Harzilein>hmm
<Harzilein>guess i take that as an invitation to read that particular srfi
<rlb>I sent a bug report to bug-libunistring@gnu.org yesterday, regarding the conversion issue, and as instructed by the libunistring page, and haven't heard anything (no debbugs reply). Anyone know if that's expected, i.e. does it somehow take longer (say due to moderation or something)?
<rlb>(Oh, and it hasn't shown up in debugs, of course.)
<bigbookofbug>if there a guile equivalent to the common lisp "cffi" system? i'm reading the ffi documentation, but unsure on the format
<bigbookofbug>for example, in
<bigbookofbug>`(foreign-library-function "libm" "j0" ...`, would libm be the library