FR version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
82% Positive
Analyzed from 1956 words in the discussion.
Trending Topics
#emacs#gpu#llm#code#modern#don#build#more#doesn#backend

Discussion (57 Comments)Read Original on HackerNews
Most people think GPU equals silly toys like video in a text window, but there is much more to it than that.
[and yes, I know about beacon, which unfortunately doesn't work too well, as well as about pulse, which I use]
Emacs has had this for decades: `pulse.el`. And building your own is very simple also.
You'll still need someone to write the glue code to trigger the pulse, but then a gpu patch on the backend wouldn't give you that either.
I'm sure someone on MELPA/Github has written code to do just this already.
On macOS/iOS, the easiest way would probably be to set the drawsAsynchronously property on a CALayer. Then, all CoreGraphics operations on the context passed back to the layer via drawInContext: will be GPU accelerated.
Lastly, there are some pretty sharp edges to this API, so definitely don't go flipping it on for every layer/view in your view hierarchy.
EDIT: It appears to be an objection to GPU programming entirely.
This massive speed-up on 4K screens makes me want to try it. The wayland pgtk version has such terrible latency I have to use the X11 build to avoid gnashing teeth during my working hours. And I think it's the X11 version that uses cairo, so the actual speedup in my case might be even larger.
I reported the issue years ago, the pgtk maintainer confirmed, say they can't do much as they're using GTK3 which isn't hardware accelerated, so I have to wait until they migrate to GTK4 (in a decade or so). A bit disappointing, but that's open source.
Looks like I'm not the only one suffering with a 4K screen: https://old.reddit.com/r/emacs/comments/ucv0at/awful_perform...
For me the issue is only unbearable when running fractional scaling, for some reason.
I'm going to try the branch mentioned in the sibling comment, though.
After resetting the scale from 1.2 to 1.0 through 'niri msg output HDMI-A-2 scale 1' I actually noticed a performance increase! I will have to troubleshoot this, although you may have stumbled on a great lead toward the root cause.
> Keep in mind that Emacs xdisp.c tries to support five different toolkits (including two different major versions of GTK) with #ifdefs. There is no runtime abstraction. We define three or four different versions of each damn function. It’s a nightmare.
[0] https://gist.github.com/ghosty141/c93f21d6cd476417d4a9814eb7...
This is the kind of thing that could drive a truly free fork of emacs forward, it's enough better on realistic desktop displays to rally around and as the parent discovered "Free Software" at this point has very little to do with the freedom to do what I want on my computer in a low friction way: an ideological position on "GPUs" as a category is bizarre even by Late Soviet FSF standards. By all means cite a vendor and a policy, but even NVIDIA is in tree now, it's got the same software freedom as ext4 and I don't hear anyone talking about chains on that.
In the age of machine assist emacs could get a modern fast/cachable build, clean under all the sanitizers, io_uring on Linux, deterministic clang formatting, compat break with zero-use junk from the 80s, WASM compilation for polyglot extension (I like lisp but I understand why some people don't), modern networking, modern chrome, 100% vscode compatible LSP, modern theming that defaults to something that doesn't drive users away. I would love to have a ten line init.el instead of 4k of workarounds.
Maybe this can be the nvim moment.
I love emacs but the nvim people have so many nice things and FSF emacs has a shelf life. If someone out of their own time and resources did a cross platform, mechanically verified, dramatically accelerated at HiDPI patch to basically anything else they'd be greeted like a hero.
Keep up the good work legend.
Intel and AMD are, but require proprietary firmware to work, so the freedom aspect is disputed.
One imagines if anyone has an issue it's with the RISC-V blob in GSP. Now while I myself wouldn't brave the wrath of NVIDIA's lawyers by like, calling Ghidra on it or anything, one imagines it doesn't have a lot of secrets from the motivated tinkerer!
The FSF and the GNU project are both paralyzed by their inability to move on from Stallman. He may have been a visionary 40 years ago but now he's an obsolete dinosaur who hasn't written a line of code in decades and has absolutely no idea how modern computers work.
He can't update his own website. He evidently doesn't seem to know how GPUs work. He does his computing in a very unorthodox and anachronistic manner, and that's great for him, but irrelevant to most people who would benefit from more free software.
A lot of wishes, but no concrete solutions (unlike TFA). A good design doc with factual arguments would be better.
Or is this for some Emacs build with its own renderer?
This is my heuristics: Usually when writing a story, authors adopt a fluid flow as they know they have your attention. Same as when telling a story. But LLM tooling usually adopt a highly emphatic tone similar to speeches: Short propositions, emotional crescendo, lots of contrast.
The difference in style is like abruptly going from a conversation to having your interlocutors doing a marketing speech in front of a crowd of one. It’s really jarring.
It’s not the whole piece. Just a few places here and there. If you’ve adjusted a few sentences, maybe try leaving them as is after fixing spelling mistakes.
The criticism is that you did something wildly ambitious and pulled it off. The blog is just well written.
I really liked the part where he tried to get it into upstream emacs, most of these type of projects never even get there. But yeah things like "bring honest numbers" sounds just weird.
What that has to do with this article about a new device driver for the EMACS OS, I don't quite know...