12

Emacs implements an interpreter for elisp in C which serves as the de facto reference implementation. Are there any other implementations of elisp in other languages (particularly Javascript)? What is a minimal set of primitives necessary to fully reimplement elisp? What are the essential difficulties in doing so (e.g. dynamic scoping)?

5

Guile Emacs is an Emacs implementation where the original Emacs Lisp interpreter was replaced by libguile recently. There are still interoperation issues (Guile and Emacs have different ideas about strings for instance), but existing Emacs Lisp code can already used (though with rather intimidating performance regressions).

Alternatively, there's nicferrier's Ejit. Its README does describe the difficulties involved, such as certain things only making context in Emacs and how a minimal set of primitives is chosen before compiling Emacs Lisp to Javascript. It is therefore not really a reimplementation, but might help answering your latter questions.

  • Just a note: Ejit compiles to JS, it isn't written in JS. – Malabarba Nov 4 '14 at 18:07
  • Yeah, that paragraph was intended as response to the question what the minimal set of primitives is since the intention is to recognize and simplify those as much as possible before compiling to JS. Some of the difficulties (like, buffers and their properties making less sense) are described, too. – wasamasa Nov 4 '14 at 18:27
  • 2
    I think you want to be pointing to Guile itself. The Guile Emacs project, whilst a significant use-case, is more of a side-note here. – phils Nov 4 '14 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.