News for hackers. Stuff that matters.
Re:The Protobuf Language Specification by jeffbee on Monday September 12, 2022 @02:52PM (#32815034)
Out of curiosity: why write proto language implementations rather than protoc plugins?
Re:The Protobuf Language Specification by jen20 on Monday September 12, 2022 @02:57PM (#32815103)
(I don't work at Buf, but happen to be able to answer this) - the post at [1] describes the rationale for wanting something different than the Google compiler.

To my mind I'd rather have something written in Go that I can pull in and version using `go.mod` instead of having to special case a single tool, as well.

[1]: https://docs.buf.build/reference/internal-compiler

Re:The Protobuf Language Specification by jhumphries131 on Monday September 12, 2022 @03:03PM (#32815195)
A great question: We do plan to add content about the plugin protocol to this site. While documentation for plugins is light, it is easier to find and to get a working plugin than it is to find the information needed, for example, to write a tool that performs static analysis on a protobuf source files.

The biggest omission in the existing docs was the specification of the language.

Plugins generally require a library for a particular implementation language, so content we write would likely have to focus on a single language and library (at least to start). Whereas a spec is more broadly useful, regardless of what implementation language one is using with Protobuf.

Re:The Protobuf Language Specification by geraldcombs on Monday September 12, 2022 @04:05PM (#32816123)
So that you can analyze and troubleshoot protobuf network traffic? Wireshark has a protobuf parser that integrates with our dissection API:

https://gitlab.com/wireshark/wireshark/-/blob/master/epan/pr...

Re:The Protobuf Language Specification by jeffbee on Monday September 12, 2022 @05:07PM (#32816977)
Hrmm, I don't see why you would need to think about proto files to do this. You can dissect protocol messages on the wire using the descriptor. In fact, I would say that would be a good improvement to the code you just showed me.