Live data from Hacker News

Cap’n Proto

capnproto.org

61–70 of 194 posts

Re: Cap’n Proto

#61

Apache thrift doesn't seem to be mentioned, how does it compare?

Thrift is very much equivalent to Protobuf for the purpose of everything discussed on the web site. As the site mentions, I prefer to pick on Protobuf because I am also the author of Protobuf v2. :)

Re: Cap’n Proto

#62
post #52

Earlier quoted context omitted.

Treating Windows like a red headed step child is why I, with great disappointment, passed on Cap'n'Proto. Cross platform libraries that really only care about a single platform is an endless source of frustration. :(

Writing software that is safely and gracefully cross-platform is a pain in the neck :-/

Except in this case you have flatbuffers which is a perfectly reasonable replacement and works across a wide array of platforms.

We rejected Cap'n Proto for the same reasons. I don't see a need to use bleeding edge C++ features when the same(or better) results can be achieved with code generation.

Kudos on the effort but if you're looking for wide adoption you've missed the mark.

Re: Cap’n Proto

#63

To get an overview of the area of binary interchange formats that are language agnostic, the author of Cap'n Proto does a good job in this: https://capnproto.org/news/2014-06-17-capnproto-flatbuffers-... "Protocol Buffers" has been the go-to for a long time but there are more options now. For uses where serialization/deserialization CPU time is a concern, it seems to really a question of Cap'n Proto versus flatbuffer…

Big fan of flatbuffers here. Good performance, fit out needs and has MSVC pre-2015 support which is something Capt'n Proto is sorely missing.

Re: Cap’n Proto

#64
post #46
post #40

Earlier quoted context omitted.

I thought the best summary of the big-endian/little-endian question was written in 1980 in Internet Experiment Note (IEN) 137: https://www.ietf.org/rfc/ien/ien137.txt Also more reader-friendly here: https://www.computer.org/csdl/mags/co/1981/10/01667115.pdf

I think figure 1 illustrates a common misunderstanding. People who object to little-endian are often imagining it in their heads as order (3): they imagine that the bits of each byte are ordered most-significant to least-significant (big-endian), but then for some reason the bytes are ordered the opposite, least-significant to most-significant (little-endian). That indeed would make no sense. But because most archite…

Indeed. bit n has value 2^n; byte n has multiplier value 256^n.

Re: Cap’n Proto

#65

How do you pronounce the name? If libreoffice is bad.. This name is absolutely impossible. Is it captain? Is it cap+n+proto? A lot of collaboration is verbal - people sit around and talk about stuff. I don't know if it is a fun take on an American word... But it is impossible to use in the rest of the world. I really wish you would call it something else... Unless it is personal for you :(

So yeah, in the states, we have this cereal called Cap'n Crunch that some people love. I think he was making a pun out of that. The pronunciation would thus be "cap [the sound the letter 'n' makes] crunch".

Seems like a good opportunity to point out that the pun is that the RPC model is based on capabilities. Capabilities and Protobuf -> Cap. 'n' Proto. -> Cap'n Proto

Re: Cap’n Proto

#66
post #52

Earlier quoted context omitted.

Writing software that is safely and gracefully cross-platform is a pain in the neck :-/

Except in this case you have flatbuffers which is a perfectly reasonable replacement and works across a wide array of platforms. We rejected Cap'n Proto for the same reasons. I don't see a need to use bleeding edge C++ features when the same(or better) results can be achieved with code generation. Kudos on the effort but if you're looking for wide adoption you've missed the mark.

> if you're looking for wide adoption

Well... We're not, actually. We're looking to support the needs of Sandstorm.

It's nice if my code is useful to others, and if people want to contribute better Windows support I'll be totally happy to review and merge those changes! But wide adoption of Cap'n Proto (outside of the Sandstorm context) is not part of our business model, unfortunately.

(Note: The poster you were replying to isn't associated with Cap'n Proto nor Sandstorm.)

Re: Cap’n Proto

#67
Big fan of what Sandstorm is doing, both with Sandstorm itself and this component. I really want to use this instead of gRPC, as it seems technically superior, but language bindings and adoption across language ecosystems are likely to be a big downside given that (as Kenton mentions in a comment elsewhere here) Sandstorm isn't really interested in Cap'n Proto being widely adopted. All my new stuff is built in Rust, so the Sandstorm team's interest in and use of Rust are a good fit for me. But when it comes to interoperability with other languages, this may end up being a concern compared to gRPC. In any case, I hope to see the Rust implementation eventually replace the C++ one as the official reference implementation.

Re: Cap’n Proto

#68
post #37
post #31

> The Cap’n Proto encoding is appropriate both as a data interchange format and an in-memory representation, so once your structure is built, you can simply write the bytes straight out to disk! Eh, I'd rather pay the cost of serialisation once and deserialisation once, and then access my data for as close to free as possible, rather than relying on a compiler to actually inline calls properly. > Integers use little-…

Big-endian vs. little-endian is an ancient flamewar that isn't going to go away any time soon, but sure, let's argue. Once you've spent as much time twiddling bits as I have (as the author of proto2 and Cap'n Proto), you start to realize that little endian is much easier to work with than big-endian. For example: - To reinterpret a 64-bit number as 32-bit in BE, you have to add 4 bytes to your pointer. In LE, the poi…

[deleted]

Re: Cap’n Proto

#69
post #51
post #42

Earlier quoted context omitted.

Why did you leave Google?

Well, I could write a lot about this, but... In general, because I felt there was too much resistance to me pursuing ideas that I wanted to pursue. Google has become increasingly top-down, whereas it was fairly bottom-up when I started in 2005. That's not necessarily a bad thing, but I felt that I personally would be happier running a startup where I could call the shots. FWIW, if you just want to write code, be comf…

Thanks for the candid reply!

Re: Cap’n Proto

#70

Big fan of what Sandstorm is doing, both with Sandstorm itself and this component. I really want to use this instead of gRPC, as it seems technically superior, but language bindings and adoption across language ecosystems are likely to be a big downside given that (as Kenton mentions in a comment elsewhere here) Sandstorm isn't really interested in Cap'n Proto being widely adopted. All my new stuff is built in Rust,…

FWIW, language interoperability is of interest to Sandstorm since apps can be written in many languages. But we're only 7 people with a lot on our plate, so unfortunately we can't currently be the ones to go around implementing Cap'n Proto in every language. That will change as Sandstorm grows.
Post reply on HN