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

Re: [Scheme-reports] Padding/placeholders (hashes) in numerical syntax



Peter Bex scripsit:

> Later I was told that this might be reconsidered if it was shown to be
> really difficult to implement.

It's on the ballot now, and so far there are 4 votes in favor to 0
against to remove it.  We won't be sure for a week or so, though.

> The latest version of this test can be found here:

I picked up version 24935.

> Outputs of other Schemes would be interesting to see as well, and
> suggestions for new testcases are welcome too!

I ran tests against Bigloo, Chez, Chibi, Ikarus, IronScheme, Kawa,
Larceny, Mosh, SCM, SISC, STklos, Ypsilon on a 32-bit Linux
system.  I tried Scheme 9, but it fails on the syntax-rules
declaration.  The modified scripts and results are at
http://www.ccil.org/~cowan/temp/strconv-results.zip .
Here's what I got:

Bigloo:  No complex or rational numbers.  45 errors.

Chez:  All features.  18 errors.

Chibi: All features.  92 errors.

Ikarus: No complex numbers.  34 errors.

IronScheme:  All features.  Lexical scanner gets terminally confused.

Kawa: Internal error attempting to compile (Kawa has no interpreter).

Larceny: All features.  Nan? needs replacement.  10 errors.

Mosh: All features.  Lexical scanner gets terminally confused.

SCM: Inexact complex numbers only.  Test "+nan.0+nan.0i" blows up with
"Wrong type passed to make-rectangular: 0/0" error.  When this is
commented out, 28 errors.

SISC: All features.  Had to comment out Fractions section due to
internal errors.  43 errors.

STklos: All features.  Tests involving fractions whose numerators or
denominators are inexact blow up with "string->number: cannot make
rational" error.  When these are commented out, 19 errors.

Ypsilon: Nan? needs replacement.  28 errors.

The phrase "Nan? needs replacement" refers to the fact that in R6RS-only
systems, nan? accepts real numbers only and cannot be redefined (because
it is imported from the base module).  I therefore changed "nan?" to
"my-nan?" in the script files for those systems.

In R6RS-only systems, "nan?" does not accept a complex number and
cannot be redefined (because it's imported from a module), so I changed
references to "nan?" to "my-nan?" for those systems.

> Personally, I'd also vote against the R6RS "123|45" notation

WG1 voted not to include it; that vote is not being reconsidered.

> One final question: Why was the +nan.0 syntax copied from R6RS but not
> the -nan.0 syntax?  I think it makes sense to allow -nan.0 as well.

It was an oversight.  Ticket filed.

-- 
John Cowan        http://www.ccil.org/~cowan          cowan@x
Please leave your values                Check your assumptions.  In fact,
   at the front desk.                      check your assumptions at the door.
     --sign in Paris hotel                   --Cordelia Vorkosigan

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports