Earlier quoted context omitted.
When you reach the 4 billionth version of your protocol?
All versions of the same protocol have the same ID. That is the point of IDs -- to link together different versions of the protocol.
Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
221–230 of 240 posts
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#222Earlier quoted context omitted.
Protobufs is a boring old tag-length-value format. It's kind of the worst of both worlds because it has no type information encoded in to it, meaning it's useless without the schema, while still having quite a bit of overhead. Capn'Proto is more like a formalization of C structs in that new fields are only added to the end. If memory serves, on the wire there is no tag, type or length info (for fixed size field types…
Mostly right. Allow me to provide some wonky details. Protobuf uses tag-type-values, i.e. each field is encoded with a tag specifying the field number and some basic type info before the value. The type info is only just enough information to be able to skip the field if you don't recognize it, e.g. it specifies "integer" vs. "byte blob". Some types (such as byte blob) also have a length, some (integer) do not. Neste…
Can you even distinguish floats and ints without a schema in protobufs? I don't remember.
I really enjoy capnproto, flatbuffers and Avro and bounce between them depending on the task at hand.
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#223Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#224Earlier quoted context omitted.
Is this a number that came from an actual benchmark or from some marketing material from a keyboard maker? I ask this because [1] finds latency (measured from touching the key to the usb packet arriving) of 15ms with the fastest keyboard and around 50ms with others, though apparently some manufacturers have since improved. Or are you talking about midi keyboards where I guess latency is more noticeable to users? [1]…
From the countless review and small time YouTube channels that test these things regularly. I think that post must be a few years out of date - and moreover by its own admission doesn’t even test hardly any “gaming” keyboards. There is a tremendous amount of competition in keyboards that has been building for the past 10 years. Input latency is now a marketing thing like horsepower, and there are reasonably reputable…
- apple magic keyboard (? vs 2017) 15ms vs 27ms
- das keyboard (3 vs S professional/4 Professional) 25 vs 11/10ms
- razer ornata (chroma vs chroma/chroma 2) 35 vs 11.4/10.1ms
Interestingly it is not some simple uniform difference: the Apple keyboard does much worse in the rtings test, perhaps getting not much of a bonus from key travel compensation. But the das keyboard vs the razer that are 10ms apart on my link perform equally on rtings (but maybe I found the wrong model). I don’t have a good explanation for that discrepancy.
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#225Earlier quoted context omitted.
Sum types =/= union types. Sum types are also called 'tagged' or 'discriminable' unions because they have some way to discriminate between them. That is, if you have an element a of type A, a is not part of the sum type A + B because it's missing a tag. [5,"hello",3] has the type list (int ∪ string), not list (int + string). You can emulate the latter by manually adding a tag, but native support is much preferable.
I know the differences between untagged and tagged unions, I'm trying to provide a minimal example without distracting details but sure we can talk about tagged unions. Here is a list of tagged unions, so I once again point out that sum types are "supported" in JSON/ions just as much as any other data type: [ {tag: "a", foo: 1}, {tag: "b", bar: "hi", baz: 2}, {tag: "a", foo: 3}, {tag: "a", foo: 4}, {tag: "a", foo: 5}…
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#226Earlier quoted context omitted.
The dominance of JSON just shows that JS is dominant.
> The dominance of JSON just shows that JS is dominant. I don't know that's the case... I've used JSON in lots of non-JS languages because it just works, and errors rarely are caused by mismatches in how JSON behaves in language X and language Y. A lot of that is that it is simple, and rigid.
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#227Earlier quoted context omitted.
Mostly right. Allow me to provide some wonky details. Protobuf uses tag-type-values, i.e. each field is encoded with a tag specifying the field number and some basic type info before the value. The type info is only just enough information to be able to skip the field if you don't recognize it, e.g. it specifies "integer" vs. "byte blob". Some types (such as byte blob) also have a length, some (integer) do not. Neste…
I wouldn't call what protobuf encodes type information. If I recall all the group stuff is deprecated, so what's left basically boils down to 3 types: 32 bit values, 64 bit values and length prefixed values, which covers strings and sub-messages. Without the schema you can't even distinguish strings from sub-objects, as they are both length prefixed as you described. Can you even distinguish floats and ints without a…
Well... I would call it type information, just not complete.
> 32 bit values, 64 bit values and length prefixed values
In protobuf, most integer types are actually encoded as varints, i.e. variable-width integers, not fixed 32-bit or 64-bit. varint encoding encodes 7 bits per byte, and uses the extra bit to indicate whether there are more bytes. (It's not a very good encoding, as it is very branch-heavy. Don't use this in new protocols.)
> Can you even distinguish floats and ints without a schema in protobufs?
You can't distinguish between float vs. fixed32. But int32 would be varint-encoded, while floats are always fixed-width, so you could distinguish between those. (You can't distinguish between int32, uint32, and sint32, though -- and sint32 in particular won't coerce "in the obvious way" to the others.)
The really unfortunate thing is you can't distinguish between strings vs. nested messages (of the length-delimited variety). So if you don't specifically know that something is a nested message then it's not safe to try parsing it...
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#228Did anything ever become of the lispy language that was being built using Ion as its homoiconic syntax? I'm afraid I can't recall what it was called. Fusion maybe?
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#229Earlier quoted context omitted.
From the countless review and small time YouTube channels that test these things regularly. I think that post must be a few years out of date - and moreover by its own admission doesn’t even test hardly any “gaming” keyboards. There is a tremendous amount of competition in keyboards that has been building for the past 10 years. Input latency is now a marketing thing like horsepower, and there are reasonably reputable…
The link I posted was 2017. The site you link gives quite different ratings. I assume partly it is different methodology (the site you link tries to account for key travel somehow and they do something with a display and try to account for display latency rather than using a logic analyzer), but I’m not really sure. For some keyboards in common: - apple magic keyboard (? vs 2017) 15ms vs 27ms - das keyboard (3 vs S p…
Re: Amazon Ion – A richly-typed, self-describing, hierarchical serialization format
#230Earlier quoted context omitted.
> JSON numbers, just like all human readable formats, are decimal... All JSON numbers are implemented as integers or floating point, and as a result, have to be cast as a decimal (a decimal type is generally something that meets this specification: http://speleotrove.com/decimal/ ) when you import them. Decimal types differ from floating point types in three ways: they are accurate, and they take into account roundin…
A binary double can hold any decimal value to 15 digits of precision, so as a serialisation format it's a bit of a non-issue... you just need to convert to decimal and round appropriately before doing any arithmetic where it matters. And you're confusing JSON the format with typical implementations. Open a JSON file and you see decimal digits. There is no limit to the number of the digits in the grammar. Parsing thes…
JSON spec for numbers: integer or float (implemented as a double precision float). JSON libraries read numbers as double precision float because that is the correct type for JSON numbers, not for any other reason.