[Top][All Lists]

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

Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.

From: Ludovic Courtès
Subject: Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
Date: Fri, 11 May 2007 09:16:31 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)


address@hidden (r. clayton) writes:

> Both versions of guile-www use make-shared-substring, which doesn't exist 
> under
> guile 1.8.  In addition, guile chokes on
>     (lambda* (name value #&key path domain expires secure)
> from cgi.scm in guile-www 1.1.1.  The fix for the first problem is to replace
> make-shared-substring with substring (The 
>   (define make-shared-substring substring) 
> trick outside the module doesn't work and I'm not understanding why; perhaps
> because make-shared-substring is being used in a module?).

In 1.8, `substring' returns a copy-on-write shared substring by
default.  This is not exactly like `make-shared-substring' in Guile 1.6
where the returned string is read-only and changes to the parent string
are visible in the substring:

  $ guile-1.6  # Guile 1.6.8
  guile> (define s "hello world")
  guile> (define ss (make-shared-substring s 3 5))
  guile> ss
  guile> (string-set! ss 0 #\L)
  standard input:4:1: In procedure string-set! in expression (string-set! ss 0 
  standard input:4:1: argument is a read-only string
  ABORT: (misc-error)

  guile> (string-set! s 4 #\X)
  guile> ss
  guile> s
  "hellX world"

TTN's Guile 1.4.x series provides the same semantics:


So your fix seems reasonable, _provided_ `guile-www' doesn't rely on
string mutations and interactions between substrings and their parent

> I don't know what
> the fix for the second problem is because I don't know what #&key is.  
> However,
> replacing it with #:key at least lets cgi load without error.

I'm guessing that this is correct (see `(ice-9 optargs)').

> All this is happening on a debian testing system, although the guile-www code
> was downloaded and installed by hand (the 2.16 code not recently; because I
> don' remember where I got the 2.16 code, there may be more up-to-date versions
> that fix this problem).

The version of `guile-www' that is maintained by TTN [0] may be
targeting his Guile 1.4.x series, hence the incompatibilities you
observed.  Maybe you could provide him with a patch allowing `guile-www'
to be used with both Guile versions?

Hope this helps,

[0] http://www.gnuvola.org/software/guile-www/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]