From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: emacs-dynamic-module in Emacs Git? Date: Mon, 01 Dec 2014 12:05:29 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: <85tx1rg64e.fsf_-_@stephe-leake.org> <87siha7r3b.fsf@lifelogs.com> <87lhmz4mtj.fsf@lifelogs.com> <87sih575rc.fsf@lifelogs.com> <8361dyaqf1.fsf@gnu.org> <837fycae5p.fsf@gnu.org> <87y4qs19mi.fsf@lifelogs.com> <874mtfu0et.fsf@lifelogs.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1417453583 28816 80.91.229.3 (1 Dec 2014 17:06:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2014 17:06:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 18:06:16 2014 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 1XvUQQ-0004xd-MM for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 18:06:14 +0100 Original-Received: from localhost ([::1]:32827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUQQ-0000ei-5H for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2014 12:06:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUQ4-0000eO-M5 for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:06:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvUPx-00057G-58 for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:05:52 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:42114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUPw-00057C-Sx for emacs-devel@gnu.org; Mon, 01 Dec 2014 12:05:45 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XvUPv-0004h4-46 for emacs-devel@gnu.org; Mon, 01 Dec 2014 18:05:43 +0100 Original-Received: from 198.0.146.153 ([198.0.146.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Dec 2014 18:05:43 +0100 Original-Received: from tzz by 198.0.146.153 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Dec 2014 18:05:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 198.0.146.153 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (darwin) Cancel-Lock: sha1:rzSz1ZhXvQoRS+PxReva1h0a6zU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:178598 Archived-At: On Mon, 1 Dec 2014 17:28:01 +0100 Aurélien Aptel wrote: AA> In order to do anything useful (even in a "call-only" API) you need AA> access to Emacs facilities. At the very least access to Elisp data AA> structures (symbols, numbers, strings and buffers). I think it's less efficient but also safer to return data as text in sexp or JSON format. Exposing the Emacs internals just to return data seems risky. Some modules may need that level of access, but most don't. AA> The point of compiled modules is also efficiency so the access has AA> to be low level enough (no big conversion or copying needed). Of course, but the difference is not that big and it can be optimized later. AA> Apart from the the new module/opaque type I'd like to add, the way I AA> see it the branch can already be merged and used as a very AA> experimental new feature. Writing the yaml module was a good exercise. AA> We need people to try writing modules and see what they end up AA> using/needing in order to choose what we should keep in the API. Yup. I will write one for libnettle/libhogweed as soon as I am able. AA> For me a module package will be composed of a metadata file, a bunch AA> of C files implementing small and simple primitives and a bunch of AA> elisp files for the logic. Great. But can Emacs find out a module's metadata before loading it? Do you think it should just parse the metadata file? That doesn't guarantee compliance like calling a "get metadata" function in the library itself, but perhaps that's all right. Ted