News for hackers. Stuff that matters.
Re:Parsing Protobuf Like Never Before by elcritch on Thursday July 24, 2025 @03:48AM (#44668099)
Used them before and they're ok. They were missing some important features like sum types. The code output was a pain, but targeted a few languages. My suspicion is that Captain Proto would be technically superior but less documented than flatbuffers.

However, my preference is to use something like MsgPack or CBOR with compile time reflection to do serde directly into types. You can design the types to require minimal allocations and to parse messages within a few dozen nanoseconds. That means doing things like using static char arrays for strings. It wastes a bit of space but it can be very fast. Also skipping out on spaced used by 64bit pointers can replace a lot of shorter text fields.

That said, I should wrap or port this UPB to Nim. It'd be a nice alternative if it's really as fast as claimed. Though how it handles allocating would be the clincher.

Re:Parsing Protobuf Like Never Before by discreteevent on Thursday July 24, 2025 @04:13AM (#44668281)
[delayed]