4 ms·
+1 for Emacs. Some people do not realize this, but the thing you build when you compile an Emacs distribution is not a text editor. It's just a specialized li
by Paul-Craft 3y ago
+1 for Emacs.
Some people do not realize this, but the thing you build when you compile an Emacs distribution is not a text editor. It's just a specialized lisp interpreter that has primitives for handling things like frames, buffers, and other UI-type stuff like detecting key chords, plus some math and stringy stuff, and a few other bits and bobs. The editor itself is written in Elisp.
To illustrate, this is what I get when I run `sloccount` on the source download of Emacs 28.2 from gnu.org:
Totals grouped by language (dominant language first):
lisp: 1253948 (75.66%)
ansic: 368126 (22.21%)
objc: 17115 (1.03%)
sh: 7261 (0.44%)
cpp: 1851 (0.11%)
yacc: 1566 (0.09%)
perl: 1442 (0.09%)
php: 1035 (0.06%)
pascal: 1011 (0.06%)
python: 993 (0.06%)
awk: 781 (0.05%)
cs: 770 (0.05%)
ada: 725 (0.04%)
ruby: 405 (0.02%)
erlang: 153 (0.01%)
java: 65 (0.00%)
tcl: 16 (0.00%)
It's basically 75% elisp, 25% C, and more or less all of that C code is either implementing the lisp interpreter itself, or interfacing to system libraries. Using Emacs is really the closest you can get these days to working on one of the old LISP machines from the 80s, except it's more fun.
- Joker_vD 3y ago> It's just a specialized lisp interpreter that has primitives for handling things like frames, buffers, and other UI-type stuff like detecting key chords, plus some math and stringy stuff, and a few other bits and bobs. One day, it may actually include a decent text editor too! But for now, it's the end-luser's responsibility to cobble one together from the provided parts.
- Paul-Craft 3y agoYep. As the saying goes: great operating system, just needs a decent text editor :P
- jancsika 3y ago16 lines of Tcl! I'm guessing a script somewhere for tests? And 65 lines of java? That these have not been replaced by lisp is a travesty, I say.
- Paul-Craft 3y agoLol, I think most of that randomness is somewhere in the test directories.