Yes, I have a copy of it here:
http://smyles.com/projects/r6gambit/darcs/libs/rnrs/unicode/
It should be relatively straight forward if you want to convert it to r5rs.
You will need to change the names for the (rnrs bytevector) procedures into the gambit ones. I have a mapping here:
http://smyles.com/projects/r6gambit/darcs/libs/rnrs/bytevectors.scm
The only changes I made to these libraries was to make the reader syntax compatible with gambit's syntax for u8-vectors and updated the library import headers since they didn't work with the modern r6rs spec.
The r6rs reference implementation has additional documentation on how these libraries are organized.
http://www.r6rs.org/refimpl/r6rs-unicode-library.tar.gz
Arthur
On 15-Apr-09, at 10:53 AM, Alex Queiroz wrote:
Hallo,
On 4/15/09, Bradley Lucier lucier@math.purdue.edu wrote:
At one point my implementations of SRFI 13 and 14 used the internal Gambit API to properly check the types and bounds of arguments and raise exceptions with the proper continuations. That API has changed since I wrote those, but there are only a few macros and types that have to be rewritten to bring it up to date, but I don't have time to do so now.
It built flawlessly with 4.4.2, but then it may give unpleasant surprises at runtime. I'll try to spot the needed changes.
Also, I use a very naive bitmap implementation for character sets, which is OK for Latin-1 but not for Unicode, so a different data structure should be used for that. Haven't done that, either.
Hmmm. this is more serious since I tend to use UTF-8 encoding.
Are you talking about the Unicode character class tables? If I'm not mistaken Will Clinger wrote a fairly compact and fast implementation of those tables. The code must be in Larceny somewhere. I believe it is also part of the reference implementation for R6RS.
Marc
Afficher les réponses par date
Hallo,
On Wed, Apr 15, 2009 at 5:07 PM, Arthur Smyles atsmyles@earthlink.net wrote:
Yes, I have a copy of it here:
http://smyles.com/projects/r6gambit/darcs/libs/rnrs/unicode/
It should be relatively straight forward if you want to convert it to r5rs.
Since I don't know much about the internals of Gambit, I decided to try to start from the reference implementation of SRFI-14. But the 256-char representation that is used won't fly with unicode. If I get clever I will send an update.
Cheers,
Alex Queiroz asandroq@gmail.com writes:
Hallo,
On Wed, Apr 15, 2009 at 5:07 PM, Arthur Smyles atsmyles@earthlink.net wrote:
Yes, I have a copy of it here:
http://smyles.com/projects/r6gambit/darcs/libs/rnrs/unicode/
It should be relatively straight forward if you want to convert it to r5rs.
Since I don't know much about the internals of Gambit, I decided
to try to start from the reference implementation of SRFI-14. But the 256-char representation that is used won't fly with unicode. If I get clever I will send an update.
You might want to look at the iset (integer set) library in Chicken which is highly optimized for use with Unicode char sets and is written in portable R5RS plus SRFI-4.