News for hackers. Stuff that matters.
Re:Cap’n Proto by heavenlyhash on Sunday September 11, 2016 @09:47AM (#12473318)
I like schemas for validation and strong types. I also like self-describing systems when all goes to hell and I'm debugging either my own protocols or someone else's.

I have this crazy idea that there's a middle ground: self-describing and schemas?

We can kind of glue this together (there's lots of json schemas floating around out there now, it seems), but it would be awfully interesting to see these well-supported as a pair (with explicitly language agnostic schema definitions -- which seems to be a sticking point for most of the json schema strapons).

</tangent>

Re:Cap’n Proto by kentonv on Sunday September 11, 2016 @03:39PM (#12475215)
When I'm forced to use JSON, I often do it by defining a Cap'n Proto schema and using capnp::JsonCodec to parse / serialize that schema as JSON.

https://github.com/sandstorm-io/capnproto/blob/master/c++/sr...

(There are also similar libraries for Protobuf.)

Re:Cap’n Proto by heavenlyhash on Sunday September 11, 2016 @06:27PM (#12476058)
That's..... I want that in my lang.
Re:Cap’n Proto by DenisM on Sunday September 11, 2016 @10:47AM (#12473619)
Re:Cap’n Proto by heavenlyhash on Sunday September 11, 2016 @06:52PM (#12476135)
Doesn't really have an implementation-agnostic schema spec, as far as I'm aware.

(I use CBOR a lot -- I'm otherwise quite happy with it!)

EDIT: I guess there's a "CDDL" listed on the tools page, but... It's still single implementation (ruby) and I don't see a clear link to a grammar for it.