IRC channel logs

2026-05-23.log

back to list of logs

<rlb>had no idea c23 has utf8 conversion functions https://en.cppreference.com/c/header/uchar and that c11 has a real utf32 char type...
<apteryx>hello guilers! Is this supposed to produce a warning? (format #f "~a ~a ~:*~a" 1 2)
<apteryx>using (ice-9 format)
<apteryx>I would expect _no_ warning
<apteryx>I'm also a bit puzzled about why (format #f "~d ~2*~d" 1 2 3 4) expects 4 arguments, no less
<apteryx>ah, got it, I thought it was moving backward but it moves forward, that's why
<apteryx>~2:* would move backward
<apteryx>but yeah, I would expect (format #f "~d ~:*~d" 1) to be happy, but it warns with ;;; <stdin>:579:0: warning: "~d ~:*~d": wrong number of `format' arguments: expected 3, got 1
<JohnCowan>apteryx: It looks like the code that generates the warning just counts the number of tildes in the format string and does not understand the semantics of ~*.
<apteryx>JohnCowan: makes sense. that's from the 2010 commit 8e6c15a6f0425c7891ab3bdf267d56c1ac5804ae, IIUC.
<apteryx>a 16 years old "regression", eh :-)
<ity>:-b
<ity>I am a freshman.
<apteryx>JohnCowan: reported in https://codeberg.org/guile/guile/issues/186
<apteryx>#186
<old>pretty sure this is fixed on main
<JohnCowan>just one of the many reasons why format combinators are better than format strings
<old>JohnCowan: you have a SRFI in mind?
<old>hmm it was not exactly that, that I fixed apparently
<apteryx>old: yeah, saw that one when searching; it's a different but from the same code
<apteryx>maybe you could have a look while it's still fresh, it may be easy to fi.
<apteryx>fix*
<old>okay
<JohnCowan>old: srfi 166