23 comments

  • jwr2 hours ago
    Emacs user for &gt;32 years now. It&#x27;s a pity this won&#x27;t get merged. There is a big usability&#x2F;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&#x2F;buffers&#x2F;apps.<p>Most people think GPU equals silly toys like video in a text window, but there is much more to it than that.<p>[and yes, I know about beacon, which unfortunately doesn&#x27;t work too well, as well as about pulse, which I use]
    • mickeyp1 hour ago
      GPU speedups are welcome, but you don&#x27;t need a shader and a gpu to insert a flashy effect.<p>Emacs has had this for decades: `pulse.el`. And building your own is very simple also.<p>You&#x27;ll still need someone to write the glue code to trigger the pulse, but then a gpu patch on the backend wouldn&#x27;t give you that either.<p>I&#x27;m sure someone on MELPA&#x2F;Github has written code to do just this already.
      • iLemming1 hour ago
        &gt; Emacs has had this for decades<p>Pulse works, but honestly it pales when compared to neovim&#x27;s effect. It would be nice to have a machinery to create things like that in Emacs.
    • iLemming1 hour ago
      I would love to have something like nvim&#x27;s &quot;smear-cursor&quot;. iirc someone wrote a patch (it was posted on r&#x2F;emacs) - I&#x27;ll attach it if I find it. My first thought was &quot;is it doable as a dylib?&quot;
  • arikrahman2 hours ago
    Aside from the wonderful contribution to Emacs, I have the utmost respect for how straight-forward you were with the 100% LLM generated code. The enlightening conversation on GPU freedom that ensued was also informative.
    • wrs1 hour ago
      This is a way of using LLMs that doesn’t seem appreciated enough: prototyping a refactor or other new approach to see how it goes. Even if you then rewrite it from scratch, it’s a big timesaver because you’re using the new knowledge to do the “right thing” and avoid backtracking.
    • andros2 hours ago
      I completely agree with you. For me, it was the best reward.
  • sph3 hours ago
    <a href="https:&#x2F;&#x2F;github.com&#x2F;tanrax&#x2F;emacs-gpu&#x2F;blob&#x2F;main&#x2F;.github&#x2F;assets&#x2F;bench-linux-4k.png" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tanrax&#x2F;emacs-gpu&#x2F;blob&#x2F;main&#x2F;.github&#x2F;assets...</a><p>This massive speed-up on 4K screens makes me want to try it. The wayland pgtk version has such <i>terrible</i> latency I have to use the X11 build to avoid gnashing teeth during my working hours. And I think it&#x27;s the X11 version that uses cairo, so the actual speedup in my case might be even larger.<p>I reported the issue years ago, the pgtk maintainer confirmed, say they can&#x27;t do much as they&#x27;re using GTK3 which isn&#x27;t hardware accelerated, so I have to wait until they migrate to GTK4 (in a decade or so). A bit disappointing, but that&#x27;s open source.<p>Looks like I&#x27;m not the only one suffering with a 4K screen: <a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;emacs&#x2F;comments&#x2F;ucv0at&#x2F;awful_performance_with_pgtk_on_wayland&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;emacs&#x2F;comments&#x2F;ucv0at&#x2F;awful_perform...</a>
    • andros2 hours ago
      Good news on the Wayland front: there is already a working branch (wayland-pgtk-backend) that adds a PGTK binding on top of the same EGL&#x2F;GLES driver, pending merge to main. If you want to try it before that, the branch is available on the repo.
      • zeendo1 hour ago
        I can&#x27;t find that branch here - <a href="https:&#x2F;&#x2F;cgit.git.savannah.gnu.org&#x2F;cgit&#x2F;emacs.git" rel="nofollow">https:&#x2F;&#x2F;cgit.git.savannah.gnu.org&#x2F;cgit&#x2F;emacs.git</a><p>Am I looking in the wrong place?
    • arikrahman2 hours ago
      I didn&#x27;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?
      • zeendo2 hours ago
        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.<p>For me the issue is only unbearable when running fractional scaling, for some reason.<p>I&#x27;m going to try the branch mentioned in the sibling comment, though.
        • arikrahman2 hours ago
          I have almost the exact same setup as you and even have strange behavior with fractional scrolling. I&#x27;m on NixOS so the setup is even inspectable: <a href="https:&#x2F;&#x2F;codeberg.org&#x2F;arik&#x2F;dotfiles" rel="nofollow">https:&#x2F;&#x2F;codeberg.org&#x2F;arik&#x2F;dotfiles</a><p>After resetting the scale from 1.2 to 1.0 through &#x27;niri msg output HDMI-A-2 scale 1&#x27; 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.
          • green7ea59 minutes ago
            I&#x27;m also on Emacs and Niri, seems to be a popular combo, and I don&#x27;t have any performance problem.<p>At home I&#x27;m driving an Ultrawide (3440x1440@75Hz) at scale 1.1.<p>At work I&#x27;m driving two 4k screens at scale 1.2.<p>I might be less sensitive to latency but it could also be a graphics driver issue or something similar. I&#x27;m using Arch with emacs-wayland (pgtk) with a strix halo (all AMD) laptop.
          • zeendo1 hour ago
            I didn&#x27;t invent this mitigation FWIW - I saw it mentioned in one or another thread about this by someone else - possibly on the big reddit thread on this topic, not sure.
  • drob5183 hours ago
    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).
    • joshjob422 hours ago
      Or that GNU updates a policy that will very rapidly go from probably net silly&#x2F;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.
      • tom_2 hours ago
        We shall see.
      • vlian20881 hour ago
        that policy should only ever be relaxed towards legacy contributors and those they can vouch for.<p>otherwise, allowing sloptributions opens the gates to a myriad you-know-who who used to submit pull requests for ESL rewrite of two sequences in README.md and now submit chatgpt-generated refactors - which waste even more human time - just so they can proudly put &quot;open source contributor&quot; on their resumes.
    • andros2 hours ago
      Me too. In the meantime, I&#x27;ll stick with this version :)
  • simscitizen2 hours ago
    I know this type of approach was rejected at the beginning, but you can also just ask CoreGraphics to use the GPU for 2D rendering (and I&#x27;m sure there are equivalent paths in e.g. Skia or Cairo).<p>On macOS&#x2F;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.<p>Lastly, there are some pretty sharp edges to this API, so definitely don&#x27;t go flipping it on for every layer&#x2F;view in your view hierarchy.
    • andros2 hours ago
      There&#x27;s a lot to discuss here, a very interesting comment. I wouldn&#x27;t want to talk too much publicly about certain technical elements, and because I don&#x27;t want to encourage solutions decided by LLMs, however the Skia&#x2F;Cairo-GL angle is interesting but would be a heavy dependency and does not help Linux, where the same gfxterm.c policy drives the OpenGL backend. The vtable abstraction was specifically designed so the rendering logic is written once and the platform just supplies the draw primitives.
    • Conscat2 hours ago
      This seems like the &quot;obvious&quot; solution. Why was the rejected?<p>EDIT: It appears to be an objection to GPU programming entirely.
  • flakiness2 hours ago
    If I were you, it&#x27;d be pretty much worth it when you had a conversation with Stallman.
  • internet_points2 hours ago
    could&#x27;ve guessed staying away from xdisp.c was a good idea, cf. the &quot;Buttery Smooth Emacs&quot;[0] post:<p>&gt; 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.<p>[0] <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;ghosty141&#x2F;c93f21d6cd476417d4a9814eb71dd46e" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;ghosty141&#x2F;c93f21d6cd476417d4a9814eb7...</a>
  • tomaskafka1 hour ago
    &quot;That was the moment the architecture stopped being a promise and became a fact.&quot;<p>The post is AI generated as well, right?
  • lilactown1 hour ago
    I tried to look for the thread on the emacs-devel archive, and couldn&#x27;t find it. Is it not archived for some reason?
    • tom_24 minutes ago
      <a href="https:&#x2F;&#x2F;lists.gnu.org&#x2F;archive&#x2F;html&#x2F;emacs-devel&#x2F;2026-06&#x2F;msg00177.html" rel="nofollow">https:&#x2F;&#x2F;lists.gnu.org&#x2F;archive&#x2F;html&#x2F;emacs-devel&#x2F;2026-06&#x2F;msg00...</a>
  • asa1231 hour ago
    Wow, I was just looking for something like this 15 minutes before you posted! Seems to not support Wayland though, from a quick scan, but cool project nonetheless
  • mickeyp1 hour ago
    This is a really cool project. And it&#x27;s so small, too, when you consider what it unlocks and the opportunities it creates.<p>Really awesome!
  • iLemming1 hour ago
    Hey @d12frosted, would it be possible to have it as the emacs-plus (homebrew formula) option?
  • bingemaker3 hours ago
    Great work! Possible to have a patch that I can apply on 32.0.5 and try this out?
    • andros2 hours ago
      Yes, of course, I worked with the develop version until at a certain point I decided to downgrade to the stable versions. I&#x27;ll be releasing more versions later; I&#x27;m still focused on fixing minor issues in Linux.
  • abstractbg2 hours ago
    Interesting improvement. My biggest issue with Emacs and the reason that I left it was because it was not multi-threaded. I wonder if is&#x2F;can be multi-threaded now.
    • andros2 hours ago
      You have libraries for multithreading. I use them myself for parallel tasks. However, how events and redrawing work is a completely different matter.
    • skydhash2 hours ago
      Concurrency is a source of many bugs and complexity. Emacs have a few async mechanisms and they’re good enough for most tasks. The async nature of other editors does not really matter as you’re still waiting for actions to complete.
    • iLemming1 hour ago
      &gt; because it was not multi-threaded<p>I&#x27;m honestly curious, what kind of multi-threading you use, in whatever you&#x27;re using now instead of Emacs? Can you share some practical example(s)? I&#x27;m not trying to trick you, I&#x27;m just curious for what kind of complex tasks possible there and where Emacs comes short.
      • tmtvl11 minutes ago
        Curious that your comment was dead for whatever reason. I vouched for you because I&#x27;m also curious at what a user would need concurrency for in a text editor (I mean, granted, Emacs is a Lisp implementation with an amazing text editor attached so in theory someone may want concurrency for programming something in Elisp).
  • itomato57 minutes ago
    This should also compile to WASM, and support WebGPU, not that I’m advocating for it.
  • kleiba22 hours ago
    I&#x27;m more impressed that you managed to stream youtube - that seems to me like almost the more impressive feat.
    • andros2 hours ago
      There&#x27;s not much of a secret here; I used ffmpeg to pre-download the video—there&#x27;s... no actual streaming. When you select a video, it downloads in parallel and starts playing. Sorry to disappoint you :)
  • _doctor_love2 hours ago
    This is the way! Very nice work. I want it!
  • reinitctxoffset2 hours ago
    This is outstanding, if I have time I&#x27;ll be switching over today.<p>This is the kind of thing that could drive a truly free fork of emacs forward, it&#x27;s enough better on realistic desktop displays to rally around and as the parent discovered &quot;Free Software&quot; 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 &quot;GPUs&quot; 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&#x27;s got the same software freedom as ext4 and I don&#x27;t hear anyone talking about chains on that.<p>In the age of machine assist emacs could get a modern fast&#x2F;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&#x27;t), modern networking, modern chrome, 100% vscode compatible LSP, modern theming that defaults to something that doesn&#x27;t drive users away. I would love to have a ten line init.el instead of 4k of workarounds.<p>Maybe this can be the nvim moment.<p>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&#x27;d be greeted like a hero.<p>Keep up the good work legend.
    • joshjob422 hours ago
      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 <a href="https:&#x2F;&#x2F;github.com&#x2F;eval-exec&#x2F;neomacs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;eval-exec&#x2F;neomacs</a>
    • wasting_time2 hours ago
      Just to clarify: the NVIDIA driver is <i>not</i> in-tree, and probably never will be.<p>Intel and AMD are, but require proprietary firmware to work, so the freedom aspect is disputed.
      • reinitctxoffset2 hours ago
        Pardon my shorthand. I meant open source and licensed under both MIT and GPLv2 such that distros build it alongside every other `.ko`.<p>One imagines if anyone has an issue it&#x27;s with the RISC-V blob in GSP. Now while I myself wouldn&#x27;t brave the wrath of NVIDIA&#x27;s lawyers by like, calling Ghidra on it or anything, one imagines it doesn&#x27;t have a lot of secrets from the motivated tinkerer!
    • arikrahman2 hours ago
      I agree. Nvim already takes notes out of emacs with major contributors using Funnel to use Lisp as a workaround for working with Lua. This would be a step in the right direction for the continued pioneer emacs proves to be.
    • stackghost2 hours ago
      &gt;an ideological position on &quot;GPUs&quot; as a category is bizarre even by Late Soviet FSF standards.<p>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&#x27;s an obsolete dinosaur who hasn&#x27;t written a line of code in decades and has absolutely no idea how modern computers work.<p>He can&#x27;t update his own website. He evidently doesn&#x27;t seem to know how GPUs work. He does his computing in a very unorthodox and anachronistic manner, and that&#x27;s great for him, but irrelevant to most people who would benefit from more free software.
      • salutis10 minutes ago
        Please do not spread lies.<p>&quot;obsolete dinosaur who hasn&#x27;t written a line of code in decades&quot;<p>The most recent code change in Emacs by RMS was on 2026-04-22 (0fb9d096e38), so ~3 months ago. He can write complex code (without AI), such as the `cond*` macro (707 LOC, all macro code), authored and pushed to Emacs on 2024-08-02 (18491f48d97).
    • skydhash2 hours ago
      &gt; In the age of machine assist emacs could get a modern fast&#x2F;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&#x27;t), modern networking, modern chrome, 100% vscode compatible LSP, modern theming that defaults to something that doesn&#x27;t drive users away. I would love to have a ten line init.el instead of 4k of workarounds.<p>A lot of wishes, but no concrete solutions (unlike TFA). A good design doc with factual arguments would be better.
      • reinitctxoffset2 hours ago
        In fairness I only saw this like, an hour ago, so it&#x27;ll probably be at least until after work before I start messing around with it.
    • andros2 hours ago
      [dead]
  • bjourne2 hours ago
    Cool! Regardless of whether your code gets merged, it shows that xdisp.c can be tamed. Like Roger Bannister who ran the miracle mile, you showed that it can be done. Hopefully more will chip in and slay the Emacs redisplay code beast.
    • andros2 hours ago
      Thank you, this means a lot!
  • juancn3 hours ago
    Doesn&#x27;t just emacs render to a tty?<p>Or is this for some Emacs build with its own renderer?
    • andros3 hours ago
      This is for the GUI build of Emacs, not the terminal (tty) version. Emacs has had a native GUI renderer since the 90s, on macOS it uses Cocoa&#x2F;NS, on Linux it uses GTK or raw X11. This project replaces that CPU-based drawing pipeline with a GPU backend: Metal on macOS and OpenGL&#x2F;EGL on Linux. The tty build is unaffected.
  • imvetri1 hour ago
    What is a backend for GPU?
  • skydhash3 hours ago
    This was almost a good read (a very good goal and a sensible approach), But the pacing of the article smells of LLM. I would suggest to do another pass at editing it out as it diminishes the story.
    • andros3 hours ago
      If you&#x27;ve reached that conclusion, I&#x27;m truly proud of my writing technique. I&#x27;m sorry to say, though, that your instincts are failing you this time. I write my articles by hand over several days, although it&#x27;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!
      • internet_points1 hour ago
        I think you&#x27;d get your point across better if you avoid consulting AI to improve your style, may lead to less distracting threads like this.
      • arikrahman2 hours ago
        With how straight forward you were about disclosing 100% LLM generated code, I have no reason to doubt you. Besides, the most riveting parts were the quotes from the ensuing discussion even from Stallman himself.
      • skydhash2 hours ago
        I don’t think it failed. I was reading it and it did not seem written by a LLM (which I was happy for). But a few sentences did have LLM style and they disrupted my reading flow.<p>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.<p>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.<p>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.
      • reinitctxoffset2 hours ago
        FWIW no one can tell anymore. Claude stopped doing all the LLM ticks like 6 months ago. There&#x27;s a whole industry of people trying to detect LLM writing and they&#x27;re getting stomped, this can be and is extremely well studied in the literature.<p>The criticism is that you did something wildly ambitious and pulled it off. The blog is just well written.
        • rafram50 minutes ago
          &gt; Claude stopped doing all the LLM ticks like 6 months ago.<p>Oh God, if only. You’re right that it moved on from the classics, but it has new ones, and they’re just as identifiable.
        • tom_2 hours ago
          People clearly can, though, because they did.
          • reinitctxoffset2 hours ago
            I&#x27;m inclined to believe the author, given that they were honest about the machine assist on the engineering? Why would they lie about the post and not the artifact?<p>More broadly, I&#x27;m just getting tired of the low effort snark on this. If someone is going to cite a passage, or examples of a theme, do some serious analysis by all means. I&#x27;m not trying to tone police high effort comments.<p>But this drive by &quot;that&#x27;s LLM output&quot; thing is the new low effort &quot;javascript is just as hard as c++&quot; a.k.a &quot;i don&#x27;t know how to do that and i have no intention of learning and it feels bad so i&#x27;m going to lash out&quot;.<p>Make a case that something is deficient on its merits or don&#x27;t, but baseless accusations of dishonesty are not a reasonable default. The parent here did real work that no one paid them to do, donated it to the community asking nothing in return, it&#x27;s meticulous and high value, and they&#x27;ve already been run over by the FSF goons, you really want to pile on with no evidence?
            • tom_50 minutes ago
              I&#x27;m inclined to believe them too, so when he said he used LLMs to tweak the wording, I&#x27;ll accept that was the case.<p>Perhaps the opening post was ill-phrased, but I think the second post clarifies it a bit: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=48677597">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=48677597</a> - and I was certainly getting some vague LLM vibes from the writing, so I was curious about this too.<p>So, whatever it is in the LLM output that is detectable, it&#x27;s clearly detectable, even with the latest LLMs, and even when it&#x27;s present possibly only in trace quantities.
    • ghosty1413 hours ago
      Very much this. I really dislike the somewhat corporate and characterless sounding tone of AI.<p>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 &quot;bring honest numbers&quot; sounds just weird.
      • andros3 hours ago
        Please, have some mercy, English is not my first language! Thanks for the advice, I&#x27;ll keep it in mind.
        • iLemming5 minutes ago
          I honestly just don&#x27;t get it. I feel people just whine for the sake of complaining about it, to get a feeling of some kind of moral superiority, or something. It&#x27;s as if they&#x27;re reading some GRR Martin kind of novel and the dragon slaying portrayal isn&#x27;t up to their liking. It&#x27;s not a fucking prose, learn how to extract useful information from a text, you&#x27;re goddamn programmers, you&#x27;ve been mentally deciphering literal code, probably for a long fucking time, just fucking scan the text with your eyes and comprehend the meaning with your brain. If you don&#x27;t like the style, just ask the LLM to summarize it for you, dang it. It&#x27;s like if someone said: &quot;your text appears to be typed in Emacs, sorry, but I won&#x27;t read it. Try using a less controversial editor next time. Good effort though.&quot; Oh fuck you! Don&#x27;t read it, who cares? Why come complaining about it? I feel like smacking them on the forehead, saying: &quot;good job, you got me, I used AI, now what? Call the police, shoot me, cancel me, send complaints, clog my toilet...&quot; Enormously annoying. More annoying that actually reading text written with AI assistance.
        • green7ea1 hour ago
          People are paranoid that everything they read was written by a LLM. It&#x27;s likely that they are even more suspicious because you used one to code.<p>You should be proud of both the work you did and the article :-).
        • nh23423fefe2 hours ago
          dont listen to insane people obsessed with llm hatred. thanks for the article
        • ghosty1411 hour ago
          hey, honestly I personally wouldnt mind &quot;unusual&quot; english or some weird sentences. Obviously using AI to proofread and give suggestions is great use of it and I dont see a problem in that. Not a native speaker either so I can definitely relate :) I hope I didnt come off as too harsh, its just due to me seeing a lot of half-baked blog spam on r&#x2F;emacs Ive gotten a bit sensitive when noticing AI writing.
  • semessier3 hours ago
    cudos
    • qrios3 hours ago
      A new CUDA API? For DOS?
      • saltcured2 hours ago
        No, CUDOS is using CUDA as your OS.<p>What that has to do with this article about a new device driver for the EMACS OS, I don&#x27;t quite know...
    • andros3 hours ago
      Why?
      • imvetri1 hour ago
        What&#x27;s the article talking about?