Core Dumped
coredumped.dev · Personal blog · on HN since 2021
Core Dumped is a personal blog about building Emacs components in Rust, covering garbage collection, pointer tagging, and text data structures.
What HN saysHN cites its gap buffer versus rope comparison, which found gap buffers perform surprisingly well, and it is referenced in text editor discussions.
16HN people shared it
4linked it in comments
22stories submitted
1.0Kstory points
1 year agolast shared
2021people per year2026
Most-shared posts
- 1Design of Emacs in Rust5 people · 8 points · first shared 2023 · discussion on HN
- 2Building an Emacs Lisp VM in Rust4 people · 142 points · first shared 2021 · 10 comments on HN
- 3A vision of a multi-threaded Emacs3 people · 265 points · first shared 2022 · 132 comments on HN
- 4Implementing a safe garbage collector in Rust3 people · 156 points · first shared 2022 · 16 comments on HN
- 5What is the best pointer tagging method?3 people · 121 points · first shared 2024 · 31 comments on HN
- 6Text Showdown: Gap Buffers vs. Ropes3 people · 1 points · first shared 2023 · discussion on HN
- 7Cycles All Way Down2 people · 6 points · first shared 2024 · discussion on HN
- 8Making TRAMP faster1 people · 228 points · first shared 2025 · 108 comments on HN
- 9Bump Allocation: Up or Down?1 people · 103 points · first shared 2024 · 21 comments on HN
- 10Taking org roam everywhere with logseq1 people · first shared 2021
- 11Homepage1 people · first shared 2023
What HN people wrote when they linked it
celeritascelery · 2023-11-04
This makes me wonder if I should be writing on substack. I currently use a static site generator and host with netlify[1]. This is great because it is simple and I have complete control over the site. But at the same time I can’t see when people visit my site and there is no comment section. I rely or external forums like HN, lobsters, and Reddit to have a discussion. And I have no way of knowing when my content gets shared because I can’t see the traffic.
But my purpose of writing is the same as the authors, to find like minded people and have a discussion with them. It’s kind of cure for intellectual loneliness.
[1] https://coredumped.dev/
shadowgovt · 2024-04-03
emacs still does this IIUC. The beating heart of the emacs edit model is a "gap buffer" at the cursor.
There's a neat compare-and-contrast someone did awhile back on the gap buffer approach vs. the other approach often taken for code IDEs ("ropes"). The tl;dr is that gap buffers are actually really performant for a lot of cases except for having to edit at a lot of randomly-chosen cursor points far apart from each other (but how often is that your use case?).
https://coredumped.dev/2023/08/09/text-showdown-gap-buffers-vs-ropes/
d0mine · 2023-12-27
gap buffer performs surprisingly well vs rope https://coredumped.dev/2023/08/09/text-showdown-gap-buffers-vs-ropes/
FullyFunctional · 2022-01-16
This is a pet interest of mine for decades. Did you run any of this under perf and check where the time is going? This may be too simple (too regular) to show it, but the biggest issue with all of these is that the branch predictor doesn't have enough context to make good predictions and you end up mispredicting a lot.
This paper https://www.cs.toronto.edu/~matz/dissertation/matzDissertation-latex2h… (found the reference in https://coredumped.dev/2021/10/21/building-an-emacs-lisp-vm-in-rust) suggests an interesting option which isn't portable, but a lot less work than a full JIT: generate just call and conditional branches. This was enough for them to basically fix all the branch mispredictions. I have yet to try it, but maybe someone else will feel inspired. The pain I ran into when trying is that a naively mapp'ed region will be very far from the code you are trying to call and you won't be able to use simple instructions. The fix is to try to allocate it explicitly closer.
PS: Another technique I have used in Rust (idea was from cloudflare) is to generate closures and have each closure tail call the next. It'll end up very similar to your continuation passing, but at least on my benchmarks it was _slightly_ worse than the naive dispatch.