HackerTrans
TopNewTrendsCommentsPastAskShowJobs

uaksom

no profile record

Submissions

Zig; what I think after months of using it

strongly-typed-thoughts.net
197 points·by uaksom·tahun lalu·175 comments

comments

uaksom
·28 hari yang lalu·discuss
Earendil did! https://lucumr.pocoo.org/2026/5/24/pi-oss/
uaksom
·7 bulan yang lalu·discuss
(author here) If you run the parser under a debugger like lldb, then attempt to inspect the AST of a program, it appears as an array of u64. Not very useful, unless you work on special support for debuggers (such as a python script to unpack it in lldb). Compare that to a tree of pointers, you can "expand" nodes without any extra effort.
uaksom
·7 bulan yang lalu·discuss
(author here) I agree that it's a lot of complexity, and I acknowledge this in the article: You can get quite far with just a bump allocator.

I didn't go into this at all, but the main benefit of this design is how well it interacts with CPU cache. This has almost no effect on the parser, because you're typically just writing the AST, not reading it. I believe that subsequent stages benefit much more from faster traversal.

(By the way, I am a huge fan of your work. Crafting interpreters was my introduction to programming languages!)
uaksom
·8 bulan yang lalu·discuss
Using data races: https://www.ralfj.de/blog/2025/07/24/memory-safety.html