From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Burton Samograd Newsgroups: gmane.emacs.devel Subject: RE: FFI in Emacs Date: Wed, 11 Jul 2012 10:04:07 -0400 Message-ID: References: <87r4sibxxn.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1342015472 9425 80.91.229.3 (11 Jul 2012 14:04:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2012 14:04:32 +0000 (UTC) To: Michael Albinus , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 11 16:04:32 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SoxWo-0000fc-Bx for ged-emacs-devel@m.gmane.org; Wed, 11 Jul 2012 16:04:30 +0200 Original-Received: from localhost ([::1]:35385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoxWn-0007tp-Cz for ged-emacs-devel@m.gmane.org; Wed, 11 Jul 2012 10:04:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoxWf-0007l2-Lk for emacs-devel@gnu.org; Wed, 11 Jul 2012 10:04:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoxWV-0005jg-GZ for emacs-devel@gnu.org; Wed, 11 Jul 2012 10:04:21 -0400 Original-Received: from usmail1.markit.com ([69.164.89.130]:11092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoxWV-0005jK-CT for emacs-devel@gnu.org; Wed, 11 Jul 2012 10:04:11 -0400 X-IronPort-AV: E=Sophos;i="4.77,567,1336363200"; d="scan'208";a="1459473" Original-Received: from usmsgcashts001.markit.partners ([10.72.104.18]) by nj4pdmsgrly02-private.markit.partners with ESMTP; 11 Jul 2012 09:59:35 -0400 Original-Received: from NJ4MSGSCR02.markit.partners ([fe80::35d3:9e42:e309:d3bd]) by USMSGCASHTS001.markit.partners ([::1]) with mapi; Wed, 11 Jul 2012 10:04:07 -0400 Thread-Topic: FFI in Emacs Thread-Index: Ac1fMHnLAWWPgaWcSmyN3jkGeOat5AAPToKQ In-Reply-To: <87r4sibxxn.fsf@gmx.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 69.164.89.130 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151532 Archived-At: From: emacs-devel-bounces+burton.samograd=3Dmarkit.com@gnu.org [mailto:emac= s-devel-bounces+burton.samograd=3Dmarkit.com@gnu.org] On Behalf Of Michael = Albinus Sent: Wednesday, July 11, 2012 12:43 AM To: emacs-devel@gnu.org Subject: Re: FFI in Emacs "John Wiegley" writes: >>>>>> Stefan Monnier writes: > >>>> So if we update Dave's patch, it can be committed toward 24.2? >>>> http://www.loveshack.ukfsn.org/emacs/dynamic-loading/ > >> Possibly, yes. I haven't looked at the code, so I can't whether I'd >> like it or not, and we'd want someone willing to maintain it. > > I took a look at Dave's code, and it's not so much an FFI patch as a > "writing Emacs Lisp functions in C" patch. > > A real FFI patch would let me dlopen any C library and call functions > within it, such as openssl or zlib. Dave's patch is more like what Pytho= n allows: > writing Emacs Lisp extensions in C that can be loaded as shared libraries= . > Maybe it's worth to look on what the Guile folks have done. > http://www.gnu.org/software/guile/manual/html_node/Foreign-Function-Inter= face.html#Foreign-> Function-Interface I might also suggest looking CFFI which is a wrapper around the mess of ind= ividual FFI APIs for the common lisp world. I would think that it is a goo= d example of 'common denominator' for FFI features: http://common-lisp.net/project/cffi/ -- Burton Samograd This e-mail, including accompanying communications and attachments, is stri= ctly confidential and only for the intended recipient. Any retention, use o= r disclosure not expressly authorised by Markit is prohibited. This email i= s subject to all waivers and other terms at the following link: http://www.= markit.com/en/about/legal/email-disclaimer.page Please visit http://www.markit.com/en/about/contact/contact-us.page? for co= ntact information on our offices worldwide.