chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Possible formating Bug in SRFI-19?


From: Elf
Subject: Re: [Chicken-users] Possible formating Bug in SRFI-19?
Date: Mon, 18 Aug 2008 09:02:41 -0700 (PDT)


chicken doesnt have bignums at the moment.  it doesnt matter if other schemes
can do it or not, the manual explicitly states that the full numeric tower
is not present by default.  the only way currently to represent integers
larger than fixnum, without using the numbers egg, is to use doubles, which
happens automatically.  if you're seriously proposing modifying all of the
output procedures, you're mad.  if you need bignum support in the short term,
use the numbers egg.  if you dont, wait until the compat lib is out, which
has a full numeric tower.

-elf

On Mon, 18 Aug 2008, Jörg F. Wittenberger wrote:

Am Montag, den 18.08.2008, 11:15 -0400 schrieb John Cowan:
Jörg F. Wittenberger scripsit:

Right now (time-second (date->time-utc (current-date))) is 1219068469.

Which is bigger than a Scheme fixnum.  That's the source of the trouble.

Chickens's fixnum on 32bit platform, to be precise.

But that doesn't matter much.

(Letting alone, that other Schemes will display 1219068469 without ".0";
wich, according to R5RS are both ok.)

The point is the trouble is there, SRFI-19 date->string should print
without ".0" - it really disturbs, if used in HTTP/SMTP headers and the
like.  For the time being, I'm using string-index-right and substring to
get rid of it.  Something, which works, but it leaves a bad feeling in
the stomach.  I had no better idea, sorry.

/Jörg


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]