From: Zeeshan Ali <zeenix@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Module unloading
Date: Wed, 25 May 2005 02:26:27 +0500 [thread overview]
Message-ID: <38294b7405052414266f95d20a@mail.gmail.com> (raw)
In-Reply-To: <38294b7405052414062801ceba@mail.gmail.com>
Hello again,
> > Why not use a registration
> > API instead? In other words, instead of this:
> >
> > (define (do-plugin-thing-1 ...) ...)
> > (define (do-plugin-thing-2 ...) ...)
> > ...
> >
> > do this:
> >
> > (let ()
> > (define (do-plugin-thing-1 ...) ...)
> > (define (do-plugin-thing-2 ...) ...)
> > ...
> > (register-plugin do-plugin-thing-1
> > do-plugin-thing-2
> > ...))
This is the code of the plugin right? and register-plugin is a
function provided by me for the plugins to call? But i'll still need
an entry point inside the plugin: a procedure that i'll call from the
module as soon as i load it. So this approach doesn't seem to be of a
big advantage.
> > This way there is no magic, and the visibility of the plugin bindings is
> > under the control of the plugin author.
I think I have figured-out a way out of this visibility problem:
(define amodule (resolve-module '(amodule)))
((variable-ref (module-local-variable amodule 'xchat-plugin-init)))
This code seems to work and there is no need for the plugin to
export it's objects anymore.
> Also, this way you could stay
> > pure-R5RS if you like, as you don't really need any features of the
> > module system.
Wait a sec? Are you really thinking what i think you are thinking:
use the simple 'load' procedure combined with your suggested
registeration API instead of using the module system of guile?
Regards,
Zeeshan Ali
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2005-05-24 21:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-23 14:03 Module unloading Zeeshan Ali
2005-05-23 18:18 ` Neil Jerram
2005-05-23 20:55 ` Zeeshan Ali
2005-05-23 21:23 ` Neil Jerram
2005-05-24 13:02 ` Zeeshan Ali
2005-05-24 18:15 ` Neil Jerram
2005-05-24 21:06 ` Zeeshan Ali
2005-05-24 21:26 ` Zeeshan Ali [this message]
2005-05-26 12:16 ` Zeeshan Ali
2005-05-26 18:33 ` Neil Jerram
2005-05-26 20:00 ` Zeeshan Ali
2005-05-26 18:25 ` Neil Jerram
2005-05-26 19:45 ` Zeeshan Ali
2005-05-24 21:14 ` Rob Browning
2005-05-26 18:43 ` Neil Jerram
2005-05-26 18:57 ` Rob Browning
2005-05-26 19:05 ` Neil Jerram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38294b7405052414266f95d20a@mail.gmail.com \
--to=zeenix@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).