Hacker GitHub

← All repos

protocolbuffers/protobuf

View on GitHub ↗ ★ 72,148 C++

Protocol Buffers - Google's data interchange format

124 mentions on Hacker News by 89 people: 11 stories, 113 comments · first 2014-12-15 · latest 2026-10-09

Mentions per year 124 mentions · busiest year 2025 (15)
20082026
  1. …decisions made in protobuf, or if it's just one less bad tradeoff among several bad ones. [1]: https://github.com/protocolbuffers/protobuf/blob/e9360dfa53f...
    comment by sleepydog · 2021-03-31 · in Golang: Know Your 'Nil'
  2. …also met with much opposition internally, and recently changed as of v3.12 (released last year). https://github.com/protocolbuffers/protobuf/blob/master/docs... https://github.com/protocolbuffers/protobuf/releases/tag/v3....
    comment by vitus · 2021-03-30 · in Golang: Know Your 'Nil'
  3. Oh, I see now - https://github.com/protocolbuffers/protobuf/releases/tag/v3.... (General) - I wasn't aware of that as I think I've started using proto3 after that version. Good to know.
    comment by malkia · 2021-03-15 · in REST vs GraphQL vs gRPC
  4. …implementation (or something similar) the last time I looked at protobuf. We sort of do actually: https://github.com/protocolbuffers/protobuf/blob/master/src/... The internal version of protobuf lets you switch individual string fields to…
    comment by haberman · 2020-12-30 · in Don't Use Protobuf for Telemetry
  5. (More) permanent link for those reading this a few years later. https://github.com/protocolbuffers/protobuf/blob/5a7a4a52a79...
  6. The latest optimized version of the protobuf parser does a remarkably similar thing: https://github.com/protocolbuffers/protobuf/blob/master/src/... Protobufs are full of varints, and we want to perform only one bounds-check per field. So…
  7. …and has no formal spec, and this appears to be intentional, with no plans for improvement: https://github.com/protocolbuffers/protobuf/issues/3755 .
  8. …C++ (as linked), Java https://developers.google.com/protocol-buffers/docs/referenc... , and Python https://github.com/protocolbuffers/protobuf/blob/master/pyth... I think the Protobuf spec focuses on the binary serialization - the text…
    comment by vii · 2020-07-23 · in Amazon Ion
  9. …open issue [1] tracking the possibility of making it available in the open source version too. [1] https://github.com/protocolbuffers/protobuf/issues/1896
    comment by quietbritishjim · 2020-06-21 · in FlexBuffers
  10. …use something like http://jsonlines.org/ (i.e. JSON messages separated by newline characters), or https://github.com/protocolbuffers/protobuf if it's more performance-critical.
    comment by jstanley · 2020-05-15 · in What developers should know about TCP
  11. …it doesn't seem to really match this description or enforce a hermetic seal. What am I missing? [1] https://github.com/protocolbuffers/protobuf
    comment by keithwinstein · 2020-05-14 · in Building Uber’s Go Monorepo with Bazel
  12. I like the way how google does it with StatusOr and some status macros https://github.com/protocolbuffers/protobuf/blob/master/src/... https://github.com/protocolbuffers/protobuf/blob/master/src/...
  13. It exists in C++ too: https://github.com/protocolbuffers/protobuf/blob/master/src/...
    comment by haberman · 2020-03-10 · in MessagePack: like JSON, but fast and small
  14. …with Cap'n'proto but apparently Google already has a zero-copy API for Protocol Buffers internally: https://github.com/protocolbuffers/protobuf/issues/1896
  15. …these fields with a comment explaining the apparently pointless wrapper. Google themselves provide https://github.com/protocolbuffers/protobuf/blob/master/src/... to deal with this situation. Quoted from the documentation: > Wrappers for…
    comment by gen220 · 2020-01-31 · in Jepsen: Etcd 3.4.3
  16. You can implement emptiness with the wrapper message types, e.g. StringValue: https://github.com/protocolbuffers/protobuf/blob/master/src/... and sometimes defining your own, e.g. nullable lists. It's not elegant, but it is simple.
    comment by gabetax · 2020-01-30 · in Jepsen: Etcd 3.4.3
  17. https://github.com/protocolbuffers/protobuf/issues/1896 Ok some of the things I said couldn't be done, can be done, but it's situational
    comment by tlarkworthy · 2019-12-26 · in Protobuffers Are Wrong
  18. …one has to use convention _in every single class_ to determine basic things like PATCH semantics ( https://github.com/protocolbuffers/protobuf/issues/359 ). This makes it impossible to treat protobuf as a general data format and requires…
    comment by abernard1 · 2019-12-24 · in Protobuffers Are Wrong
  19. > there is no proto2 library for C#! Looks like that's getting fixed! https://github.com/protocolbuffers/protobuf/blob/master/docs... https://github.com/protocolbuffers/protobuf/pulls?q=is%3Apr+...
    comment by kentonv · 2019-12-24 · in Protobuffers Are Wrong
  20. …specify a dang top-level-package in the emitted _pb2.py and let me wrangle it with setup.py? [0] - https://github.com/protocolbuffers/protobuf/issues/90 [1] - https://github.com/protocolbuffers/protobuf/issues/1491
    comment by kortex · 2019-12-24 · in Protobuffers Are Wrong
  21. …as explicit (actually often moreso, since its more difficult to forget an error condition) [1]: https://github.com/protocolbuffers/protobuf/blob/d0f91c863ae...
    comment by joshuamorton · 2019-10-21 · in Python at Scale: Strict Modules
  22. …to use exceptions in C++. Google doesn't, for example. Errors are reported with StatusOr<> like so: https://github.com/protocolbuffers/protobuf/blob/master/src/...
  23. …is similar to this one in that it makes guesses and then uses strtod() to check them. (...) https://github.com/protocolbuffers/protobuf/blob/ed4321d1cb3...
  24. …that's similar to the RETURN_IF_ERROR that's common in Google C++ code (for example, in protobuf: https://github.com/protocolbuffers/protobuf/blob/master/src/... )
  25. …A really large amount of work has gone into protobuf C++ performance in the last 3 years or so. 1: https://github.com/protocolbuffers/protobuf/blob/master/src/...
  26. …the reader that a given function call can fail. This seems nice, and I would definitely use it. [1] https://github.com/protocolbuffers/protobuf/blob/master/src/...
    comment by alexhutcheson · 2019-06-05 · in Proposal: A built-in Go error check function, try
  27. …removed due to the challenges it introduces in designing backwards-compatible API changes[1]. [1] https://github.com/protocolbuffers/protobuf/issues/2497#issu...
    comment by ntenenz · 2019-05-27 · in Why We’re Switching to gRPC
  28. …a suitable type signature. [0] https://capnproto.org/faq.html#how-do-i-make-a-field-require... [1] https://github.com/protocolbuffers/protobuf/issues/2497#issu...
  29. …but there is a reason that "required" fields were taken out in proto3). From the source code: https://github.com/protocolbuffers/protobuf/blob/master/src/... // An UnknownFieldSet contains fields that were encountered while parsing a //…
    comment by joatmon-snoo · 2019-01-08 · in SQL Is No Excuse to Avoid DevOps
  30. …the package name). [1] https://stackoverflow.com/questions/18735609/the-path-in-pro... [2] https://github.com/protocolbuffers/protobuf/issues/723#issue...
    comment by quietbritishjim · 2018-12-18 · in BloomRPC: GUI Client for GRPC Services
  31. …[3]. He lurks around here :) [0] https://plus.google.com/+KentonVarda/posts/TSDhe5CvaFe [1] https://github.com/protocolbuffers/protobuf [2] https://capnproto.org [3] https://sandstorm.io
    comment by AceJohnny2 · 2018-12-04 · in The Friendship That Made Google Huge
  32. …lower-quality than internal Google code, which shocked me. I've found memory errors in protobuf ( https://github.com/protocolbuffers/protobuf/issues/3752 ), all sorts of wacky stuff in Bazel, and every day I wonder why go-protobuf doesn't…
  33. > No one said that all fields should be optional As of protobuf v3, all fields must be optional. https://github.com/protocolbuffers/protobuf/issues/2497
    comment by slavik81 · 2018-10-11 · in Arguing against using protobuffers
  34. …If T is a scalar, you get to use one of the WKTs. See this GitHub issue for more context: https://github.com/protocolbuffers/protobuf/issues/1606 I work with data where most attributes outside of the attributes that compose the key…
    comment by deathanatos · 2018-10-11 · in Arguing against using protobuffers
  35. …files and mkmf creates a Makefile that builds against the correct headers with the correct flags: https://github.com/google/protobuf/blob/master/ruby/ext/goog... This tool knows about C/C++. It sadly doesn't know about Rust.
  36. …dtoa(). And so that's how the Protocol Buffers library deals with numbers when writing TextFormat: https://github.com/google/protobuf/blob/ed4321d1cb3319998411... But the bigger lesson for me was: Transmitting floating-point numbers in…
  37. …any new parser through the conformance tests; I created these to exercise some of the edge cases. https://github.com/google/protobuf/tree/master/conformance Here are some of the quirks of protobuf: - non-repeated fields can occur multiple…
    comment by haberman · 2018-04-23 · in Parsing JSON is a Minefield
  38. …directory structure for all source files, including protos. Well, yes. You do... At Google. [1] https://github.com/google/protobuf/issues/881 [2] https://github.com/google/protobuf/issues/1491
    comment by heavenlyblue · 2018-03-09 · in Relibc: C Library in Rust for Redox and Linux
  39. …fields. There was a change that made proto3 do this, and that has now (thankfully) been reversed. https://github.com/google/protobuf/issues/272#issuecomment-2...
  40. > And JSON endpoints are a damn sight easier to debug and wireshark and all the rest. https://github.com/google/protobuf/issues/3303
    comment by merb · 2018-01-26 · in gRPC-Go Engineering Practices
  41. …schema-less. The Any type is also designed for this sort of thing. Still clumsy, though. [1] https://github.com/google/protobuf/blob/master/src/google/pr...
    comment by spenczar5 · 2018-01-16 · in Twirp: A new RPC framework for Go
  42. …fields can be ignored and "required fields are generally considered harmful", interesting read: https://github.com/google/protobuf/issues/2497
  43. I don't follow what you are saying. Protobuf has a BUILD file: https://github.com/google/protobuf/blob/master/BUILD Do you mean something else? A GitHub issue might be a better place for this discussion.
    comment by haberman · 2017-09-26 · in Abseil: C++ Common Libraries
  44. …develop. Another alternative is using something like protobuf [1] to define your data models. [1] https://github.com/google/protobuf
  45. …as google.protobuf.BoolValue instead of bool gives you that (same with the other primitive types: https://github.com/google/protobuf/blob/master/src/google/pr... ). But making primitive types never null aligns proto3 with most programming…
  46. …not perfect. For instance, I was not able to build GzipInputStream and GzipOutputStream (see e.g. https://github.com/google/protobuf/issues/2365 ).
  47. Google has StatusOr<T> for this purpose: https://github.com/google/protobuf/blob/master/src/google/pr...
    comment by praptak · 2016-12-15 · in When noexcept?
  48. Protocol Buffers is not proprietary. It is open source under the BSD license. Here is the source code: github.com/google/protobuf. It is very much an open protocol, and anyone is free to write their own implementation of it. It is just a…
  49. …So I think this issue is worth discussing further, and I opened an issue on GitHub to track it: https://github.com/google/protobuf/issues/1890 Thanks for the feedback.
    comment by haberman · 2016-07-29 · in Protocol Buffers v3.0.0 released
  50. https://github.com/google/protobuf/blob/master/src/google/pr...
    comment by dyoo1979 · 2016-07-29 · in Protocol Buffers v3.0.0 released