Re: Bug in srfi-48?

Alex Shinn <[email protected]> Sat, 14 Oct 2017 22:03:22 +0900
Newsgroups gmane.lisp.scheme.srfi.srfi-48
Message-ID <CAMMPzYPAYafLsQxWZcLYh=YppxoDrh4crP+r982Nw+onitr-tA@mail.gmail.com>
--001a11c15d72f5f051055b81653d
Content-Type: text/plain; charset="UTF-8"
X-SL-Modified: truncated_text

On Sat, Oct 14, 2017 at 2:51 AM, Donald Allen <[email protected]>
wrote:

>
> I've been doing this long enough to understand that even mature code
> can have bugs. It's just the nature and quantity of the issues with
> srfi-48 that trouble me. I was intending to use this for generating a
> report that I rely on for assisting me in managing my finances,
> because I prefer working in Scheme. But it's hard to justify that now.
>

There are a few more corner cases, such as numbers that print
with scientific notation, but it's not too late to collect your examples
plus some more to make a test suite and fix any remaining bugs.

You may also be interested in SRFI 159 <https://srfi.schemers.org/srfi-159/>,
where your initial example
becomes:

  (show #f "Framingham Mass Muni Purpose Loan & "
    (with ((precision 2)) .997554209949891) "\\%\\\\\n")

This code is fairly mature, based on the portable fmt
<http://synthcode.com/scheme/fmt/> library which
has been tested on a variety of implementations.

At any rate, feedback on the SRFI would be appreciated :)

-- 
Alex

--001a11c15d72f5f051055b81653d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-SL-Modified: truncated_html

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On S=
at, Oct 14, 2017 at 2:51 AM, Donald Allen <span dir=3D"ltr">&lt;<a href=3D"=
mailto:[email protected]" target=3D"_blank">[email protected]</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><sp=
an class=3D"gmail-"><br>
</span>I&#39;ve been doing this long enough to understand that even mature =
code<br>
can have bugs. It&#39;s just the nature and quantity of the issues with<br>
srfi-48 that trouble me. I was intending to use this for generating a<br>
report that I rely on for assisting me in managing my finances,<br>
because I prefer working in Scheme. But it&#39;s hard to justify that now.<=
br></blockquote><div><br></div><div>There are a few more corner cases, such=
 as numbers that print</div><div>with scientific notation, but it&#39;s not=
 too late to collect your examples</div><div>plus some more to make a test =
suite and fix any remaining bugs.</div><div><br></div><div>You may also be =
interested in <a href=3D"https://srfi.schemers.org/srfi-159/">SRFI 159</a>,=
 where your initial example</div><div>becomes:</div><div><br></div><div><sp=
an style=3D"font-size:12.8px">=C2=A0 (show #f &quot;Framingham Mass Muni Pu=
rpose Loan &amp; &quot;</span></div><div><span style=3D"font-size:12.8px">=
=C2=A0 =C2=A0 (with ((precision 2)) .997554209949891) &quot;</span><span st=
yle=3D"font-size:12.8px">\\%\\\\\n</span><span style=3D"font-size:12.8px">&=
quot;)</span></div><div><br></div><div>This code is fairly mature, based on=
 the portable=C2=A0<a href=3D"http://synthcode.com/scheme/fmt/">fmt</a>=C2=
=A0library which</div><div>has been tested on a variety of implementations.=
</div><div><br></div><div>At any rate, feedback on the SRFI would be apprec=
iated :)</div><div><br></div><div>--=C2=A0</div><div>Alex</div><div><br></d=
iv></div></div></div>

--001a11c15d72f5f051055b81653d--