4 ms·
What? Emacs isn't a big Lisp interpreter. It's a text editor that is extensible with Emacs Lisp. Sure it contains a Lisp interpreter, but saying that Emacs is o
by webkike 12y ago
What? Emacs isn't a big Lisp interpreter. It's a text editor that is extensible with Emacs Lisp. Sure it contains a Lisp interpreter, but saying that Emacs is only a Lisp interpreter implies that the entirety of the text editor is implemented in Lisp, which is clearly not the case.
I use Emacs as a text editor, which means I use it to edit anything that has text. Granted that is a huge part of my computing needs.
I don't want Emacs to be able to do anything. I already have an operating system and a text editor.
- melling 12y agoNope, it's mostly a Lisp interpreter. Stallman had to build some of the low-level stuff in C then he built the rest of the editor in Lisp. "We used the same idea here (in the hybrid technique), that most of the editor would be written in Lisp, but certain parts of it that had to run particularly fast would be written at a lower level" http://www.gnu.org/gnu/rms-lisp.html http://www.gnu.org/gnu/rms-lisp.html That's the beauty of Emacs. Considering that he built it in the early 80s, you have to wonder if the whole thing couldn't be written Lisp today.
- theoh 12y agoThere's some kind of paradox here. You say it's mostly a lisp interpreter, but then, also, mostly editor functionality written in lisp. I'm not sure you can have it both ways...
- camperman 12y agoIt's lisp man, of course you can have it both ways. Code is really data, your program is actually your environment, your editor is actually a giant lisp program with a built-in lisp interpreter. Or is it a lisp interpreter with a built-in editor? I dunno. I'm off to install this release :)
- Igglyboo 12y agoI'm not sure who's right and I don't even use emacs but I just wanted to point out that emacs has about 400k lines of C and about 1.2m lines of lisp.
- melling 12y agohttps://www.gnu.org/software/emacs/manual/html_node/elisp/Writing-Emacs-Primitives.html https://www.gnu.org/software/emacs/manual/html_node/elisp/Wr... http://www.reddit.com/r/programming/comments/1bmhg/the_case_for_emacs/c1bzga http://www.reddit.com/r/programming/comments/1bmhg/the_case_...
- lord_quas 12y agoThis is true, and much of that C is spent implementing the lisp interpreter. I'd love to see how much C is used outside that functionality.
- deng 12y agoThe actual Lisp interpreter is rather tiny compared to the other stuff. Just do a 'ls -l *.c | sort -gk 5' in the src directory. By far the largest file is xdisp.c, which is the redisplay engine, and only a handful of people in the world dare to touch it. Next comes input handling (keyboard.c), then then dealing with coding systems, terminals, win32-API, image handling, windows, processes, buffers, and much more. AFAICS the first file to actually deal with Lisp is lread.c and comes in at #21.
- tuhdo 12y agoEmacs is in essence, a virtual machine: http://www.emacswiki.org/emacs/ByteCodeEngineering http://www.emacswiki.org/emacs/ByteCodeEngineering. That's why you are able to do so many things with it. The whole text editor GUI is just a frontend the Lisp interpreter. You can think that Python comes with an interpreter that runs in terminal. Emacs comes with an interpreter and a whole GUI frontend for its interpreter, not merely a terminal interpreter with a prompt. That's why you are able to evaluate any Emacs Lisp code ANYWHERE. If you only use Emacs as a text editor, that's fine for using a subset of it. Just like a casual user uses Linux without never using its underlying tools in the terminal. > saying that Emacs is only a Lisp interpreter implies that the entirety of the text editor is implemented in Lisp, which is clearly not the case. With this argument, I guess Python is also not an interpreter because clearly it is not entirely written in Python.
- barrkel 12y agoWithout Lisp, or something very like it (and javascript is not good enough), I would not use emacs. I use emacs as a source navigation and exploration tool, even more than for text editing. Its ability to run code customized to the language and projects I'm working on is far more important than its ability to edit text. I actually don't like a lot of its text editing functionality, and had to work hard to get things like selection, tab indenting, scrolling etc. to work in a way that didn't drive me up the walls. I had to give up on virtual space, one of the things that stopped me learning it 10 years ago. It's also very hard to record keyboard macros without accidentally cancelling (I tend to press C-g reflexively when I type a wrong shortcut); I use multiple cursors these days instead, even though that is much riskier / harder to use when you can't see the whole buffer / all edit locations on screen at once. A browser, I don't really need that per se - unless it's linked to library documentation. But it's hard to integrate modern docs without at least understanding HTML, if not HTTP. So I can see the need for a browser implementation.