@kingprottyi
iAccount based inUnited States
About this account
- Account based in
- United States
- Connected via
- Web
Account-level information from X, not a live location or the device used for a specific post.
System optimizer + concurrency geek.
Joined August 2019
- Tweets1.5K
- Following83
- Followers3.3K
- Likes2.9K
Ello timeline,
Currently looking for work. If you need someone to sculpt computers into moving data around efficiently (databases, vms, backends, compute kernels), I'd love to chat.
I naturally reason/design algs in pseudocode. Turns out LLMs have no problem working with it too. Allows writing minimal boilerplate
Having fun with "pseudocode -> real impl" and "paper -> pseudocode" pipelines. It makes learning & testing new concepts/optimizations much easier.
Protty retweeted
Mind boggling to me that I can make a thing faster and there's always people that ask "but why?" What kind of mentality is that? The pursuit of excellence does not need justification. Also, I find in so many cases, we can't know the impact of an improvement until we do it.
For example, one I've talked about before: Ghostty's high IO throughput has enabled terminal program (emulator and TUI) fuzzing at a speed thats incomparably fast to prior solutions. This has resulted in upstream patches to resolve issues in popular projects like btop, tmux, and more.
Speed enabled that anecdotally example that lifted the tides of adjacent communities that don't rely on Ghostty technology at all. I didn't predict this.
Make things better because they can be better and let the results naturally play out.
Protty retweeted
Whatever your transactional database is, help me understand your use of it. This survey is run by @theconsensusdev, independent of any database or vendor.
RT or pass along to industry peers for broader representation
forms.gle/fqjQsezWsztxvYD66
If you're not doing deliberate low-level code, can't seem to stop getting memory errors, or work on systems projects with a team of varying skill levels, Rust (or any lang with Refinement types + an optimizing compiler) is probably the better tool, I'd assume.
Unfortunately, I don't use Zig now. Every 1.5-5x human DX productivity boost from Zig features is eclipsed by the 100x boost from coding agents writing Rust:
Allocator interface:
This is my favorite Zig feature, you feel so galaxy brain using a specialized allocator to optimize a code path (e.g. arena, stack fallback etc). The problem in Rust used to be that there was no Allocator interface equivalent and if you wanted a Vec that used a custom allocator you literally had to copy+paste the std version and modify it to use it (this is what Bumpalo did, look at the source). For a long while now there has been an Allocator trait in nightly, and it seems to be good now. Because it is a trait it is static dispatch, vs Zig's which is based on a vtable. Unlike Zig there isn't a community-wide convention of designing data structures to be parametric based on the allocator, but AI changes the game and makes it trivially to copy paste code and change that. I find it works well enough for my use-case.
Arbitrary bit width integers + packed structs:
Another beloved Zig feature of mine. It makes it so easy to do DOD-style CPU cache optimizations and stuff like tagged pointers, NaN boxing, etc. and even made bitflags really easy to make. You could always do this in Rust or any systems programming language but it was really ugly/unergonomic. The least worst option was using some crate like bitfield/bitflags which both rely on proc macro magic to work. Now, with coding agents I literally do not care how annoying it is to write the code by hand.
Comptime:
This is Zig's flashiest feature, no other programming language except maybe for obscure dependent-types langs have compile time evaluation as nice as Zig's. I thought I would miss it a lot, but I actually don't. For me, 95% of comptime usage is to create Zig's version of generic data structures with parametric types. Rust has a better designed type system IMO (see next section). In the remaining 5% of cases, not having comptime sucks. The only reliable way to reach an equivalent is through codegen. I'm making a game right now, and I have hardcoded hitbox geometry data generated from a tool that I want to bake into a data structure. Without comptime, I have to get Claude to write a script that generates the Rust file. However, I don't find myself needing compile time evaluation that much anyway.
Rust's type system:
I think I'd rather trade having comptime for Rust's better-designed type system, especially for bounded polymorphism (traits/typeclasses). Trying to do the equivalent in Zig is a nightmare. Also, I think that Rust's type system allows you to enforce more variants and prevent coding agents from making common mistakes. In my game I use the euclid crate which essentially allows you to not mix up coordinate spaces (very common problem in graphics programming) by creating specialized types for each coordinate space (e.g. Point or Point)
Not having to deal with memory issues:
With coding agents allowing 100x more code to be written, this also means you need to scrutinize 100x more Zig code for memory issues. Without formal verification, the surface area of the search space to enumerate to find bugs is just so much larger now. With the magnitude of code being generated now, Rust is even more attractive. Rust's tradeoff was always that it hinders developer productivity especially if you are unfamiliar with borrow checker, but this simply does not matter with coding agents anymore. And if you do use unsafe in Rust there's tools like miri which you can have the coding agent run the code against to make sure it doesn't cause UB or isn't violating Rust's aliasing rules when it comes to unsafe.
I still miss writing Zig and find it to be a great language but I like Rust more and coding agents work with better with it.
For 2. Zig can help with spatial safety, (mis/un)used typed memory operations, and often memory leaks. But it doesn't help with logical/lifetime use-after-frees or data races. Some seem to hit those frequently still, so a static checker can save them after some (minor?) cost.
For 3. I've observed that teams with devs who struggle with the above can result in "cleanup crew" situations to keep up the speed. A static soundness checker lowers the cost & chance of other team members having to do said cleanup: nitter.cf/_Felipe/status/2053101…
Replying to @_Felipe
Competent engineers can write safe C/C++ and Zig but building a team that’s competent as a collective is really hard. Specially if it’s under market pressure to ship quickly. Now that everyone has a very productive intern working with them at all times, this became obvious.
Finally hit a problem where DRAM latency was the bottleneck. Optimized it accordingly with ILP for some 3x perf gains
Protty retweeted
Replying to @joseph_h_garvin @PeterVeentjer
gist.github.com/kprotty/d963…
Atomic ops are atomic irrespective of their orderings. The ordering instead dictates how other memory ops around the atomic op are made visible to other threads. Can then encode this as atomic-op dependencies instead of opaque Acquire/Release tags.
2025 was the Year of the @TigerBeetleDB, with 50+ project folders and 100+ artworks!!🤯🥳
I missed spending time on personal projects, but I had some great moments that are directly and indirectly connected to these beetles, and I’m more than ready for 2026!
BTHF!
#artvsartist
Protty retweeted
Excited to share that TigerBeetle and @synadia have pledged $512,000 to the @ziglang Software Foundation.
Zig changed my life, making TigerBeetle possible. It's been an adventure these past 5 years, and thrilled to pay it forward, together with my friend @derekcollison.
Excited to announce that TigerBeetle and @synadia have pledged $512,000 to the Zig Software Foundation.
tigerbeetle.com/blog/2025-10…
Blog: Batched Critical Sections
A better alternative to mutexes
kprotty.me/2025/09/08/batche…