[gambit-list] trouble importing srfi-13 using blackhole

Matthew Koichi Grimes mkg at cs.nyu.edu
Sat May 21 01:03:51 EDT 2011


Hi Mikael,

The srfi replacements you sent got rid of Black Hole's compiler errors
(thanks again), but 1.scm should not be used. Black Hole's original 1.scm is
correct.

The problem with the new version is that its export clause forgets to export
the extended version of <map>. This is the srfi-1 version of <map> that
takes lists of differing lengths, rather than the r5rs version that doesn't.
The problem is in line 239:

    append-map append-map! map! pair-for-each filter-map map-in-order

which originally read:

    map append-map append-map! map! pair-for-each filter-map map-in-order

Best,
-- Matt

On Wed, May 18, 2011 at 2:37 PM, Matthew Koichi Grimes <mkg at cs.nyu.edu>wrote:

> Great, that seems to have done the trick!
>
> I got some compiler warnings when I loaded the sfri's individually, which
> I'll share below. I'm using gcc 4.4.5, on Ubuntu 10.10. Most of the warnings
> are "deprecated conversion from string constant to ‘char*’", but srfi/13
> gives warnings about undefined variables, which is a bit more concerning:
>
> > (import (std srfi/13))
> /usr/local/Gambit-C/lib/modules/std/srfi/14 is being compiled...
> 13.c:536: warning: deprecated conversion from string constant to ‘char*’
> 13.c:73648: warning: deprecated conversion from string constant to ‘char*’
> *** WARNING -- Variable "13_#char-titlecase" used in module "13.o2" is
> undefined
> *** WARNING -- Variable "13_#char-cased?" used in module "13.o2" is
> undefined
>
> > (import (std srfi/1))
> /usr/local/Gambit-C/lib/modules/std/srfi/1 is being compiled...
> 1.c:481: warning: deprecated conversion from string constant to ‘char*’
> 1.c:29762: warning: deprecated conversion from string constant to ‘char*’
>
> > (import (std srfi/14))
> (no compilation, no messages)
>
> > (import (std srfi/16))
> /usr/local/Gambit-C/lib/modules/std/srfi/16 is being compiled...
> 16.c:35: warning: deprecated conversion from string constant to ‘char*’
> 16.c:89: warning: deprecated conversion from string constant to ‘char*’
>
> > (import (std srfi/19))
> /usr/local/Gambit-C/lib/modules/std/srfi/19 is being compiled...
> 19.c:1025: warning: deprecated conversion from string constant to ‘char*’
> 19.c:39474: warning: deprecated conversion from string constant to ‘char*’
>
> > (import (std srfi/95))
> /usr/local/Gambit-C/lib/modules/std/srfi/95 is being compiled...
> 95.c:111: warning: deprecated conversion from string constant to ‘char*’
> 95.c:4711: warning: deprecated conversion from string constant to ‘char*’
>
>
> On Wed, May 18, 2011 at 1:40 PM, Mikael <mikael.rcv at gmail.com> wrote:
>
>> Please check if the attached files are valuable as replacement content for
>> your std/srfi directory.
>>
>> If they are, please email Per updates (for instance in diff format).
>>
>> Alternatively you could use the BH syntactictower branch, it's not as
>> tested as the default one though. In there the name of the srfi 13 module is
>> (srfi strings) afaik.
>>
>> Mikael
>>
>>
>> 2011/5/18 Matthew Koichi Grimes <mkg at cs.nyu.edu>
>>
>>> I'm having trouble getting up and running with blackhole. I've installed
>>> it, and when I run "bsc", I get the following prompt:
>>>
>>>   Loaded Black Hole.
>>>   Gambit v4.6.1
>>>
>>>   >
>>>
>>> So far, so good. However, when I try to import srfi-13 (bundled with
>>> blackhole), I get this error:
>>>
>>> > (import (std srfi/13))
>>> *** ERROR -- Wrong number of arguments passed to procedure
>>> (14_#char-set-adjoin!
>>>  '#<14_#:char-set #2 14_#s:
>>> "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\...
>>>  #\xb5)
>>>
>>> For reference, here are the steps I've followed to install blackhole:
>>>
>>> 1) installed the blackhole/ directory in /usr/local/share/
>>> 2) put in the PATH a soft link to gsc called bsc.
>>> 3) compiled blackhole by running "gsc build" from within the blackhole
>>> directory.
>>> 4) Added the following to .gambcini:
>>>
>>> (let ((blackhole-path "/usr/local/share/blackhole"))
>>>           (and (equal? (path-strip-directory (car (command-line))) "bsc")
>>>                (load (path-expand "build" blackhole-path))
>>>                (begin
>>>                  (set! module#ns-file (path-expand "ns.dat"
>>> blackhole-path))
>>>                  (println "Loaded Black Hole."))))
>>>
>>>
>>> Any suggestions would be greatly appreciated,
>>> -- Matt
>>>
>>> _______________________________________________
>>> Gambit-list mailing list
>>> Gambit-list at iro.umontreal.ca
>>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20110521/d3eeeb3b/attachment.htm>


More information about the Gambit-list mailing list