IRC channel logs
2025-01-03.log
back to list of logs
<cow_2001>(cond ((library (srfi 0)) 'a)) => error! instead of the symbol a <cow_2001>does guile support the (cond-expand ((library (some library path)) 'a)) where (some library path) is a library you can import and the whole cond-expand value would be a 'a <cow_2001>trying to make srfi-123 work where it is used <cow_2001>oh, and hash: a9cb6dd0156ebbd9ff2448dba05207e885b57608 <cow_2001>i have a feeling i could have just written a compressed base64 message of the format-patch file and it would have been shorter than the above few messages <cow_2001>maybe will write a package definition for guix tomorrow <dariqq>hi, are there examples somewhere for how to catch exceptions with libguile? <dariqq>rlb: thanks, I had some problems how to use scm_c_catch especially how to handle things when the function takes more than one argument but found some examples through searching which helped <dsmith>(That's the code the bot has been using for about the last 20 years or so) <sneek>Sneeky bot running on Guile version 3.0.3 using bobot++ release.2.3.1-6-a463-dirty <dariqq>dsmith: Thanks, currently i am just doing the equivalent of false-if-exception for things like scm_call_x which is a lot more involved than I thought. I guess the macro hides a lot of the complexity away when not using C <lechner>Hi, can this 'car' on top of 'assq-ref' be written more concisely? (let* ((maybe (assq-ref alist key))) (if maybe (car maybe) #f)) <dthompson>yay sometimes the ol' brain gets it right on the first try <lechner>Hi, does anyone have an example for a macro that takes an ellipsis of lists, i.e something like (manufacturer . name) ... to be used with something like (gold-delicious "Golden Delicious Apple") (banana "Cavendish banana") I'm not sure how to access the key and datum separately <dsmith>"(manuf name) ..." and then "manuf ..." and "name ..." <dsmith>Probably not what you meant/wanted. <lechner>can I also use "(manuf name) ..." in one place? <dsmith>If in your template you can have zero or more of that, yeah <dsmith>The classic case is a let with `(binding value) ...` transformed into a lambda with the `(binding ...)` and applying it to the `value ...` <lechner>dsmith / wow, that just solved one of my big feature ideas! <dsmith>mwette, Hah! I was just looking for that! <dsmith>Often the ,,, is used recursively, so with `e1 e* ...` you handle `e1` and then recursively call the macro with `e* ...` <lechner>Discovering Guile changed my world. What a great language! <lechner>Plus, I do whacky things with foreign libraries but somehow it all works