Top all-time · #1581
Ryan Fleury
Personal blog · rfleury.comprogrammingsystems
Ryan Fleury writes Digital Grove, a personal blog at rfleury.com about programming and systems. Since 2022, 48 different Hacker News readers have linked it 61 times, most often “Untangling Lifetimes: The Arena Allocator”. It is still writing: the last post was on 2026-09-23, and you can follow it by feed.
Towards better computers. Click to read Digital Grove, by Ryan Fleury, a Substack publication with tens of thousands of subscribers.
Most-linked posts?
- Untangling Lifetimes: The Arena Allocator24 people · 25 mentions · first linked 2022-09-24
- Programmers Are Users (Bad Performance Makes Everyone Less Efficient)4 people · 4 mentions · first linked 2024-12-06
- The Easiest Way to Handle Errors Is to Not Have Them3 people · 3 mentions · first linked 2023-12-29
- Demystifying Debuggers3 people · 3 mentions · first linked 2024-12-24
- Factorio, Mutation, & Lossiness2 people · 2 mentions · first linked 2023-09-10
- Ships, Icebergs, Game Engines2 people · 2 mentions · first linked 2022-08-07
- In Defense of Linked Lists2 people · 2 mentions · first linked 2022-11-01
- The Marketplace of Ideals2 people · 2 mentions · first linked 2023-10-01
- Enter the Arena: Simplifying Memory Management (Talk)2 people · 2 mentions · first linked 2024-06-07
- The Magic of the Better Software Conference2 people · 2 mentions · first linked 2026-01-15
What Hacker News says?
game engine architecture, by jason gregory there's a section on memory allocation patterns i believe casey muratori talks about allocation patterns in the handmade hero video series, too edit: ryan fleury has a talk: https://www.rfleury.com/p/enter-the-arena-talk
Comment linking /p/enter-the-arena-talk
on “I learned Vulkan and wrote a small game engine with it”Submitted Demystifying Debuggers, Part 2: The Anatomy of a Running Program as a story · 200 points
HN discussionTwo great resources are: - https://www.gingerbill.org/series/memory-allocation-strategi... - https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “A database without dynamic memory allocation”Submitted Demystifying Debuggers as a story · 177 points
HN discussionYou don't need explicit language support to do this -- it's a fairly common practice in videogame development, but we usually usually call it an arena/scratch buffer. Ryan Fleury has a wonderful article where goes at length about different memory management strategies [1]. It's just a static buffer that you can use for temporary allocations, e.g. to return an array of 50 int32's to a parent stack frame you can just…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Ada's dependent types, and its types as a whole”Submitted Multi-Core by Default as a story · 111 points
HN discussionYou can do lot's of the same things in C too, as the author mentions, without too much pain. See for example [1] and [2] on arena allocators (which can be used exactly as the temporary allocator mentioned in the post) and on accepting that the C standard library is fundamentally broken. From what I can tell, the only significant difference between C and Odin mentioned in the post is that Odin zero-initializes everyt…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Odin: A programming language made for me”Submitted Untangling Lifetimes: The Arena Allocator as a story · 97 points
HN discussionFor those looking: https://www.rfleury.com/p/demystifying-debuggers-part-1-a-bu... :)
Comment linking /p/demystifying-debuggers-part-1-a-busy
on “Demystifying Debuggers, Part 2: The Anatomy of a Running Program”Submitted Multi-Threading and Mutation as a story · 88 points
HN discussion> Getting sweaty chasing around esoteric memory management strategies I’m advocating learning about, and understanding a couple different allocation strategies and simplifying everything by doing away with the GC and minimizing the abstractions you need. My guess is this stuff used to be harder, but it’s now much easier with the languages and knowledge we have available. Even for application development. See https:/…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Performance Improvements in .NET 10”Submitted The Gullible Software Altruist as a story · 64 points
HN discussion> it's quite impressive for a single author to have a functional, fast language with a working garbage collector and arena allocator (with some issues) in only a few years. As the included code shows, the gc is boehm gc, and checking their repo shows they just include libgc/bdwgc. This is absolutely not a knock against anyone here, it's just about the standard library for this need, and I think it is a far smarter m…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “V Language Review (2023)”Submitted Untangling Lifetimes: The Arena Allocator as a story · 60 points
HN discussionI never had the problem of too many pointers, but if I did I'd try the "arena"[0] approach. Preallocate a huge area of memory and use smaller indexes relative to the start instead. Provided a pointer is bigger than a int. You might be able to use this in that approach and keep partial pointers instead. [0] https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Ointers: A library for representing pointers where bits have been stolen (2021)”Submitted Untangling Lifetimes: The Arena Allocator as a story · 31 points
HN discussionI don't think the use of structs to implement vtables in C is abuse, but in this case it's rather pointless. This idiom is used to have dynamic dispatch (e.g. a plugin system), an abstraction (e.g. same interface for file I/O and memory I/O in unit tests), or for ABI-stable vtables in libraries and C++ wrappers. Instead of `json_parse(&parser_state)` your code calls `parser_state.parse(&parser_state)` in main. Inste…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Abusing C to implement JSON parsing with struct methods”Submitted Programmers Are Users (Bad Performance Makes Everyone Less Efficient) as a story · 6 points
HN discussion> Though his approach still requires explicit coordination (LaneIdx(), barriers, range distribution) vs BEAM where the scheduler automatically distributes processes across cores. I don't see how a separate and abstract scheduler handing out tasks is any faster/better. Being explicit isn't always a bad thing. It lets you better understand and control what is going on, which is very useful. For example: in one of the…
Comment linking /i/172146732/dynamically-assigning-many-variable-work-tasks
on “Multi-Core by Default”Submitted Untangling Lifetimes: The Arena Allocator as a story · 6 points
HN discussionThat would get you almost none of the benefits of arenas and other types of allocators. Recommend https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “My Experience of building Bytebeat player in Zig”Submitted Untangling Lifetimes: The Arena Allocator as a story · 5 points
HN discussionThe article was interesting, but even more so was his link to arena allocation in C: https://www.rfleury.com/p/untangling-lifetimes-the-arena-all... This comprehensive article goes over the problems of memory allocation, how programmers and educators have been trained to wrongly think about the problem, and how the concept of arenas solve it. As someone who spends most of his time in garbage collected languages, thi…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Giving C++ std:regex a C makeover”Submitted More Languages Won't Fix the Computing World as a story · 5 points
HN discussionYou may also be interested in this comment thread from the article page, where the author explains his opinion on Zig's approach to allocators: https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
Comment linking /p/untangling-lifetimes-the-arena-allocator/comment/9320539
on “Untangling Lifetimes: The Arena Allocator”Submitted Demystifying Debuggers, Part 3: Kernel Support for Debuggers as a story · 4 points
HN discussionSprinkling small malloc and free-s everywhere, where every object has their own individual lifetime to be managed, is very often not the best approach. Using STL containers often means using that prolific allocation strategy -- it just makes the numerous small allocations implicit. A region based approach is often far simpler conceptually, and more performant. This is a decent article on the topic: https://www.rfleu…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “ImPlot: Interactive plotting library, ImGui style”Submitted Desktop Abstraction and OS Design – Video Discussion with Sam Smith as a story · 3 points
HN discussion> No RAII, no classes, virtual dispatch, smart pointers. I enjoy programming more when the above concepts are absent. RAII and smart pointers tend toward a fragmented and confused layout of a program's memory—there are much simpler ways! The arena concept for managing your program's memory is more straightforward. It's easier to think about (not confused) and it becomes natural to have your memory laid out nice and…
Comment linking /p/untangling-lifetimes-the-arena-allocator
on “Postgres: The Next Generation”Submitted Cracking the Code: Realtime Debugger Visualization Architecture – BSC 2025 as a story · 3 points
HN discussion