[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-dynamic-module in Emacs Git?

From: Ted Zlatanov
Subject: Re: emacs-dynamic-module in Emacs Git?
Date: Mon, 01 Dec 2014 12:05:29 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (darwin)

On Mon, 1 Dec 2014 17:28:01 +0100 Aurélien Aptel <address@hidden> 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

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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]