chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] r5rs compliance (part i)


From: Thomas Bushnell BSG
Subject: [Chicken-hackers] r5rs compliance (part i)
Date: Tue, 04 Aug 2009 10:25:23 -0700

I've been thinking about what would be needed for Chicken Scheme to be
fully r5rs compliant.  Looking at the manual section "Deviations from
the standard" in the v4 manual:

[4.1.3, 6.4]: Arguably not a violation, but not worth worrying about.
[4.2.2]: Arguably not a violation (perhaps only detectable in a case
where the independent execution of initializers rule for letrec is being
violated, as in the call/cc examples recently posted)
[6.1]: Not a violation at all.

[6.2.4, 6.2.6, 6.6.2 (read), 6.6.3]: I think this is an important one,
and worth writing a C function to implement the Scheme numeric
conversion rule. 

[6.2.5]: Here there is a mismatch between documentation and reality.
Chicken does have rationals, though it does not have *exact* rationals,
and the lack of implementation of exact rationals, general complex
numbers, or bignums is not a deviation from the standard.  The
non-implementation of make-rectangular and make-polar is not a
deviation, since 6.2.5 requires them only for implementations that
"support general complex numbers", and we only support complex numbers
with imaginary part zero.

So, if the documentation is fixed, the actual deviation is this:
rationalize is not implemented, and numerator and denominator only take
integer arguments.  This isn't too hard to fix without altering the rest
of the numeric implementation in Chicken a bit.  Would a patch be
welcomed?

[6.5]: I'm not up-to-speed enough on the way Chicken deals with syntax
expansion, so I'm not sure how hard it would be to fix this one.  Eval
is way way down on my list of interesting things, though. :)

[6.6.2]: I can't figure out what this is supposed to be saying.  For
example, if I'm at csi, and I just do (char-ready?), the input is
presumably a terminal, but I get #f (which I'd expect).  The
implementation seems to be C_char_ready_p in runtime.c, which uses
select and seems to do the right thing as far as I can tell.

[6.6.4]: Not a violation.

Thomas






reply via email to

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