Hi,
It's probably something simple, but I just couldn't figure out. How can I load snow package into gambit interactive repl?
Thanks, Quan
Afficher les réponses par date
there's a reply to an email of mine just a few days ago that describes how to do this (Debugging Gambit w Snow, James Long).
i couldn't get the advice in that email to work. include-cd* should have been include*-cd but then i got another error. but with a little work you might be able to get it to run ok.
what i did instead, which was also mentioned in that email, was change the bash script that starts snow so that a repl starts once the snow script has an error. it's pretty clear what to do (search for gambit in the script and replace the command line options after reading the gambit docs).
i have: ... gambit) exec "${PROGRAM_gambit}" -:d- -e '(begin (include "'"${SNOW_MACROS}"'") (load-program* "'"${SCRIPT_FILE}"'") (exit))' "$@" # gambit) echo "poot" # gambit) exec "${PROGRAM_gambit}" -:dpri1- -e '(begin (include "'"${SNOW_MACROS}"'") (load-program* "'"${SCRIPT_FILE}"'") (exit))' "$@" ... and i guess you want something similar to the third line, but without (exit).
in other words - there seems to be no simple or documented solution, you just have to hack the code.
andrew
Hi,
It's probably something simple, but I just couldn't figure out. How can I load snow package into gambit interactive repl?
Thanks, Quan _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Thank you very much for replying, and the help.
I added to snow script:
gambit-gsi) exec "${PROGRAM_gambit}" -:dpri1- -e '(begin (include "'"${SNOW_MACROS}"'") (load-program* "'"${SCRIPT_FILE}"'") (error "stay in gsi"))' "$@
and that gives me the gsi prompt when run with SNOW_HOST=gambit-gsi. but I cannot see any symbol defined in the program loaded. For example using the simple.scm and power.scm from the Snow doc:
$ snow -- simple.scm *** ERROR IN (string)@1.27 -- stay in gsi
cube
*** ERROR IN (stdin)@1.1 -- Unbound variable: cube 1> ,t
simple:cube
*** ERROR IN (stdin)@3.1 -- Unbound variable: simple:cube 1>
what is the correct way to reference cube in package simple?
I also got error when trying to use srfi1/v1.
$ cat foo.scm (package* foo/v1.0.0 (require: srfi1/v1))
(write (iota 10)) (newline)
$ snow -- foo.scm *** SNOW ERROR -- package form syntax error (filename= "/home/qta/.snow/v1.1.1/pack/srfi1/v1.0.15/snow/srfi1.scm") *** ERROR IN (string)@1.30 -- Ill-formed procedure call
Thanks, Quan
On 9/11/07, andrew cooke andrew@acooke.org wrote:
there's a reply to an email of mine just a few days ago that describes how to do this (Debugging Gambit w Snow, James Long).
i couldn't get the advice in that email to work. include-cd* should have been include*-cd but then i got another error. but with a little work you might be able to get it to run ok.
what i did instead, which was also mentioned in that email, was change the bash script that starts snow so that a repl starts once the snow script has an error. it's pretty clear what to do (search for gambit in the script and replace the command line options after reading the gambit docs).
i have: ... gambit) exec "${PROGRAM_gambit}" -:d- -e '(begin (include "'"${SNOW_MACROS}"'") (load-program* "'"${SCRIPT_FILE}"'") (exit))' "$@" # gambit) echo "poot" # gambit) exec "${PROGRAM_gambit}" -:dpri1- -e '(begin (include "'"${SNOW_MACROS}"'") (load-program* "'"${SCRIPT_FILE}"'") (exit))' "$@" ... and i guess you want something similar to the third line, but without (exit).
in other words - there seems to be no simple or documented solution, you just have to hack the code.
andrew
Hi,
It's probably something simple, but I just couldn't figure out. How can
I
load snow package into gambit interactive repl?
Thanks, Quan _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list