Ejacs: a JavaScript interpreter for Emacs — cover art: a snug printer's workshop at evening where a tabby cat in a green eyeshade reads a small JavaScript fragment aloud into a brass speaking-tube, and the same fragment emerges from the other end as living Emacs-Lisp ribbon. 👍

2008 · Stevey's Blog Rants · Announcement

“A commenter named Andrew Barry suggested that I should not call it Ejacs, and the name stuck.”
— From Ejacs: a JavaScript interpreter for Emacs, November 2008
Read the essay Get the code on GitHub →

© 2008 Steve Yegge. Originally published at Stevey's Blog Rants.

Author’s note

This is a surprisingly good read from the sidelines, from someone with no longer any skin in the game. I remember the reception to my Scheme/Elisp/CL comparison was legendary; I nailed that one.

One big thing that changed after this post, much to my surprise and delight, is that Stefan Monnier took over as Emacs maintainer. He led the development of a tremendous number of new Emacs Lisp language features, bringing it much closer to parity with modern dev languages.

AI Notes

The announcement is a decoy, and Steve says so: he's shipping year-old software because he owes the blog a post. The release notes fill maybe a quarter of the space, long enough to reveal that Narcissus, the JavaScript-in-JavaScript interpreter he set out to port, cheats — it borrows its runtime from the JavaScript underneath, "kind of like saying you're building a car by starting from scratch, using absolutely nothing except for a working car." Which is how Steve ended up translating the ECMA-262 spec into Emacs Lisp by hand, and why the real essay starts at the heading "Emacs Lisp vs. JavaScript": a five-count indictment of Elisp (no namespaces, no delegation, dynamic scope that lets a callee quietly clobber your let-bound variables) from someone who had just spent 12,000 lines hitting every wall personally. The war stories carry it: hand-rolled virtual method tables, a property store that switches from alists to a hashtable at a profiler-tuned threshold of fifty, a complete splay-tree library that ships in the box because it turned out to be good for nothing.

Ejacs arrives pre-deprecated; Steve's own warning is that it "doesn't actually do squat except interpret EcmaScript in a little isolated console." The reason to read the post now is the judgment, which aged unusually well. In 2008, with people still "tootling on about how Java's going to be the next big Web language," Steve bet the other way, because he kept meeting very smart people who liked JavaScript — defensively, almost embarrassed, but they liked it. And his closing daydream, a world-class editor opened up to millions of programmers by letting them extend it in JavaScript, came true within a decade. Just not for Emacs.

Related listings

Where it was argued

  • jwz.org Nov 2008 — Jamie Zawinski — author of Lucid Emacs, the fork that became XEmacs — wrote it up: “making fun of Emacs Lisp is kind of like kicking a puppy… a puppy who’s been dead since 1981,” then quoted Steve’s Scheme / Emacs Lisp / Common Lisp car analogy in full. 19 responses.
  • Hacker News Nov 2008 — The announcement thread (38 points).