From: Matthias Koeppe <mkoeppe@mail.Math.Uni-Magdeburg.De>
Cc: Rob Browning <rlb@defaultvalue.org>,
"Dale P. Smith" <dsmith@altustech.com>,
guile-devel@gnu.org
Subject: Re: What replaces scm_register_module_xxx (Doc update?)
Date: Fri, 09 Aug 2002 10:47:50 +0200 [thread overview]
Message-ID: <uw54re48ll5.fsf@saturn.math.uni-magdeburg.de> (raw)
In-Reply-To: <20020808161958.GA24162@www> (rm@fabula.de's message of "Thu, 8 Aug 2002 18:19:58 +0200")
rm@fabula.de writes:
> On Thu, Aug 08, 2002 at 09:31:51AM -0500, Rob Browning wrote:
>> "Dale P. Smith" <dsmith@altustech.com> writes:
>>
>> > The new method is to use a .scm file that defines the module,
>> > dynamically loads the compiled code, and then exports whatever you
>> > need.
>>
>> Right.
>>
>> (define-module (foo bar))
>> (load-extension "libguile-foo-bar-v-1" "init_guile_foo_bar-v-1")
>> (export foo-1)
>> (export foo-2)
>> (export bar-1)
>> ...
>
> I think there's a misunderstanding/misconception here (or, better:
> in guile's current C api). The 'load-c-functions-through-scheme'
> aproach might be fine and all that's needed as long as we only want
> to extend _guile_ (the application) with external libs. But guile
> is inteded to be an embedded srcipting language as well (at least that's
> what the documentation says). If i want my users to be able to script
> some of my applications functionality there's no library i can load
> with 'load-extension' -- of course i could put the tiny scm_* wrapper
> functions into a dll and have _that_ loaded, but i wouldn't call this
> good design practise (oh, i could 'load-extension' my own application
> instead, but that's not really portable ...). Having to provide (and
> deploy!) scm file(s) just to be able to put my functions into different
> modules feels clumsy.
Indeed.
I just want to point out that there was a similar discussion back in
May 2001 ("On the deprecated auto-loading of compiled-code modules").
See
http://mail.gnu.org/pipermail/guile-devel/2001-May/thread.html#1922
Back then, I had complained that I could no longer do module business
from C after scm_register_module_xxx became deprecated.
After some discussion, Marius wrote
(http://mail.gnu.org/pipermail/guile-devel/2001-May/002171.html):
# Ok. It's "Drastic Measures Time". [Thinking as I type...] People
# should be able to handle modules from C, in a way mostly similar to
# how they do it from Scheme. We don't want to guarantee the lower
# level module operations to be stable, but the higher level ones should
# be OK for quite some time (even when we get a totally new module
# system, I hope that we can find a way to integrate the higher level
# features in a backward compatible way).
He proposed and implemented a C API for defining modules and exporting
symbols, see
http://mail.gnu.org/pipermail/guile-devel/2001-May/002171.html
I use this API in the Guile back-end of SWIG (http://www.swig.org).
The functions are also mentioned in the NEWS file of Guile (changes
after release 1.4). The API is also used in
examples/box-module/box.c.
I believe it's only an accident that the functions are not documented
(except for the NEWS blurb). I think documentation should be added;
the changes should also go into the 1.6 release. Preliminary
documentation can be found in the above message by Marius.
Regards,
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-08-09 8:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 13:48 What replaces scm_register_module_xxx (Doc update?) rm
2002-08-08 14:21 ` Dale P. Smith
2002-08-08 14:23 ` Dale P. Smith
2002-08-08 14:31 ` Rob Browning
2002-08-08 16:19 ` rm
2002-08-08 17:59 ` Dale P. Smith
2002-08-08 18:24 ` rm
2002-08-08 20:26 ` Marius Vollmer
2002-08-08 21:28 ` Neil Jerram
2002-08-09 15:36 ` rm
2002-08-17 11:59 ` Neil Jerram
2002-08-19 19:05 ` rm
2002-08-09 8:47 ` Matthias Koeppe [this message]
2002-08-09 10:00 ` rm
2002-08-09 11:29 ` Matthias Koeppe
2002-08-09 13:23 ` rm
2002-08-10 14:44 ` Marius Vollmer
2002-08-11 23:20 ` Marius Vollmer
2002-08-17 8:09 ` Dirk Herrmann
2002-08-17 11:05 ` Neil Jerram
2002-08-24 8:08 ` Dirk Herrmann
2002-08-26 21:45 ` Neil Jerram
2002-08-26 22:04 ` Marius Vollmer
2002-08-21 19:35 ` Marius Vollmer
2002-08-13 0:40 ` Marius Vollmer
2002-08-17 22:37 ` Dale P. Smith
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=uw54re48ll5.fsf@saturn.math.uni-magdeburg.de \
--to=mkoeppe@mail.math.uni-magdeburg.de \
--cc=dsmith@altustech.com \
--cc=guile-devel@gnu.org \
--cc=rlb@defaultvalue.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).