[racket-dev] Character classification

2012-09-04 Thread Pierpaolo Bernardi
The non-cooperation between char-numeric? and string->number is very annoying. I had to resort to: (define (my-char-numeric? c) (char<=? #\0 c #\9)) Maybe I am missing a function similar to my-char-numeric? somewhere in the Racket docs? FWIW, my humble opinion is that char-numeric? should be

[racket-dev] Character classification

2012-09-04 Thread Pierpaolo Bernardi
The non-cooperation between char-numeric? and string->number is very annoying. I had to resort to: (define (my-char-numeric? c) (char<=? #\0 c #\9)) Maybe I am missing a function similar to my-char-numeric? somewhere in the Racket docs? FWIW, my humble opinion is that char-numeric? should be

Re: [racket-dev] Changing call/cc

2012-09-04 Thread Matthew Flatt
At Thu, 30 Aug 2012 11:36:55 -0400, Asumu Takikawa wrote: > On 2012-08-30 06:53:58 -0600, Matthew Flatt wrote: > > I think this combination of replacing both `call/cc' and `dynamic-wind' > > would be equivalent to a smaller change to the semantics of `call/cc', > > which is that it behaves as it do

Re: [racket-dev] Character classification

2012-09-04 Thread Jens Axel Søgaard
Since the R5RS version of char-numeric? (according to the documentation) tests for the ten digits, you can use: (require (only-in r5rs char-numeric?)) /Jens Axel 2012/9/4 Pierpaolo Bernardi : > The non-cooperation between char-numeric? and string->number is very annoying. > > I had to resort to:

Re: [racket-dev] Character classification

2012-09-04 Thread Pierpaolo Bernardi
On Tue, Sep 4, 2012 at 3:11 PM, Jens Axel Søgaard wrote: > Since the R5RS version of char-numeric? (according to the documentation) > tests for the ten digits, you can use: > > (require (only-in r5rs char-numeric?)) Thanks Jens Axel. However, the r5rs version appears to be the same as the Racket

Re: [racket-dev] Character classification

2012-09-04 Thread Doug Williams
I would say your function would be better named is-digit? and that the char-numeric? is exactly what it is intended to be with respect to Unicode characters, which is what a Racket character represents. On Tue, Sep 4, 2012 at 4:37 AM, Pierpaolo Bernardi wrote: > The non-cooperation between char-n

Re: [racket-dev] Character classification

2012-09-04 Thread Pierpaolo Bernardi
On Tue, Sep 4, 2012 at 3:56 PM, Doug Williams wrote: > I would say your function would be better named is-digit? Good point. However, many of the characters which are char-numeric? are digits too, in other writing systems. > and that the > char-numeric? is exactly what it is intended to be with

Re: [racket-dev] Character classification

2012-09-04 Thread Pierpaolo Bernardi
On Tue, Sep 4, 2012 at 3:56 PM, Doug Williams wrote: > I would say your function would be better named is-digit? Good point. However, many of the characters which are char-numeric? are digits too, in other writing systems. > and that the > char-numeric? is exactly what it is intended to be with

Re: [racket-dev] Character classification

2012-09-04 Thread Sam Tobin-Hochstadt
On Tue, Sep 4, 2012 at 10:57 AM, Pierpaolo Bernardi wrote: > > What is annoying is that char-numeric? and string->number are not compatible. `char-numeric?` and `string->number` would not be "compatible" in the sense you're thinking of, even with the change you mention. For example: -> (string-

Re: [racket-dev] Character classification

2012-09-04 Thread Pierpaolo Bernardi
On Tue, Sep 4, 2012 at 5:03 PM, Sam Tobin-Hochstadt wrote: > On Tue, Sep 4, 2012 at 10:57 AM, Pierpaolo Bernardi > wrote: >> >> What is annoying is that char-numeric? and string->number are not compatible. > > `char-numeric?` and `string->number` would not be "compatible" in the > sense you're t

Re: [racket-dev] Character classification

2012-09-04 Thread Jens Axel Søgaard
2012/9/4 Pierpaolo Bernardi : > On Tue, Sep 4, 2012 at 3:11 PM, Jens Axel Søgaard > wrote: >> Since the R5RS version of char-numeric? (according to the documentation) >> tests for the ten digits, you can use: >> >> (require (only-in r5rs char-numeric?)) > > Thanks Jens Axel. However, the r5rs ve