Live data from Hacker News

I built a GPU back end for Emacs

en.andros.dev

41–50 of 117 posts

Re: I built a GPU back end for Emacs

#41

This is outstanding, if I have time I'll be switching over today. 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 bizar…

> 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.

A lot of wishes, but no concrete solutions (unlike TFA). A good design doc with factual arguments would be better.

Re: I built a GPU back end for Emacs

#42
Emacs user for >32 years now. It's a pity this won't get merged. There is a big usability/accessibility factor to consider here: I really wish I could have something like the Ghostty cursor_blaze.glsl shader for highlighting where the cursor is when you switch windows/buffers/apps.

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]

Re: I built a GPU back end for Emacs

#43
post #39

I'm more impressed that you managed to stream youtube - that seems to me like almost the more impressive feat.

There's not much of a secret here; I used ffmpeg to pre-download the video—there's... no actual streaming. When you select a video, it downloads in parallel and starts playing. Sorry to disappoint you :)

Re: I built a GPU back end for Emacs

#44
post #12

Earlier quoted context omitted.

Very much this. I really dislike the somewhat corporate and characterless sounding tone of AI. 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.

Please, have some mercy, English is not my first language! Thanks for the advice, I'll keep it in mind.

dont listen to insane people obsessed with llm hatred. thanks for the article

Re: I built a GPU back end for Emacs

#45

This is outstanding, if I have time I'll be switching over today. 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 bizar…

Just to clarify: the NVIDIA driver is not in-tree, and probably never will be. Intel and AMD are, but require proprietary firmware to work, so the freedom aspect is disputed.

Pardon my shorthand. I meant open source and licensed under both MIT and GPLv2 such that distros build it alongside every other `.ko`.

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!

Re: I built a GPU back end for Emacs

#46
post #34

Earlier quoted context omitted.

I didn't notice to much performance issue switching to PGTK on an ultrawide on Niri. Are you using the daemon to render Emacs as a client?

I have perf issues with emacs-pgtk on a 4k screen on Wayland with Niri in both Emacs as a client and not. The issues appear with typing or scolling, the delay and lag become noticeable. 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.

I have almost the exact same setup as you and even have strange behavior with fractional scrolling. I'm on NixOS so the setup is even inspectable: https://codeberg.org/arik/dotfiles

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.

Re: I built a GPU back end for Emacs

#47
post #5

Earlier quoted context omitted.

If you've reached that conclusion, I'm truly proud of my writing technique. I'm sorry to say, though, that your instincts are failing you this time. I write my articles by hand over several days, although it's true that I do consult AI to improve my style, expressions, find synonyms, create tables, and correct spelling mistakes. Thank you for your comment!

FWIW no one can tell anymore. Claude stopped doing all the LLM ticks like 6 months ago. There's a whole industry of people trying to detect LLM writing and they're getting stomped, this can be and is extremely well studied in the literature. The criticism is that you did something wildly ambitious and pulled it off. The blog is just well written.

People clearly can, though, because they did.

Re: I built a GPU back end for Emacs

#48
post #10

Well done. Here’s hoping that a hand-written GPU backend gets developed based on this wonderful proof of concept. There’s no reason to not take advantage of the state of the art hardware when it’s available. And screens are only moving toward 4k and higher (6k or 8k).

Or that GNU updates a policy that will very rapidly go from probably net silly/mildly contestedly useful to completely ridiculous in a year or two. Not allowing LLM code will be basically turning down the work of the worlds best programmers running at 50x speed in couple years, and will functionally doom any software project that enforces such a policy.

Re: I built a GPU back end for Emacs

#49

This is outstanding, if I have time I'll be switching over today. 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 bizar…

I think a stronger basis for that is probably the Neomacs project aiming to rewrite the elisp layer and all C code in Rust, incorporating GPU rendering etc along the way, see https://github.com/eval-exec/neomacs

Re: I built a GPU back end for Emacs

#50

This is outstanding, if I have time I'll be switching over today. 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 bizar…

>an ideological position on "GPUs" as a category is bizarre even by Late Soviet FSF standards.

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.

Post reply on HN