4 ms·
If you have ideas or comments on the design of the format, please let me know! I've been working on this for 3 years and am getting close to release, but there
by kstenerud 6y ago
If you have ideas or comments on the design of the format, please let me know! I've been working on this for 3 years and am getting close to release, but there are always blind spots when working alone.
The basic premise is that you can never marry "easy to edit" with "efficient to process". They pull in opposing directions, so the only alternative is to have two 100% compatible formats: one in text and one in binary.
I've chosen the data types carefully to support the most common types that come up in real world situations (and have included custom type support for data not intended for public consumption). The compromises made should allow most people to work without adding extra encoding on top of the encoding (base64, special text parsing and such).
The reference implementation is working for all common cases, and mostly there for array types. Once that's finished, I'll start on the schema design.
- bb88 6y agoYou need a fixed decimal float to represent currency. 2.25 or 1.10
- kstenerud 6y agoThe decimal float type would handle that, with a schema to specify fractional precision.
- mkesper 6y agoWould readable large integers be possible? E.gPython. gathered support for numbers like 1_000_000_000
- kstenerud 6y agoAbsolutely. Numeric data can be arbitrarily large, and supports _ as numeric whitespace in the text format.
- valw 6y agoAre you aware of EDN, Transit or Fressian, which IMO improve a lot on the currently common approaches to encoding (JSON / YAML)? If so, how does Concise Encoding differentiate itself? https://github.com/edn-format/edn https://github.com/edn-format/edn https://github.com/cognitect/transit-format https://github.com/cognitect/transit-format https://github.com/Datomic/fressian/wiki https://github.com/Datomic/fressian/wiki
- kstenerud 6y agoYes, I've looked at EDN before. It's solving a similar problem, but not the same one. EDN is focused on extensibility, where as Concise Encoding is focused on concision, and binary-text compatibility. Transit is a bridging format to other encoding formats, which is very cool, but a fairly different problem space. Fressian is pretty close, but is binary only. The main purpose of Concise Encoding is binary-text compatible formats.
- carapace 6y agoIn a project like this I look for a "related work" section (that shows you know the context and are at least not reinventing [square] wheels and have some reason why your thing is different/better than all the other things that do what your thing does already) and a formal grammar (that I can feed to a parser generator etc.).
- seanalltogether 6y agoIt's weird that you use a completely different annotation style for byte arrays. Why not just use bytes = u8[10 ff 38 9a dd 00 4f 4f 91]