all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: FFI again
Date: Tue, 08 Oct 2013 11:22:20 +0900	[thread overview]
Message-ID: <878uy4lcwz.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <8261t83f0e.fsf@gmail.com>

Andy Moreton writes:
 > On Mon 07 Oct 2013, Stefan Monnier wrote:
 > 
 > > So what I propose is to use "runtime loading of DSO" as a poor man's FFI
 > > where the DSL of the FFI is C and where the compilation of this "DSL" is
 > > handled by a C compiler.
 > >
 > > The only technical difference between what I propose and typical "runtime
 > > loading of DSOs" is that the system also handles running the C compiler,
 > > so you can download the TedZ-OpenPGP package from ELPA and install it
 > > (provided you have a C compiler on your machine).
 > 
 > This will work well enough for POSIX systems,

And in XEmacs, it has worked well enough for a decade now.  Windows,
too.  But very few users actually use it as far as I know, on either
type of system.

 > but will fail miserably on Windows systems. Most Windows users do
 > not develpment tools installed, and would have a hard time to find
 > a C compiler producing binaries with the correct ABI, and the other
 > required build tools and dependencies.

You don't need to worry about such users.  The XEmacs runtime DLL
loading system demonstrated optional static linking of the wrapper
code, and load the external DLL as usual at program execution.  The
wrapper code does an Fprovide at Emacs initialization, so the feature
code works as expected.  The price is a somewhat fatter binary and
perhaps loading an external library that would otherwise not take up
any memory.  No DDL wrapper, no problem for users.

Even if the necessary "stuff" is available, such a DLL loading system
really isn't very useful to ordinary users.  Almost nobody except
developers[1] who can save a lot of time by recompiling the module
only and then reloading to test really benefit (having done 3 of these
myself, I can say it *is* a nice feature), vs building the feature
into the Emacs binary.  If you're only occasionally going to rebuild
modules with a C compiler, it's not so much of additional burden to
rebuild Emacs as well.  If the necessary stuff *isn't* available then
you're dependent on somebody else to build an installer.  Again, these
days it may as well be all of Emacs as a single module (and quite
likely the corresponding external DLL).  That way the user doesn't
even need to put the DLLs in the right place.


Footnotes: 
[1]  The others are those who just love BrightShinyThings.




  parent reply	other threads:[~2013-10-08  2:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-05 16:11 FFI again Stefan Monnier
2013-10-05 16:24 ` joakim
2013-10-05 22:18   ` Stefan Monnier
2013-10-05 22:33     ` joakim
2013-10-06 16:39       ` Stefan Monnier
2013-10-06 16:54         ` Eli Zaretskii
2013-10-06 18:17           ` Stefan Monnier
2013-10-06 19:04             ` Eli Zaretskii
2013-10-07  1:41         ` Stephen J. Turnbull
2013-10-07  3:29           ` Stefan Monnier
2013-10-07  4:34             ` Stephen J. Turnbull
2013-10-07  4:58               ` Stefan Monnier
2013-10-07 22:14                 ` Andy Moreton
2013-10-07 22:47                   ` Stefan Monnier
2013-10-08  6:54                     ` Eli Zaretskii
2013-10-08  2:22                   ` Stephen J. Turnbull [this message]
2013-10-08  2:47                   ` Richard Stallman
2013-10-08  5:33                     ` Stephen J. Turnbull
2013-10-08  7:14                       ` Eli Zaretskii
2013-10-05 17:07 ` Eli Zaretskii
2013-10-05 23:24 ` Daniel Colascione
2013-10-06 19:19 ` Richard Stallman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878uy4lcwz.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=andrewjmoreton@gmail.com \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.