unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* guile-www 1.1.1 & 2.16 problems under guile 1.8.
@ 2007-05-11  1:13 r. clayton
  2007-05-11  7:16 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: r. clayton @ 2007-05-11  1:13 UTC (permalink / raw)
  To: bug-guile

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?).  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.

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).




_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
  2007-05-11  1:13 guile-www 1.1.1 & 2.16 problems under guile 1.8 r. clayton
@ 2007-05-11  7:16 ` Ludovic Courtès
  2007-05-11 12:28   ` Thien-Thi Nguyen
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2007-05-11  7:16 UTC (permalink / raw)
  To: r. clayton; +Cc: bug-guile

Hi,

rvclayton@acm.org (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
  "lo"
  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
  "lo"
  guile> s
  "hellX world"

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

  http://www.gnuvola.org/software/guile/doc/Shared-Substrings.html#index-make_002dshared_002dsubstring-752

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

> 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,
Ludovic.

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


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
  2007-05-11  7:16 ` Ludovic Courtès
@ 2007-05-11 12:28   ` Thien-Thi Nguyen
  2007-05-11 14:43     ` Ludovic Courtès
  2007-05-11 23:25     ` r. clayton
  0 siblings, 2 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2007-05-11 12:28 UTC (permalink / raw)
  To: r. clayton; +Cc: bug-guile

() ludovic.courtes@laas.fr (Ludovic Courtès)
() Fri, 11 May 2007 09:16:31 +0200

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

the easy way is to use configure script option --disable-shsub.  i have
updated the README to mention this for the next release (2.19), like so:

	You can use the configure script option `--disable-shsub' to
	explicitly build a version where `make-shared-substring' is
	replaced w/ simply `substring'.  By default, configure arranges
	for the replacement only if it can't detect that your Guile has
	`make-shared-substring'.

if the configure script is NOT detecting missing `make-shared-substring',
then that's a bug -- please post the output of the ./configure run (w/o
the `--disable-shsub' option).

   Maybe you could provide him with a patch allowing `guile-www'
   to be used with both Guile versions?

this should likewise be handled automatically by configure (if not,
that's a bug).  in the configure run output, there should be something
like "acts like (ice-9 optargs-kw) ...yes", and the installation script
module-install will read `need_optargs_kludge="no"'.

improvements to the detection routines welcome, in any case!

thi


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
  2007-05-11 12:28   ` Thien-Thi Nguyen
@ 2007-05-11 14:43     ` Ludovic Courtès
  2007-05-11 15:25       ` Thien-Thi Nguyen
  2007-05-11 23:25     ` r. clayton
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2007-05-11 14:43 UTC (permalink / raw)
  To: bug-guile

Hi,

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> if the configure script is NOT detecting missing `make-shared-substring',
> then that's a bug -- please post the output of the ./configure run (w/o
> the `--disable-shsub' option).

Nice that it can detect such things and adapt!

> this should likewise be handled automatically by configure (if not,
> that's a bug).  in the configure run output, there should be something
> like "acts like (ice-9 optargs-kw) ...yes", and the installation script
> module-install will read `need_optargs_kludge="no"'.

Right, this works.

However, the `s/make-shared-substring/substring/' occurs only at
module-installation time, which precludes one from running the examples
from within the source directory.  Also, while `id.cgi' DTRT (except for
`make-shared-substring') so that it can be run from within the source
directory, `you-are-here' just makes plain `use-modules' that are bound
to fail when invoked from within the source directory.

Maybe all the modules could be moved to a `www' subdir, and then
examples could be generated from `.in' files at configure-time that
start with something like:

  ${GUILE-guile} -L @top_srcdir@ ...

This way, `(use-modules (www ...))' would work fine.

What do you think?

Thanks,
Ludovic.



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
  2007-05-11 14:43     ` Ludovic Courtès
@ 2007-05-11 15:25       ` Thien-Thi Nguyen
  0 siblings, 0 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2007-05-11 15:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guile

() ludo@chbouib.org (Ludovic Courtès)
() Fri, 11 May 2007 16:43:09 +0200

   Nice that it can detect such things and adapt!

that's the theory, anyway.

   However, the `s/make-shared-substring/substring/' occurs only at
   module-installation time, which precludes one from running the examples
   from within the source directory.

good point.  i hadn't thought of that.

   Also, while `id.cgi' DTRT (except for `make-shared-substring') so
   that it can be run from within the source directory, `you-are-here'
   just makes plain `use-modules' that are bound to fail when invoked
   from within the source directory.

true.

   Maybe all the modules could be moved to a `www' subdir, and then
   examples could be generated from `.in' files at configure-time that
   start with something like:

     ${GUILE-guile} -L @top_srcdir@ ...

   This way, `(use-modules (www ...))' would work fine.

   What do you think?

i think the approach (or something like it) is sound.  certainly making
the modules and examples usable pre-install is a worthy goal.  thanks
for the suggestion.

thi


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
  2007-05-11 12:28   ` Thien-Thi Nguyen
  2007-05-11 14:43     ` Ludovic Courtès
@ 2007-05-11 23:25     ` r. clayton
  2007-05-12 14:06       ` Thien-Thi Nguyen
  1 sibling, 1 reply; 7+ messages in thread
From: r. clayton @ 2007-05-11 23:25 UTC (permalink / raw)
  To: bug-guile

  if the configure script is NOT detecting missing `make-shared-substring',
  then that's a bug -- please post the output of the ./configure run (w/o
  the `--disable-shsub' option).

I downloaded 2.16 and 2.18 and both installed correctly.



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: guile-www 1.1.1 & 2.16 problems under guile 1.8.
  2007-05-11 23:25     ` r. clayton
@ 2007-05-12 14:06       ` Thien-Thi Nguyen
  0 siblings, 0 replies; 7+ messages in thread
From: Thien-Thi Nguyen @ 2007-05-12 14:06 UTC (permalink / raw)
  To: r. clayton; +Cc: bug-guile

() rvclayton@acm.org (r. clayton)
() 11 May 2007 19:25:51 -0400

   I downloaded 2.16 and 2.18 and both installed correctly.

i'm glad to hear that.

(let's hope next release maintains this property. :-)

thi


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-12 14:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11  1:13 guile-www 1.1.1 & 2.16 problems under guile 1.8 r. clayton
2007-05-11  7:16 ` Ludovic Courtès
2007-05-11 12:28   ` Thien-Thi Nguyen
2007-05-11 14:43     ` Ludovic Courtès
2007-05-11 15:25       ` Thien-Thi Nguyen
2007-05-11 23:25     ` r. clayton
2007-05-12 14:06       ` Thien-Thi Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).