IRC channel logs

2026-10-06.log

back to list of logs

<jboy>anybody have an idea why I'm getting this when using (ice-9 format) in hoot?
<jboy>FORMAT: error with call: (format #f "~1,1f<===" ===>44.5535305621326� )
<jboy> illegal character `�' in number->string
<dthompson>jboy: ah rats, that would be a bug in our float to string conversion algorithm. are you using hoot 0.9.0 or git main or something else?
<jboy>This is 0.9.0
<jboy>I also noticed I cannot import (ice-9 format) in the hoot repl but it compiles fine
<jboy>also formatting with "~d" works, just this instance using "~f" is failing
<dthompson>what error do you see when you import it? the runtime module system is not complete so features are missing
<dthompson>formatting integers is fine, yeah
<jboy> "library-group only supports modules with #:declarative? #t"
<dthompson>ah okay
<dthompson>I'm surprised it compiled, though
<dthompson>whole-program compilation introduces some restrictions on the dynamism allowed in modules (at least at compile time)
<dthompson>anyway, awhile back andy replaced our reliance on the wasm host to convert floats with an algorithm ported to Scheme from Guile's C code
<dthompson>there were some bugs found in it that have been fixed since. I will try to convert that number on main and see what happens
<dthompson>jboy: could you send the original float you were trying to print?
<jboy>ah okay
<dthompson>the version in the error message has the buggy printing 🙃
<jboy>dthompson: yes, I can do that
<jboy>the exact version is 783793998584611/17592186044416)
<dthompson>cool
<dthompson>phew, (number->string (exact->inexact 783793998584611/17592186044416)) works correctly on the main branch
<dthompson>we will release 0.9.1 (or 0.10.0, not sure yet) before the 30th, when the lisp game jam begins
<jboy>oh good
<dthompson>sorry for the trouble in the meantime!
<jboy>Haha no trouble, it's part of the fun of playing with hoot tbh
<dthompson>if you wanted a bug farm, you got it
<jboy>good for the birbs
<dthompson>chicka dee dee dee dee