this post was submitted on 20 Nov 2023
1 points (100.0% liked)

Emacs

7 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
top 28 comments
sorted by: hot top controversial new old
[–] mklsls@alien.top 1 points 11 months ago

I voted "Yes", but I meant "Yes, to use LSP without blocking the whole thing everytime".

[–] s3r3ng@alien.top 1 points 11 months ago

A lot of very useful software is not multithreaded. Hell, javascript is not multi-threaded.

[–] Ok_Advisor1053@alien.top 1 points 11 months ago (1 children)

For professional work, yes, for just goofing off at home, no

[–] terminal_prognosis@alien.top 1 points 11 months ago (1 children)

You'll need to explain that to those of us who use Emacs for professional work. What fails for you? In particular, what fails that needs threading to be resolved?

[–] Ok_Advisor1053@alien.top 1 points 11 months ago

The part where I need to type something, but the process is blocked

[–] kr44ng@alien.top 1 points 11 months ago

Since I use Emacs solely for text creation/manipulation, and I don't know what multithreading is, I voted No.

[–] rileyrgham@alien.top 1 points 11 months ago

The only "performance" issue for me is lsp - but that tends to be at first run on a large framework. And since my "old" laptop (x1c6) is about 1000x faster than the one I started using emacs on in the early 2000s it really isnt an issue.

Less haste, more speed...

[–] LionyxML@alien.top 1 points 11 months ago (2 children)

I dream of a world gnus wont hang emacs.

[–] github-alphapapa@alien.top 1 points 11 months ago (1 children)

I guess you should try Commercial Emacs, then.

[–] Thaodan@alien.top 1 points 11 months ago (1 children)

If the author could only communicate better and bring his changes upstream..

I tried to see what do make of his first patch against Emacs 28 that bring threading to Gnus however it was quite hard to rebase/split them up as the original patch was just one big blob.

E.g. he doesn't just add threading to Gnus but also remove or rename variables, e.g. secondary select methods. He doesn't explain changes, he adds unnecessary or rude comments to the commits or code.

[–] github-alphapapa@alien.top 1 points 11 months ago

I didn't say it would be easy. ;)

[–] thetemp_@alien.top 1 points 11 months ago (1 children)

I live in that world by outsourcing article fetching to external services and storing all messages/articles locally. The basic setup is this:

Emails:

  • Offlineimap syncs 2 Gmail accounts and connects directly to...
  • Dovecot as an IMAP server. Dovecot, stores the emails in Maildir format and Gnus's nnimap backend gets them from the local Dovecot server.

RSS/Atom feeds:

  • A program called Feed2exec saves RSS and Atom feeds in Maildir format. Dovecot monitors those folders and serves them to nnimap along with the emails. There is at least one other program that fetches newsfeeds to Maildir, but Feed2exec is in debian.

All 3 of these services do their job regardless of whether Emacs is running, and nnimap is super fast when the server is local.

I don't read actual newsgroups anymore. If I did, I'd install Leafnode for them. But I wonder if the nntp backend would benefit to the same extent that nnimap does.

[–] Thaodan@alien.top 1 points 11 months ago

I'm also using Gnus with IMAP directly too but connecting to a remote Dovecot on my root server. Fetching takes maybe 1 or 2 seconds at max.

I filter all my mails on my server before hand.

[–] -dag-@alien.top 1 points 11 months ago (2 children)

Dealbreaker? No. Major issue? Yes.

Anything over network really needs multithreading. The async hacks are ok, but eventually everything has to sync up again, which is a giant freeze on everything.

[–] nv-elisp@alien.top 1 points 11 months ago (1 children)

What evidence do you have for this?

[–] -dag-@alien.top 1 points 11 months ago
[–] terminal_prognosis@alien.top 1 points 11 months ago

Networking activity is a prime example of something where threading is least likely to be a clearly superior solution. Heavy CPU use is where threading may be the superior choice and a single event-loop thread is not. IO waiting is not.

[–] noooit@alien.top 1 points 11 months ago

I stay away from stupid plugins that block my main thread, so of course it's a deal breaker. I want to use those shitty plugins whose authors don't know what they are doing.

[–] lebensterben@alien.top 1 points 11 months ago (1 children)

at least emacs needs two threads, one for rendering interface and one for the lisp interpreter. this isn’t the multi threading some people hope for but this is much easier to implement and at face level it hides freezes.

[–] janoc@alien.top 1 points 11 months ago

And wouldn't work, given that except for the actual pushing pixels to the screen everything else is done by the Lisp code. So you would need to tightly synchronize the two threads to the point of it being useless.

Having a separate "rendering" thread works for applications where you can queue up rendering tasks and then execute them in the background. Such as a game engine.

Not an interactive text editor that has not been designed with such architecture in mind because threads didn't even exist back in the day.

[–] zacel@alien.top 1 points 11 months ago

No, but it would be nice to have some day in the near future.

[–] zacel@alien.top 1 points 11 months ago

No, but it would be nice to have some day in the near future.

[–] FLMKane@alien.top 1 points 11 months ago

I'm gonna vote yes. I've been using Emacs since 2008, but if I had to start again today I would probably not pick it up, lack of multithreading is partially why.

[–] RumbuncTheRadiant@alien.top 1 points 11 months ago

Multithreading is a grand good source of instability and bugs, please don't.

Multiprocess if you must, but unless you have a language like erlang / elixir multithreading is a bug prone nightmare.

[–] the_whalerus@alien.top 1 points 11 months ago

I answered yes, but I really mean "kindof"

[–] Psionikus@alien.top 1 points 11 months ago

Is this about Elisp threading or Emacs using threads to implement rendering and executing Elisp etc?

[–] field_thought_slight@alien.top 1 points 11 months ago

It's a dealbreaker for certain applications (e.g., window management). It's not a dealbreaker for Emacs as a whole.

Actually, to be clear: most of the pain is with blocking I/O. But Emacs does have support for asynchronous I/O. The problem is that there is too much code that uses blocking I/O rather than asynchronous I/O.

[–] vfclists@alien.top 1 points 11 months ago

If you want a multithreading Emacs contribute to https://github.com/lem-project/lem. That will probably get you there faster than with Emacs.

Truth is it isn't Emacs that you want, but the features it has. Just replicate them in Lem.