Live data from Hacker News

Show HN: Skir – like Protocol Buffer but better

skir.build

21–30 of 69 posts

Re: Show HN: Skir – like Protocol Buffer but better

#21

I spent some time in the actual compiler source. There's real work here, genuinely good ideas. The best thing Skir does is strict generated constructors. You add a field, every construction site lights up. Protobuf's "silently default everything" model has caused mass production incidents at real companies. This is a legitimately better default. Dense JSON is interesting but the docs gloss over the tradeoff: your ser…

> Minor thing that bothered me disproportionately: the constant syntax in the docs (x = 600) doesn't match what the parser actually accepts (x: 600). You’re a better man than me. If the docs can’t even get the syntax right, that’s a hard no from me. Also, fwiw, you’ve got a few points wrong about protos. Inspecting the binary data is hard, but the tag numbers are present. You need the schema, but at least you can ide…

> Also, I disagree on the constructor front. Proto forces you to grapple with the reality that a field may be missing. In a production system, when adding a new field, there will be a point where that field isn’t present on only one side of the network call. The compiler isn’t saving you.

I agree it's important for users to understand that newer fields won't be set when they deserialize old data -- whether that's with Protobuf or Skir. I disagree with the idea that not forcing you to update all constructor call sites when you add a field will help (significantly) with that. Are you saying that because Protobuf forces you to manually search for all call sites when you add a field, it forces you to think about what happens if the field is not set at deserialization, hence, it's a good thing? I'm not sure that outweighs the cost of bugs introduced by cases where you forget to update a constructor call site when you add a field to your schema.

Re: Show HN: Skir – like Protocol Buffer but better

#23
post #14

I spent some time in the actual compiler source. There's real work here, genuinely good ideas. The best thing Skir does is strict generated constructors. You add a field, every construction site lights up. Protobuf's "silently default everything" model has caused mass production incidents at real companies. This is a legitimately better default. Dense JSON is interesting but the docs gloss over the tradeoff: your ser…

Thank you so much for taking the time to dig into the compile source code and the thorough comment you left. For dense JSON: the idea is that it is often a good "default" choice because it offers a good tradeoff across 3 properties: efficiency (where it's between binary and readable JSON), persistability (safe to evolve shema without losing backward compatibility), and readability (it's low for the reasons you mentio…

Not the parent but I infer “fresh” as meaning a new approach to an old problem (with the benefits of experience baked in). A synonym of “modern” without the baggage.

Re: Show HN: Skir – like Protocol Buffer but better

#25
post #14

Earlier quoted context omitted.

Thank you so much for taking the time to dig into the compile source code and the thorough comment you left. For dense JSON: the idea is that it is often a good "default" choice because it offers a good tradeoff across 3 properties: efficiency (where it's between binary and readable JSON), persistability (safe to evolve shema without losing backward compatibility), and readability (it's low for the reasons you mentio…

Not the parent but I infer “fresh” as meaning a new approach to an old problem (with the benefits of experience baked in). A synonym of “modern” without the baggage.

Fair. I changed the tagline on the website to "A modern alternative to Protocol Buffer". Thanks for the feedback.

Re: Show HN: Skir – like Protocol Buffer but better

#26
post #14

Earlier quoted context omitted.

Thank you so much for taking the time to dig into the compile source code and the thorough comment you left. For dense JSON: the idea is that it is often a good "default" choice because it offers a good tradeoff across 3 properties: efficiency (where it's between binary and readable JSON), persistability (safe to evolve shema without losing backward compatibility), and readability (it's low for the reasons you mentio…

Not the parent but I infer “fresh” as meaning a new approach to an old problem (with the benefits of experience baked in). A synonym of “modern” without the baggage.

100%, danke

Re: Show HN: Skir – like Protocol Buffer but better

#27
post #14

I spent some time in the actual compiler source. There's real work here, genuinely good ideas. The best thing Skir does is strict generated constructors. You add a field, every construction site lights up. Protobuf's "silently default everything" model has caused mass production incidents at real companies. This is a legitimately better default. Dense JSON is interesting but the docs gloss over the tradeoff: your ser…

Thank you so much for taking the time to dig into the compile source code and the thorough comment you left. For dense JSON: the idea is that it is often a good "default" choice because it offers a good tradeoff across 3 properties: efficiency (where it's between binary and readable JSON), persistability (safe to evolve shema without losing backward compatibility), and readability (it's low for the reasons you mentio…

Cheers :) (other replier was right on "fresh", "fresh" definitely wasn't right)

Re: Show HN: Skir – like Protocol Buffer but better

#29
post #5

https://capnproto.org/ has been my goto since forever. Made by the protobuf inventor

I've been dabbling with the newer Cap'n Web, whose nicely descriptive README's first line says:

> Cap'n Web is a spiritual sibling to Cap'n Proto (and is created by the same author), but designed to play nice in the web stack.

It's just JSON, which has up and down sides. But things like promise pipelining are such a huge upside versus everything else: you can refer to results (and maybe send them around?) and kick off new work based on those results, before you even get the result back.

This is far far far superior to everything else, totally different ball-game.

I've been a little rebuffed by wasm when I try, keep getting too close to some gravitational event horizon & get sucked in & give up, but for more data-throughput oriented systems, I'm still hoping wrpc ends up being a fantastic pick. https://github.com/bytecodealliance/wrpc . Also Apache Arrow Flight, which I know less about, has mad traction in serious data-throughput systems, which being adjacent to amazingly popular Apache Arrow makes sense. https://arrow.apache.org/docs/format/Flight.html

Re: Show HN: Skir – like Protocol Buffer but better

#30
post #28

Looks nice. But what are the use cases of this? I'm still trying to figure that out.

Thanks! Main use case (similarly to Protobuf) is when you need to exchange data types between systems written in different languages. Like Protobuf, it can also be used in a mono-linguistic system, when you want to serialize systems and have strong guarantees that you will be able to deserialize your data in the future (when you use classic serialization libraries like Pydantic, Java Serialization etc., it's easy to accidentally modify a schema and break the ability to deserialize old data.)
Post reply on HN