unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Cc: ttn@glug.org, guile-devel@gnu.org, guile-user@gnu.org
Subject: Re: [d.love@dl.ac.uk: dynamic loading of native code modules]
Date: Sun, 14 Apr 2002 23:21:20 -0500	[thread overview]
Message-ID: <87lmbpiocf.fsf@raven.i.defaultvalue.org> (raw)
In-Reply-To: <m3bsclsyxn.fsf@laruns.ossau.uklinux.net> (Neil Jerram's message of "14 Apr 2002 23:22:28 +0100")

Neil Jerram <neil@ossau.uklinux.net> writes:

> I'm pretty sure that Thi was wanting to reinstate (use-modules ...)
> support _in addition to_ keeping load-extension and dynamic-call
> etc.

OK, that's somewhat different, though there would still be some issues
to work out like where the libs should go -- i.e. you used to put them
in %load-path, but if we're using libtool, then they have to go in
LD_LIBRARY_PATH or LTDL_LIBRARY_PATH which somewhat complicates the
semantics of use-modules.  This isn't a *big* deal, though, and to
some extent I may just be coming from a perspective of feeling like
shared library loading and modules are better treated more
orthogonally than others might.

> Using this kind of approach, is it always possible to emulate the
> effect of the old use-modules behaviour by installing a .scm file
> that loads the required library?
>
> If it is, then that's probably sufficient for 1.6, and I'll add
> something to the docs to make that clear.

More or less, the primary differences that I can think of are that in
the old approach you would put the shared libs in a /usr/share
directory (which isn't quite right according to the FHS and causes
problems on shared NFS volumes which expect only arch-independent data
in /usr/share), where with the new approach the libs need to be
located somewhere that libltdl can find them (system lib path,
LD_LIBRARY_PATH or LDTL_LIBRARY_PATH).  Also with the old approach,
any functions defined in your shared lib would automatically and
unavoidably be exported from the module that the shared lib
represented -- with the new approach you need to either add an export
for each function to the .scm file by hand, or write some module code
to export all symbols defined in the module after the shared lib has
been initialized -- i.e.

  (for-each
    (lambda (sym) (export sym))
    (module-bindings (current-module)))

or similar...

> Yes, load-extension should be used here.  The difference is that
> load-extension provides a way of handling the case where the LIB is
> already statically linked in.  (And the case where it has previously
> been dynamically linked?)  I think the code is still pretty explicit:
>
> (load-extension "libmylib" "my_init_func")

OK, right -- I just haven't used load-extension much yet, but that
seems good to me.

> Well, I agree with all the examples you give here, but what about the
> following?

OK, here goes nothing :> (Oh, and I am by no means implying here that
I know we haven't ever dropped anything we shouldn't have or that I'm
*certain* that none of these things should have been dropped -- what's
below is just my current impression regarding each.)

> - dropped support for multibyte strings  [unless I'm misunderstanding
>   the old mailing lists, Guile used to have these !]

Hmm.  I not sure about whether or not guile used to have them, but my
main impression is that guile has taken a long time even figuring out
what it thinks a reasonable answer to this problem is, much less
designing a solution with good documentation that is intended to be
supported for the long-haul.  However, I could easily be mistaken
here.

> - dropped/lost support for Tcl/Tk

That strikes me as an "add on" that is only going to stick around for
as long as there are enough people interested in guile's tcl/tk
support to continue maintaining it, and if there aren't enough people
around interested in supporting it, then perhaps it *should* go away.

> - dropped/lost support for Ctax and other things (parser, rx etc.)
>   in the guile-lang-allover package (or guile-rgx-ctax in CVS)

I can't really speak to this having never seen, used, or worked on any
of this -- I like the *idea* of translating multiple languages into
guile, but I doubt that it's likely to happen on a large scale until
guile is a persuasive enough platform with respect to the basics to
attract groups wanting to work on the languages in question.
Otherwise I doubt there are enough people here, just given us, to both
maintain the core of guile well *and* develop and maintain any
significant number of font ends.

I guess in the end I feel that in the absence of infinite resources,
extensions from the guile core that don't have enough demand to create
and sustain the communities that develop and support them often will
(and likely should) fade away.

Things people want and need *will* get worked on.  As an example, I
don't think guile-pg has had a lot of development lately, but recently
we've started using it heavily here, and Dale has also been working
with it.  As a result, I've contacted Ian to see what his current
status is and to see how we might be able to help -- Dale and I have
already fixed it to work at least crudely with the newer autotools and
the stable branch.

> - dropped/lost support for Hobbit compilation

This one I've talked to Marius about off and on at some length, and
have actually worked on a bit myself (Hobbit and CVS in particular).
I think the conclusion was that guile's evaluator needs to be reworked
in some of the ways that Marius, Lynn, and others, including myself
have talked about, or any work on compilation is likely to be way too
much effort for too little gain.  Guile is not currently built to
support compilation cleanly -- the addition of syntax-case and the
ways in which it breaks hobbit (among other things) points this out.

As Marius has mentioned we likely need a cleaner evaluation model
(with clear separations between "read time", "compile time", and
"execution time" before we're going to be able to make a lot of
sustainable headway here.  The good thing is that if we do manage to
seprate these things in a resonable way, we may end up with a lot of
interesting flexibility wrt to offline-compilation, JIT compilation,
byte-compilation, etc.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-04-15  4:21 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12  1:06 [d.love@dl.ac.uk: dynamic loading of native code modules] Thien-Thi Nguyen
2002-04-13  8:50 ` Neil Jerram
2002-04-14  0:58   ` Rob Browning
2002-04-14 22:22     ` Neil Jerram
2002-04-15  4:21       ` Rob Browning [this message]
2002-04-16 20:23         ` Neil Jerram
2002-04-17  5:25           ` Rob Browning
2002-04-20  8:14           ` Thien-Thi Nguyen
2002-04-20 11:07             ` Neil Jerram
2002-04-15 12:15       ` Marius Vollmer
2002-04-16 20:24         ` Neil Jerram
2002-04-17  0:53           ` NIIBE Yutaka
2002-04-20  7:57             ` Thien-Thi Nguyen
2002-04-17  5:36           ` Rob Browning
2002-04-17  5:43             ` Rob Browning
2002-04-20  7:53             ` Thien-Thi Nguyen
2002-04-21 15:20               ` Rob Browning
2002-04-21 15:51                 ` Robert A. Uhl
2002-04-21 16:27                   ` Rob Browning
2002-05-14  8:53                 ` Thien-Thi Nguyen
2002-04-14 21:30   ` Marius Vollmer
2002-04-15 17:58     ` Andreas Rottmann
2002-04-15 19:06       ` Marius Vollmer
2002-04-24  8:00       ` Thien-Thi Nguyen
2002-04-24 14:33         ` Rob Browning
2002-04-24 14:51           ` rm
2002-04-24 15:14             ` Andreas Rottmann
2002-04-24 15:48               ` Rob Browning
2002-04-24 16:15                 ` Bill Gribble
2002-04-24 16:24                   ` Rob Browning
2002-04-24 18:10                   ` Andreas Rottmann
2002-04-24 20:36                     ` Rob Browning
     [not found]                     ` <87wuuwhm08.fsf@raven.i.defaultvalue.org>
2002-04-25  2:05                       ` Joshua Judson Rosen
2002-04-25  3:03                         ` Rob Browning
2002-04-24 18:06                 ` Andreas Rottmann
2002-04-24 20:40                   ` Rob Browning
2002-04-24 20:53                     ` Andreas Rottmann
2002-04-30  0:26                     ` Lynn Winebarger
2002-04-30  1:35                       ` Thien-Thi Nguyen
2002-04-30  2:33                         ` Lynn Winebarger
     [not found]                         ` <0204292133140I.10649@locke.free-expression.org>
2002-05-04  0:19                           ` Thien-Thi Nguyen
2002-04-30  0:20                 ` Lynn Winebarger
2002-04-24 15:28             ` Rob Browning
2002-05-15  0:19               ` Thien-Thi Nguyen
2002-04-24 18:34           ` Thien-Thi Nguyen
2002-04-24 18:58             ` Rob Browning
2002-04-25  5:32               ` Thien-Thi Nguyen
2002-05-01  5:00           ` Lynn Winebarger
2002-05-01 13:50             ` Rob Browning
2002-04-24  0:52     ` Thien-Thi Nguyen
2002-04-20  9:06   ` Thien-Thi Nguyen
2002-04-20 12:21     ` Neil Jerram
2002-04-20 12:44       ` Thien-Thi Nguyen
2002-04-24  0:09   ` Thien-Thi Nguyen
2002-04-14  0:34 ` Rob Browning
2002-04-14  2:55   ` Rob Browning
2002-04-24  0:24   ` Thien-Thi Nguyen
2002-04-24  5:25     ` Rob Browning
2002-04-24 21:18       ` Marius Vollmer
2002-04-25  4:10         ` Thien-Thi Nguyen
2002-04-28 15:32           ` Marius Vollmer
2002-04-28 20:19             ` Thien-Thi Nguyen
2002-05-14 10:57       ` Thien-Thi Nguyen
2002-05-14 16:11         ` Bill Gribble
2002-05-14 20:54           ` Thien-Thi Nguyen

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=87lmbpiocf.fsf@raven.i.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=ttn@glug.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).