unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* [r6rs] quest to make the makers package work
@ 2010-06-08  8:15 Marco Maggi
  2010-06-16 20:40 ` Andy Wingo
  0 siblings, 1 reply; 13+ messages in thread
From: Marco Maggi @ 2010-06-08  8:15 UTC (permalink / raw)
  To: guile-user

How would you change:

<http://github.com/downloads/marcomaggi/nausicaa/makers-1.0.0.tar.gz>

to make it work with  Guile?  Notice that the Makefile has a
"gtest" rule to run Guile on the test file.

TIA
-- 
Marco Maggi



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

* Re: [r6rs] quest to make the makers package work
@ 2010-06-08 14:58 Marco Maggi
  2010-06-08 16:18 ` Julian Graham
  0 siblings, 1 reply; 13+ messages in thread
From: Marco Maggi @ 2010-06-08 14:58 UTC (permalink / raw)
  To: guile-user

> How would you change:
>
> <http://github.com/downloads/marcomaggi/nausicaa/makers-1.0.0.tar.gz>
>
> to make it work with Guile?

I test program has the following as incipit:

#!r6rs
(import (rnrs)
  (rnrs eval)
  (makers makers))

and I get this:

ERROR: In procedure macroexpand:
ERROR: source expression failed to match any pattern in (import (rnrs) (rnrs eval) (makers makers))

but I get a similar  error also with other simpler programs,
for example starting a program with:

(import (rnrs)
  (lib))

gives me:

ERROR: In procedure macroexpand:
ERROR: source expression failed to match any pattern in (import (rnrs) (lib))

is it actually possible to load libraries?
-- 
Marco Maggi



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

* Re: [r6rs] quest to make the makers package work
  2010-06-08 14:58 Marco Maggi
@ 2010-06-08 16:18 ` Julian Graham
  2010-06-08 18:59   ` Marco Maggi
  0 siblings, 1 reply; 13+ messages in thread
From: Julian Graham @ 2010-06-08 16:18 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

Hi Marco,


> ERROR: In procedure macroexpand:
> ERROR: source expression failed to match any pattern in (import (rnrs) (lib))
>
> is it actually possible to load libraries?

Andreas Rottman just submitted a patch that (I think) resolves this issue [0].


Regards,
Julian

[0] - http://permalink.gmane.org/gmane.lisp.guile.devel/10442



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

* Re: [r6rs] quest to make the makers package work
  2010-06-08 16:18 ` Julian Graham
@ 2010-06-08 18:59   ` Marco Maggi
  0 siblings, 0 replies; 13+ messages in thread
From: Marco Maggi @ 2010-06-08 18:59 UTC (permalink / raw)
  To: Julian Graham; +Cc: guile-user

"Julian Graham" wrote:
>> ERROR: In procedure macroexpand:
>> ERROR: source expression failed to match any pattern in (import (rnrs) (lib))
>>
>> is it actually possible to load libraries?
>
> Andreas  Rottman just  submitted  a patch  that (I  think)
> resolves this issue [0].

Mh, applied it, now I get:

$ make gtest
GUILE_LOAD_PATH=. guile -l guile-config.scm --no-autocompile -s ./tests/test-makers.sps
ERROR: Unbound variable: define-module

where:

$ cat guile-config.scm 
;;; guile-config.scm --

(set! %load-extensions '(".guile.sls" ".sls" ".scm" ""))

;;; end of file

and the incipit of the program is:

#!r6rs
(import (rnrs)
  (rnrs eval)
  (makers makers))

-- 
Marco Maggi



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

* Re: [r6rs] quest to make the makers package work
  2010-06-08  8:15 [r6rs] quest to make the makers package work Marco Maggi
@ 2010-06-16 20:40 ` Andy Wingo
  2010-06-17  7:40   ` Marco Maggi
  0 siblings, 1 reply; 13+ messages in thread
From: Andy Wingo @ 2010-06-16 20:40 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

On Tue 08 Jun 2010 10:15, Marco Maggi <marco.maggi-ipsu@poste.it> writes:

> How would you change:
>
> <http://github.com/downloads/marcomaggi/nausicaa/makers-1.0.0.tar.gz>
>
> to make it work with  Guile?  Notice that the Makefile has a
> "gtest" rule to run Guile on the test file.

Interesting test. So, with current git it does run, but fails with:

ERROR: In procedure string-ref:
ERROR: Wrong type argument in position 1 (expecting string): #<undefined>

I think this is due to Guile expanding internal definitions using letrec
and not letrec* (which we do not have yet). Unfortunately it's not
giving me the error that I wanted, which is probably a bug; oh well,
back to the hack.

Andy
-- 
http://wingolog.org/



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

* Re: [r6rs] quest to make the makers package work
  2010-06-16 20:40 ` Andy Wingo
@ 2010-06-17  7:40   ` Marco Maggi
  2010-06-18  8:26     ` Andy Wingo
  0 siblings, 1 reply; 13+ messages in thread
From: Marco Maggi @ 2010-06-17  7:40 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

"Andy Wingo" wrote:
> Interesting test.  So, with current  git it does  run, but
> fails with:
>
> ERROR: In procedure string-ref:
> ERROR: Wrong type argument in position 1 (expecting string): #<undefined>

With commit  a4082ab57e81c1826906c1a8601593e8dea5078c I get,
running twice  "make gtest" after cleaning the  cache for my
home directory:

$ make gtest
GUILE_LOAD_PATH=. guile -l guile-config.scm --autocompile -s ./tests/test-makers.sps
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling guile-config.scm
;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/guile-config.scm.go
;;; compiling ./tests/test-makers.sps
WARNING: (rnrs): `i/o-error-port' imported from both (rnrs files) and (rnrs io simple)
...
WARNING: (rnrs): `&i/o' imported from both (rnrs files) and (rnrs io simple)
;;; compiling ./makers//makers.sls
;;; compiling ./makers//helpers.sls
;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/makers/helpers.sls.go
;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/makers/makers.sls.go
;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/tests/test-makers.sps.go
guile: uncaught throw to r6rs:exception: (#<r6rs:record:&raise-object-wrapper>)
make: *** [gtest] Error 1

~/src/devel/scheme/makers $ make gtest
GUILE_LOAD_PATH=. guile -l guile-config.scm --autocompile -s ./tests/test-makers.sps
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-autocompile argument to disable.
;;; compiling /usr/local/share/guile/2.0/srfi//srfi-11.scm
;;; WARNING: compilation of /usr/local/share/guile/2.0/srfi//srfi-11.scm failed:
;;; key misc-error, throw_args (#f "~A ~S" ("no code for module" (srfi srfi-11)) #f)
Backtrace:
In unknown file:
   ?: 19 [load-compiled/vm "/home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/tests/test-makers.sps.go"]
In ./tests/test-makers.sps:
  29: 18 [#<procedure 867a780 ()>]
In module/ice-9/boot-9.scm:
2490: 17 [resolve-interface (rnrs) #:select ...]
2429: 16 [#<procedure 870e910 at module/ice-9/boot-9.scm:2416:4 (name #:optional autoload version)> # ...]
2738: 15 [try-module-autoload (rnrs) ()]
1988: 14 [save-module-excursion #<procedure 87b3d00 at module/ice-9/boot-9.scm:2738:17 ()>]
2741: 13 [#<procedure 87b3d00 at module/ice-9/boot-9.scm:2738:17 ()>]
1988: 12 [save-module-excursion #<procedure 87b4900 at module/ice-9/boot-9.scm:2001:3 ()>]
1154: 11 [load "/usr/local/share/guile/2.0//6/rnrs.scm" #f]
In unknown file:
   ?: 10 [load-compiled/vm "/home/marco/.cache/guile/ccache/2.0-0.R-LE-4/usr/local/share/guile/2.0/6/rnrs.scm.go"]
In 6/rnrs.scm:
  20: 9 [#<procedure 86d94e0 at 6/rnrs.scm:19:0 ()>]
In module/ice-9/boot-9.scm:
2490: 8 [resolve-interface (rnrs io ports) #:select ...]
2429: 7 [#<procedure 870e910 at module/ice-9/boot-9.scm:2416:4 (name #:optional autoload version)> # ...]
2738: 6 [try-module-autoload (rnrs io ports) (6)]
1988: 5 [save-module-excursion #<procedure 891e500 at module/ice-9/boot-9.scm:2738:17 ()>]
2741: 4 [#<procedure 891e500 at module/ice-9/boot-9.scm:2738:17 ()>]
2401: 3 [find-versioned-module "rnrs/io/" "ports" ...]
In unknown file:
   ?: 2 [scm-error misc-error #f "~A" ("No matching modules found.") #f]
In module/ice-9/boot-9.scm:
 114: 1 [#<procedure 8772c08 at module/ice-9/boot-9.scm:108:6 (thrown-k . args)> misc-error ...]
In unknown file:
   ?: 0 [catch-closure misc-error #f "~A" ("No matching modules found.") #f]

ERROR: No matching modules found.
make: *** [gtest] Error 1

-- 
Marco Maggi



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

* Re: [r6rs] quest to make the makers package work
  2010-06-17  7:40   ` Marco Maggi
@ 2010-06-18  8:26     ` Andy Wingo
  2010-06-18 12:48       ` Julian Graham
  2010-06-18 15:30       ` Marco Maggi
  0 siblings, 2 replies; 13+ messages in thread
From: Andy Wingo @ 2010-06-18  8:26 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

Hello,

On Thu 17 Jun 2010 09:40, Marco Maggi <marco.maggi-ipsu@poste.it> writes:

> "Andy Wingo" wrote:
>> ERROR: In procedure string-ref:
>> ERROR: Wrong type argument in position 1 (expecting string): #<undefined>
>
> With commit  a4082ab57e81c1826906c1a8601593e8dea5078c I get,
> running twice  "make gtest" after cleaning the  cache for my
> home directory:
>
> $ make gtest
> GUILE_LOAD_PATH=. guile -l guile-config.scm --autocompile -s ./tests/test-makers.sps

I see you have changed the code to add --autocompile. Has anything else changed?

> ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-autocompile argument to disable.
> ;;; compiling guile-config.scm
> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/guile-config.scm.go
> ;;; compiling ./tests/test-makers.sps
> WARNING: (rnrs): `i/o-error-port' imported from both (rnrs files) and (rnrs io simple)
> ...
> WARNING: (rnrs): `&i/o' imported from both (rnrs files) and (rnrs io simple)
> ;;; compiling ./makers//makers.sls
> ;;; compiling ./makers//helpers.sls
> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/makers/helpers.sls.go
> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/makers/makers.sls.go
> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/tests/test-makers.sps.go
> guile: uncaught throw to r6rs:exception: (#<r6rs:record:&raise-object-wrapper>)
> make: *** [gtest] Error 1

Yes this is where I am now. I don't know much about our r6rs condition shims...

> ~/src/devel/scheme/makers $ make gtest
> 2401: 3 [find-versioned-module "rnrs/io/" "ports" ...]

This would seem to indicate that you have an old (well, from before
wednesday) Guile laying around. Can you double-check?

Andy
-- 
http://wingolog.org/



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

* Re: [r6rs] quest to make the makers package work
  2010-06-18  8:26     ` Andy Wingo
@ 2010-06-18 12:48       ` Julian Graham
  2010-06-18 14:06         ` Julian Graham
  2010-06-18 15:30       ` Marco Maggi
  1 sibling, 1 reply; 13+ messages in thread
From: Julian Graham @ 2010-06-18 12:48 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

Hello!


>> ;;; compiling ./makers//makers.sls
>> ;;; compiling ./makers//helpers.sls
>> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/makers/helpers.sls.go
>> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/makers/makers.sls.go
>> ;;; compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/src/devel/scheme/makers/tests/test-makers.sps.go
>> guile: uncaught throw to r6rs:exception: (#<r6rs:record:&raise-object-wrapper>)
>> make: *** [gtest] Error 1
>
> Yes this is where I am now. I don't know much about our r6rs condition shims...

I haven't been following this thread as closely as I should, but FWIW,
that's the result of a call to R6RS's `raise' (or `raise-continuable')
-- Guile's default throw handler doesn't know how to unpack it.  For
debugging, you might try installing an R6RS exception handler at the
top level.  I'll also jump in and take a look.


Regards,
Julian



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

* Re: [r6rs] quest to make the makers package work
  2010-06-18 12:48       ` Julian Graham
@ 2010-06-18 14:06         ` Julian Graham
  2010-06-18 17:29           ` Andy Wingo
  0 siblings, 1 reply; 13+ messages in thread
From: Julian Graham @ 2010-06-18 14:06 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

Hello again,


> I haven't been following this thread as closely as I should, but FWIW,
> that's the result of a call to R6RS's `raise' (or `raise-continuable')
> -- Guile's default throw handler doesn't know how to unpack it.  For
> debugging, you might try installing an R6RS exception handler at the
> top level.  I'll also jump in and take a look.

Just pushed a fix for this -- `define-condition-type' was not
producing condition accessor procedures that knew how to unpack
compound conditions.

There's a new exception now, which looks related to our not having a
complete `(rnrs io ports)' implementation.


Regards,
Julian



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

* Re: [r6rs] quest to make the makers package work
  2010-06-18  8:26     ` Andy Wingo
  2010-06-18 12:48       ` Julian Graham
@ 2010-06-18 15:30       ` Marco Maggi
  1 sibling, 0 replies; 13+ messages in thread
From: Marco Maggi @ 2010-06-18 15:30 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

"Andy Wingo" wrote:
>> $ make gtest
>> GUILE_LOAD_PATH=. guile -l guile-config.scm --autocompile -s ./tests/test-makers.sps
>
> I see you have changed  the code to add --autocompile. Has
> anything else changed?

No, I am only tweaking the makefile and the guile setup script.

>> ~/src/devel/scheme/makers $ make gtest
>> 2401: 3 [find-versioned-module "rnrs/io/" "ports" ...]
>
> This would  seem to indicate  that you have an  old (well,
> from  before  wednesday)  Guile  laying  around.  Can  you
> double-check?

Ah, yes.   I forgot to  undo a temporary  patch application,
which resulted in a  messed r6rs-libraries.scm.  With a pull
from   a   while   ago   I   get   an   error   related   to
OPEN-STRING-OUTPUT-PORT, which I guess is what Julian Graham
is getting, too.
-- 
Marco Maggi



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

* Re: [r6rs] quest to make the makers package work
  2010-06-18 14:06         ` Julian Graham
@ 2010-06-18 17:29           ` Andy Wingo
  2010-06-19 18:16             ` Marco Maggi
  0 siblings, 1 reply; 13+ messages in thread
From: Andy Wingo @ 2010-06-18 17:29 UTC (permalink / raw)
  To: Julian Graham; +Cc: guile-user

Hi Julian,

On Fri 18 Jun 2010 16:06, Julian Graham <joolean@gmail.com> writes:

> Just pushed a fix for this -- `define-condition-type' was not
> producing condition accessor procedures that knew how to unpack
> compound conditions.

Cool, thanks!

> There's a new exception now, which looks related to our not having a
> complete `(rnrs io ports)' implementation.

Right, I was not aware of the degree to which this module isn't
implemented. I added open-string-input-port and open-string-output-port,
and at this point Marco's module passes its tests, though with many
warnings about duplicated bindings.

Andy
-- 
http://wingolog.org/



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

* Re: [r6rs] quest to make the makers package work
  2010-06-18 17:29           ` Andy Wingo
@ 2010-06-19 18:16             ` Marco Maggi
  2010-06-20 21:40               ` Andy Wingo
  0 siblings, 1 reply; 13+ messages in thread
From: Marco Maggi @ 2010-06-19 18:16 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-user

"Andy Wingo" wrote:
> I         added         open-string-input-port         and
> open-string-output-port, and at  this point Marco's module
> passes  its   tests,  though  with   many  warnings  about
> duplicated bindings.

Yes!  Thanks  to everyone.   My infix to  prefix transformer
works too, even though  compilation with both packages fails
with multiple errors like:

;;; key wrong-type-arg, throw_args ("dirname" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "string" #f) (#f))

with commit a2e0b12608ccc578f66473f67ffaafa4309b2c14.

<http://github.com/downloads/marcomaggi/nausicaa/makers-1.0.1.tar.gz>
<http://github.com/downloads/marcomaggi/nausicaa/infix-1.0.1.tar.gz>
-- 
Marco Maggi



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

* Re: [r6rs] quest to make the makers package work
  2010-06-19 18:16             ` Marco Maggi
@ 2010-06-20 21:40               ` Andy Wingo
  0 siblings, 0 replies; 13+ messages in thread
From: Andy Wingo @ 2010-06-20 21:40 UTC (permalink / raw)
  To: Marco Maggi; +Cc: guile-user

Hello,

On Sat 19 Jun 2010 20:16, Marco Maggi <marco.maggi-ipsu@poste.it> writes:

> compilation with both packages fails with multiple errors like:
>
> ;;; key wrong-type-arg, throw_args ("dirname" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "string" #f) (#f))

This is an interesting error I just got too. It's because I moved
"the-last-stack" to another module, leaving behind an identifier-syntax
as a deprecated forwarding shim; but the-last-stack had already appeared
as a value in the expansion of some macros, so that compiled code was
not detected as needing re-expansion.

Specifically false-if-exception used to muck with the-last-stack, but
now it doesn't; but old code compiled with it still accesses the
deprecated code. An interesting bug, and one we'll see more of in the
future unfortunately. Vigilance and freedom, I guess...

Short answer: make clean in module/, and possibly nuke your cache, and
reinstall Guile (if you run it installed).

Cheers,

Andy
-- 
http://wingolog.org/



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

end of thread, other threads:[~2010-06-20 21:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-08  8:15 [r6rs] quest to make the makers package work Marco Maggi
2010-06-16 20:40 ` Andy Wingo
2010-06-17  7:40   ` Marco Maggi
2010-06-18  8:26     ` Andy Wingo
2010-06-18 12:48       ` Julian Graham
2010-06-18 14:06         ` Julian Graham
2010-06-18 17:29           ` Andy Wingo
2010-06-19 18:16             ` Marco Maggi
2010-06-20 21:40               ` Andy Wingo
2010-06-18 15:30       ` Marco Maggi
  -- strict thread matches above, loose matches on Subject: below --
2010-06-08 14:58 Marco Maggi
2010-06-08 16:18 ` Julian Graham
2010-06-08 18:59   ` Marco Maggi

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