* Guile starting state.
@ 2005-08-10 21:55 R. Clayton
2005-08-13 5:55 ` Stephen Compall
0 siblings, 1 reply; 2+ messages in thread
From: R. Clayton @ 2005-08-10 21:55 UTC (permalink / raw)
There appears to be a difference between starting guile (1.6.7 on an x86 debian
testing system) with and without -c:
$ guile
guile> (match:substring (string-match "[0-9][0-9]" "bla987"))
"98"
guile> ^d
$ guile -c '(display (match:substring (string-match "[0-9][0-9]" "bla987")))'
ERROR: Unbound variable: match:substring
$
What is the explanation for the difference?
Notes:
1 the second example can be fixed with
$ guile -c '(use-modules (ice-9 regex)) (display (match:substring (string-match "[0-9][0-9]" "blah987")))'
98
$
2 ~/.guile does not exist for any of these examples.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Guile starting state.
2005-08-10 21:55 Guile starting state R. Clayton
@ 2005-08-13 5:55 ` Stephen Compall
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Compall @ 2005-08-13 5:55 UTC (permalink / raw)
Cc: guile-user
[-- Attachment #1.1: Type: text/plain, Size: 939 bytes --]
On Wed, 2005-08-10 at 17:55 -0400, R. Clayton wrote:
> There appears to be a difference between starting guile (1.6.7 on an x86 debian
> testing system) with and without -c:
>
> $ guile
> guile> (match:substring (string-match "[0-9][0-9]" "bla987"))
> "98"
> guile> ^d
>
> $ guile -c '(display (match:substring (string-match "[0-9][0-9]" "bla987")))'
> ERROR: Unbound variable: match:substring
>
> What is the explanation for the difference?
In function top-repl, at /usr/share/guile/1.6/ice-9/boot-9.scm:3022:
(if (provided? 'regex)
(module-use! guile-user-module (resolve-interface '(ice-9 regex))))
This function is set up for a call in script.c if a -c or -s option is
not used.
top-repl makes this and other modifications to the environment (other
module loadings, signal handlers, etc) before, well, starting the REPL.
--
Stephen Compall
http://scompall.nocandysoftware.com/blog
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-13 5:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-10 21:55 Guile starting state R. Clayton
2005-08-13 5:55 ` Stephen Compall
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).