unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Tom Tromey <tromey@redhat.com>
Cc: emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	jerry.james@xemacs.org
Subject: Re: DSO-style FFI
Date: Wed, 09 Oct 2013 10:48:54 +0900	[thread overview]
Message-ID: <87hacrjjsp.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87zjqjfz36.fsf@fleche.redhat.com>

Tom Tromey writes:

 > I don't understand why it is preferable to a libffi-based FFI.

Offering dynamic loading only preserves the safety of the Lisp
language itself, modulo bugs in the called C code.  An FFI done simply
will make it possible to write buggy Lisp code that crashes non-buggy
Emacs and/or non-buggy external libraries.  Doing the FFI right is
very finicky and probably depends on the internals of libffi and
Emacs.  As Ralph Nader put it, "unsafe at any speed".

 > The main difficulty I see is that now you're either promising an
 > internal Emacs ABI -- hard to do

Just for the subr calls.  Modules aren't allowed to call ordinary
functions from Emacs, just DEFUNs.

 > -- or you're requiring recompilations whenever Emacs changes --
 > hard on users.

Perhaps.  Worry about this, and the complete lack of demand from
non-developer users, is why XEmacs has never made DSOs part of the
package system.

 > Stefan> One issue will be compatibility of various kinds of dl_open
 > Stefan> mechanisms on various OSes, but you should find lots of help for
 > Stefan> that here, so the first version can focus on supporting only
 > Stefan> GNU/Linux.
 > 
 > GNU already has libltdl.

I forget which one it is, but one of the dlopen mechanisms now works
on recent versions of all platforms XEmacs supports (I think even
native Windows).




  parent reply	other threads:[~2013-10-09  1:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-06  9:15 GNU Emacs-libnettle-libhogweed integration patch v1 Ted Zlatanov
2013-10-06  9:58 ` bignum support in Emacs with libgmp (was: GNU Emacs-libnettle-libhogweed integration patch v1) Ted Zlatanov
2013-10-06 16:09 ` GNU Emacs-libnettle-libhogweed integration patch v1 Eli Zaretskii
2013-10-06 21:07   ` Ted Zlatanov
2013-10-06 16:51 ` Stefan Monnier
2013-10-06 16:58   ` Eli Zaretskii
2013-10-06 21:19   ` Ted Zlatanov
2013-10-07  4:02     ` Stefan Monnier
2013-10-07 11:41       ` Ted Zlatanov
2013-10-07 22:03         ` Ted Zlatanov
2013-10-07 22:58           ` Stefan Monnier
2013-10-07 23:43             ` Emacs crypto use cases (was: GNU Emacs-libnettle-libhogweed integration patch v1) Ted Zlatanov
2013-10-08  3:02               ` Emacs crypto use cases Stefan Monnier
2013-10-08 10:33                 ` Ted Zlatanov
2013-10-08 13:17                   ` Stephen J. Turnbull
2013-10-08 16:35                   ` DSO-style FFI (was: Emacs crypto use cases) Stefan Monnier
2013-10-08 17:32                     ` DSO-style FFI Tom Tromey
2013-10-08 19:42                       ` Ted Zlatanov
2013-10-08 20:43                         ` Tom Tromey
2013-10-09 23:21                           ` Ted Zlatanov
2013-10-10  8:09                             ` Andreas Schwab
2013-10-08 20:47                         ` Davis Herring
2013-10-09 22:26                           ` Ted Zlatanov
2013-10-09 23:52                             ` Davis Herring
2013-10-10  1:25                               ` Ted Zlatanov
2013-10-10  4:36                                 ` DSO-style DSOs (this is NOT an FFI!) Stephen J. Turnbull
2013-10-09  1:48                       ` Stephen J. Turnbull [this message]
2013-10-09  2:40                       ` DSO-style FFI Stefan Monnier
2013-10-12 15:34                         ` Michael Welsh Duggan
2013-10-12 18:55                           ` Stefan Monnier
2013-10-18 13:31                             ` Ted Zlatanov
2013-10-19 14:41                               ` Stefan Monnier
2013-10-19 15:08                               ` Stefan Monnier
2013-10-19 17:33                               ` Andy Moreton
2013-10-19 19:44                                 ` Ted Zlatanov
2013-10-12 23:36                           ` Stephen J. Turnbull
2013-10-08 19:50                     ` Ted Zlatanov

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/emacs/

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

  git send-email \
    --in-reply-to=87hacrjjsp.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=jerry.james@xemacs.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tromey@redhat.com \
    /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 public inbox

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

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).