Live data from Hacker News

In Emacs, everything looks like a service

yummymelon.com

51–60 of 127 posts

Re: In Emacs, everything looks like a service

#51
post #5

One of the pivotal moments in my career has been when I used Emacs just enough to truly understand what "Emacs is an operating system" means, not just as a joke but as something I could believe in

But you already had an operating system and you could already code... Did Emacs really give YOU any capability you didn't have before? Don't forget this is a text editor, not an IDE or some general purpose automation harness You could add lisp to mspaint and mspaint suddenly becomes awesome somehow? I don't follow the logic

It sounds like you think emacs is some sort of basic text editor, I dunno, like Notepad on Windows, that has an adjoined Lisp interpreter?

Admittedly, it doesn't help that there are some sibling comments that implicitly seem to be speaking that way.

However, Emacs is a 42-year-old software program that has been in constant development this entire time. Its git repository has over 180,000 commits right now on its main branch, which is still 20,000 ahead of VSCode. It doesn't just have a Lisp editor attached, it has 1.6 million lines of Lisp in it as well, and that's just the source repo, not all of the extensions you can get for it. Using "cloc" to count the total lines of source it has, it's still pretty close to 2/3rds the lines of code than VSCode has, at 2,613,748 for emacs versus 3,849,521 for VSCode. So that's the scale we're talking here, something on par with an IDE, not something on par with a simple text editor.

Yes, it gives you a lot of capabilities you didn't have before. The joke about it being a decent OS that needs a good text editor comes from the fact it has a large number of things it can do out of the box that aren't just text editing. It isn't just Notepad with a Lisp interpreter attached. It has vast capabilities that have been implemented and then also tested over the course of decades. Considering the set of disadvantages it carries with it, like weird key bindings and the fact that the variant of lisp it uses is more-or-less unique to emacs, somewhat analogously to the handicap principle [1] one should counterintuitively understand that as a sign that it must have extraordinary strengths that are able to offset that.

(I've used it for a long time, but I never really learned Lisp. AIs are making it much easier to customize than ever, though. I've said many times here on HN that I think every line of AI code should be reviewed. So yesterday I prompted Claude to build some Lisp functions so I can declare 1. a base directory 2. a regex of file names to match and produce 3. a function to walk over the entire directory forwards or backwards with CTRL-x CTRL-n or CTRL-x CTRL-p, thus allowing me to easily walk through an entire project for review purposes systematically. Nobody had to give me permission to do that. I didn't need to "create an extension". I don't have to care if anyone else in the world wants it. It's not the only editor that can do this as easily as emacs but it's a short list.)

[1]: https://en.wikipedia.org/wiki/Handicap_principle

Re: In Emacs, everything looks like a service

#52
post #5

One of the pivotal moments in my career has been when I used Emacs just enough to truly understand what "Emacs is an operating system" means, not just as a joke but as something I could believe in

But you already had an operating system and you could already code... Did Emacs really give YOU any capability you didn't have before? Don't forget this is a text editor, not an IDE or some general purpose automation harness You could add lisp to mspaint and mspaint suddenly becomes awesome somehow? I don't follow the logic

I think of Emacs as more of a lisp machine than text editor. I'm also not sure what an IDE has over Emacs. I have autocomplete, compiler checks, and run tests all within Emacs.

For general automation, my blog is built with Emacs Lisp.

Re: In Emacs, everything looks like a service

#53

Earlier quoted context omitted.

Developers love building on platforms. Saying there shouldn't be platforms defies reality. Edit: Looking up the quote it seems to just be the person being pedantic in how they define operating systems.

Given his work on Smalltalk, I suspect he means that he prefers the line between language runtime and operating system to be erased, and they be the same thing. I disagree though. While there are benefits to that approach, I feel like language innovation would be stifled to a certain degree.

that seems backwards to me. one of the primary constraints in language development is the OS api. programs that don't interact with the world are increasingly less interesting, and you really have to work hard and be clever to change the file and its semantics, the socket, or the thread. these things have sharp edges and tend to be leaky.

Re: In Emacs, everything looks like a service

#54
post #27

I've been an Emacs user for over 25 years. But last year I switched employers and they won't let me use it even for tasks where it would absolutely shine. Their argument is that all team members should use the same tools, and I guess that is a valid point. Unfortunately, I failed to convince my employer to make everybody else switch to Emacs. So, now I'm using lots of one-purpose tools, one for each separate task, a…

Emacs users (myself included) would feel less like cramming every aspect of our work into Emacs if more tools embodied the freedom and hackability that comes with using Emacs. It's not that Emacs is better, it's that other tools are more restrictive and not self-documenting.

Re: In Emacs, everything looks like a service

#55
post #5

One of the pivotal moments in my career has been when I used Emacs just enough to truly understand what "Emacs is an operating system" means, not just as a joke but as something I could believe in

But you already had an operating system and you could already code... Did Emacs really give YOU any capability you didn't have before? Don't forget this is a text editor, not an IDE or some general purpose automation harness You could add lisp to mspaint and mspaint suddenly becomes awesome somehow? I don't follow the logic

> Don't forget this [emacs] is a text editor, not an IDE or some general purpose automation harness

How familiar are you with Emacs?

Re: In Emacs, everything looks like a service

#56
post #51

Earlier quoted context omitted.

But you already had an operating system and you could already code... Did Emacs really give YOU any capability you didn't have before? Don't forget this is a text editor, not an IDE or some general purpose automation harness You could add lisp to mspaint and mspaint suddenly becomes awesome somehow? I don't follow the logic

It sounds like you think emacs is some sort of basic text editor, I dunno, like Notepad on Windows, that has an adjoined Lisp interpreter? Admittedly, it doesn't help that there are some sibling comments that implicitly seem to be speaking that way. However, Emacs is a 42-year-old software program that has been in constant development this entire time. Its git repository has over 180,000 commits right now on its main…

Fortunately all the "weird key bindings" can be easily changed.

The only difficulty is caused by the fact that already each Emacs mode may change some of the key bindings. Because of that, before deciding on some key bindings you prefer, it is wise to first check the bindings used in all the Emacs modes that you are likely to use frequently, in order to choose bindings that would not conflict with any of those modes.

Re: In Emacs, everything looks like a service

#57
post #5

One of the pivotal moments in my career has been when I used Emacs just enough to truly understand what "Emacs is an operating system" means, not just as a joke but as something I could believe in

But you already had an operating system and you could already code... Did Emacs really give YOU any capability you didn't have before? Don't forget this is a text editor, not an IDE or some general purpose automation harness You could add lisp to mspaint and mspaint suddenly becomes awesome somehow? I don't follow the logic

>Don't forget this is a text editor, not an IDE or some general purpose automation harness

It's all 3 and way more.

>You could add lisp to mspaint and mspaint suddenly becomes awesome somehow? I don't follow the logic

That much is a given (for both)

Re: In Emacs, everything looks like a service

#58
Emacs itself can run as a client and server. To start the server:

  emacs --daemon
Then use `emacsclient` to connect to it. All `emacsclient` instances whether in terminals or GUI are using the same server and can access the same open files and buffers.

Unfortunately it only works locally. I've tried to forward the emacs server socket over ssh to a remote client and it doesn't work.

Re: In Emacs, everything looks like a service

#59

Emacs itself can run as a client and server. To start the server: emacs --daemon Then use `emacsclient` to connect to it. All `emacsclient` instances whether in terminals or GUI are using the same server and can access the same open files and buffers. Unfortunately it only works locally. I've tried to forward the emacs server socket over ssh to a remote client and it doesn't work.

could you see the reason it didn't work?

Re: In Emacs, everything looks like a service

#60
post #54
post #27

I've been an Emacs user for over 25 years. But last year I switched employers and they won't let me use it even for tasks where it would absolutely shine. Their argument is that all team members should use the same tools, and I guess that is a valid point. Unfortunately, I failed to convince my employer to make everybody else switch to Emacs. So, now I'm using lots of one-purpose tools, one for each separate task, a…

Emacs users (myself included) would feel less like cramming every aspect of our work into Emacs if more tools embodied the freedom and hackability that comes with using Emacs. It's not that Emacs is better, it's that other tools are more restrictive and not self-documenting.

It's also helpful that you get a certain degree of UI consistency from things like completing-read being used everywhere. And even when some package departs from convention, everything is still a buffer, so anything in it is easy to reuse.
Post reply on HN