* How guile knows?
@ 2003-01-09 14:19 Krzysztof Garus
2003-01-09 23:48 ` Neil Jerram
0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Garus @ 2003-01-09 14:19 UTC (permalink / raw)
hello,
I can define a variable in one script (passed to gh_parse_string()), and
use in another. How guile knows I'll use it in future? Does it keep all
variables forever?
bajcik
--
Krzysztof Garus <bajcik.kolos.math.uni.lodz@pl> Linux User 171721
Stronka: http://kolos.math.uni.lodz.pl/~bajcik/
Polecam: http://kolos.math.uni.lodz.pl/~bajcik/duskc/
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-09 14:19 How guile knows? Krzysztof Garus
@ 2003-01-09 23:48 ` Neil Jerram
2003-01-10 3:59 ` Thomas Bushnell, BSG
0 siblings, 1 reply; 11+ messages in thread
From: Neil Jerram @ 2003-01-09 23:48 UTC (permalink / raw)
Cc: guile-user
>>>>> "Krzysztof" == Krzysztof Garus <bajcik@kolos.math.uni.lodz.pl> writes:
Krzysztof> hello, I can define a variable in one script (passed to
Krzysztof> gh_parse_string()), and use in another. How guile knows
Krzysztof> I'll use it in future? Does it keep all variables
Krzysztof> forever?
(hoping I'm right this time ...)
Yes. Variables belong to modules, and I don't believe there's any way
of unmaking a module. (If you think your definitions are nothing to
do with modules, they're actually going into the module called
(guile-user).)
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-09 23:48 ` Neil Jerram
@ 2003-01-10 3:59 ` Thomas Bushnell, BSG
2003-01-11 23:25 ` Lynn Winebarger
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Bushnell, BSG @ 2003-01-10 3:59 UTC (permalink / raw)
Cc: guile-user
Neil Jerram <neil@ossau.uklinux.net> writes:
> Yes. Variables belong to modules, and I don't believe there's any way
> of unmaking a module. (If you think your definitions are nothing to
> do with modules, they're actually going into the module called
> (guile-user).)
There should be no way to unmake a module.
But certainly a module gets garbage collected when there are no more
references, right?
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-10 3:59 ` Thomas Bushnell, BSG
@ 2003-01-11 23:25 ` Lynn Winebarger
2003-01-12 1:25 ` Thomas Bushnell, BSG
2003-01-13 20:00 ` Paul Jarc
0 siblings, 2 replies; 11+ messages in thread
From: Lynn Winebarger @ 2003-01-11 23:25 UTC (permalink / raw)
Cc: guile-user
On Thursday 09 January 2003 22:59, Thomas Bushnell, BSG wrote:
> Neil Jerram <neil@ossau.uklinux.net> writes:
>
> > Yes. Variables belong to modules, and I don't believe there's any way
> > of unmaking a module. (If you think your definitions are nothing to
> > do with modules, they're actually going into the module called
> > (guile-user).)
>
> There should be no way to unmake a module.
>
> But certainly a module gets garbage collected when there are no more
> references, right?
Since modules have absolute names that can be typed in any time, they
can't be garbage-collected any more correctly than global variable bindings
(i.e. you can't because "references" can exist external to the computer's memory,
in the future typing of the user).
Unless I'm mistaken about the absolute naming, of course.
Lynn
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-11 23:25 ` Lynn Winebarger
@ 2003-01-12 1:25 ` Thomas Bushnell, BSG
2003-01-12 1:57 ` Lynn Winebarger
2003-01-13 20:00 ` Paul Jarc
1 sibling, 1 reply; 11+ messages in thread
From: Thomas Bushnell, BSG @ 2003-01-12 1:25 UTC (permalink / raw)
Cc: Neil Jerram
Lynn Winebarger <owinebar@free-expression.org> writes:
> Since modules have absolute names that can be typed in any time,
> they can't be garbage-collected any more correctly than global
> variable bindings (i.e. you can't because "references" can exist
> external to the computer's memory, in the future typing of the
> user). Unless I'm mistaken about the absolute naming, of course.
This is only partially true. Global variables bindings most certainly
*can* be gc'd just like any other object. However, the table in which
they are looked up (probably a module, but I'm prescinding from that)
is an object which holds references to them, and the live listener
holds a reference to the table, keeping them all alive.
Module names shouldn't be magic; the most obvious way to map module
names to modules is that the module names are variables in some scope.
Let's pretend that they are global variables (it doesn't matter
really). That means that the binding from module-name to module is
like any other global variable: it can't be gc'd so long as there is a
reference to the global variable scope, such as, from a live listener.
But the *module* is not the module name. The fact that the binding
from module-name to module is near infinite (though it's incorrect to
say it can't be gcd) has nothing to do with the module itself.
Thomas
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-12 1:25 ` Thomas Bushnell, BSG
@ 2003-01-12 1:57 ` Lynn Winebarger
2003-01-12 2:27 ` Thomas Bushnell, BSG
0 siblings, 1 reply; 11+ messages in thread
From: Lynn Winebarger @ 2003-01-12 1:57 UTC (permalink / raw)
Cc: Neil Jerram
On Saturday 11 January 2003 20:25, Thomas Bushnell, BSG wrote:
> But the *module* is not the module name. The fact that the binding
> from module-name to module is near infinite (though it's incorrect to
> say it can't be gcd) has nothing to do with the module itself.
Are you sure that it's implemented that way in Guile, or just
propounding how it should be implemented?
Lynn
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-12 1:57 ` Lynn Winebarger
@ 2003-01-12 2:27 ` Thomas Bushnell, BSG
2003-01-12 6:17 ` Thien-Thi Nguyen
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Bushnell, BSG @ 2003-01-12 2:27 UTC (permalink / raw)
Cc: Neil Jerram
Lynn Winebarger <owinebar@free-expression.org> writes:
> On Saturday 11 January 2003 20:25, Thomas Bushnell, BSG wrote:
> > But the *module* is not the module name. The fact that the binding
> > from module-name to module is near infinite (though it's incorrect to
> > say it can't be gcd) has nothing to do with the module itself.
>
> Are you sure that it's implemented that way in Guile, or just
> propounding how it should be implemented?
The latter.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-12 2:27 ` Thomas Bushnell, BSG
@ 2003-01-12 6:17 ` Thien-Thi Nguyen
0 siblings, 0 replies; 11+ messages in thread
From: Thien-Thi Nguyen @ 2003-01-12 6:17 UTC (permalink / raw)
Cc: owinebar
From: tb@becket.net (Thomas Bushnell, BSG)
Date: 11 Jan 2003 18:27:47 -0800
The latter.
because in guile the binding of module-name to module is done by
procedure `resolve-module'.
thi
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-11 23:25 ` Lynn Winebarger
2003-01-12 1:25 ` Thomas Bushnell, BSG
@ 2003-01-13 20:00 ` Paul Jarc
2003-01-14 17:35 ` Marius Vollmer
1 sibling, 1 reply; 11+ messages in thread
From: Paul Jarc @ 2003-01-13 20:00 UTC (permalink / raw)
Lynn Winebarger <owinebar@free-expression.org> wrote:
> Since modules have absolute names that can be typed in any time, they
> can't be garbage-collected any more correctly than global variable bindings
> (i.e. you can't because "references" can exist external to the computer's memory,
> in the future typing of the user).
> Unless I'm mistaken about the absolute naming, of course.
It's possible to create modules without adding them to the
conventional module namespace, using (make-module). (And if you know
how the module namespace is implemented, you can remove an existing
module's binding from that namespace.) So it is possible for a
module's reference count to drop to zero. I would hope the module
would be gc'ed in that case.
paul
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-13 20:00 ` Paul Jarc
@ 2003-01-14 17:35 ` Marius Vollmer
2003-01-14 18:38 ` Paul Jarc
0 siblings, 1 reply; 11+ messages in thread
From: Marius Vollmer @ 2003-01-14 17:35 UTC (permalink / raw)
prj@po.cwru.edu (Paul Jarc) writes:
> I would hope the module would be gc'ed in that case.
That's what I expect as well. Is there evidence that it isn't?
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: How guile knows?
2003-01-14 17:35 ` Marius Vollmer
@ 2003-01-14 18:38 ` Paul Jarc
0 siblings, 0 replies; 11+ messages in thread
From: Paul Jarc @ 2003-01-14 18:38 UTC (permalink / raw)
Marius Vollmer <mvo@zagadka.ping.de> wrote:
> prj@po.cwru.edu (Paul Jarc) writes:
>> I would hope the module would be gc'ed in that case.
>
> That's what I expect as well. Is there evidence that it isn't?
Not that I know of. I have no reason to suspect a leak.
paul
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-01-14 18:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-09 14:19 How guile knows? Krzysztof Garus
2003-01-09 23:48 ` Neil Jerram
2003-01-10 3:59 ` Thomas Bushnell, BSG
2003-01-11 23:25 ` Lynn Winebarger
2003-01-12 1:25 ` Thomas Bushnell, BSG
2003-01-12 1:57 ` Lynn Winebarger
2003-01-12 2:27 ` Thomas Bushnell, BSG
2003-01-12 6:17 ` Thien-Thi Nguyen
2003-01-13 20:00 ` Paul Jarc
2003-01-14 17:35 ` Marius Vollmer
2003-01-14 18:38 ` Paul Jarc
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).