[gambit-list] srfi-13/14

Bradley Lucier lucier at math.purdue.edu
Sun Apr 10 00:23:31 EDT 2005


On Apr 7, 2005, at 10:55 PM, ben at fuhok.net wrote:

> I attached some fixes that I fished out of the rather noisy diff.  I
> think I got most of them.  The majority aren't really for `bugs', at
> least not serious ones.  They mostly correct wrong function names in
> your error macros.
>
> I noted some discrepancy in argument order between the srfi-14 text
> and Olin's reference implementation.  For those functions that take a
> string and a `criterion', the srfi (usually) lists the order as
> `string' `criterion', but the reference implementation often switches
> them around.  The functions string-every and string-any are
> exceptions:  the spec orders their arguments as `criterion' `string'.
>
> I flipped several arguments around to match the srfi spec instead of
> the reference implementation.

Wow, you caught a lot of problems, thanks.

I've included below the diffs between the implementation I sent before 
and this one; I hope I caught all the things you pointed out.  Also, 
I've included a tar file with all the .scm files again.  Put them in a 
directory srfis at the same level as lib/gsi/gsc in the gambit 
directory and compile with

[zakon2-iro-umontreal-ca:~/programs/gambc40b12/srfis] bjlucier% gsc
Gambit Version 4.0 beta 12

 > (compile-file "srfis" '(check))
#t
 > (load "srfis")
"/Users/bjlucier/programs/gambc40b12/srfis/srfis.o6"

By the way, once it's compiled, it can be loaded into the interpreter 
without any problems.  I imagine that srfis will eventually be 
gambit-runtime quality code, highly optimized but with complete error 
checks, so I don't see any problem assuming that they will be compiled 
before being loaded into either the interpreter or the compiler.

There are still a number of places where I just call error directly to 
deal with errors.  That strategy is not optimal, for reasons that I 
laid out in my previous e-mail.  Marc, you want to chime in here and 
tell us how to do it properly?

At any rate, perhaps we can use this strategy:  Assume that we're 
compiling all SRFIs in a directory srfis in the Gambit directory as I 
suggested, and work at incrementally improving this code rather than 
starting with a new one.

Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: srfis.tgz
Type: application/x-gzip
Size: 17411 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050409/bb6b547c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diffs
Type: application/octet-stream
Size: 5436 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050409/bb6b547c/attachment.obj>
-------------- next part --------------



More information about the Gambit-list mailing list