Preserves: An Expressive Data Language
gitlab.com
gitlab.com
In a nutshell though: JSON (for example) doesn't mean anything. It has no semantics - it's just syntax. I wanted something that had a semantics. Plus, proper support for binary, records, and sets, and keys in dictionaries that didn't have to be strings.
There's a wee proto-essay on "why not just use JSON" in an appendix: https://gitlab.com/tonyg/preserves/blob/master/preserves.md#...
There's also a note on why not SPKI Sexps here: https://gitlab.com/tonyg/preserves/blob/master/preserves.md#..., but it doesn't render in the rendered markdown because there's a bug in Gitlab's markdown renderer: https://github.com/github/cmark-gfm/issues/121 (see also https://gitlab.com/gitlab-org/gitlab-ce/issues/52013)
But implementations should let programs access the annotations if the program explicitly asks to do so.
This lets us write "ordinary" programs, where the annotations are transparent, and "meta-level" programs, where the annotations actually do something - think IDEs, debuggers, message-tracing-annotators, provenance-annotators, etc.
The equivalence over values is defined so that annotations are ignored for comparison purposes. So `{ @a "a": 1 }` is equal to `{ "a": 1 }`.
[ETA] Implementations should take care to preserve annotations during round-trips; but to do so in such a way that "ordinary" programs don't even notice they're there.
Finally, annotations are the most "experimental" part of the design at the moment, so feedback on annotations in particular is most welcome.
55 68 65 6C 6C 6F
it would make sense to me to display it as something like: <55> h e l l o
or 55 <h> <e> <l> <l> <o>
depending on which version you prefer.Actually, could you say more about what you have in mind? Something a bit like a config language, maybe -- terminating, sub-Turing -- or something more like a Lisp?
Re: distinction between form and content, that's the intended aim of having separate "semantics" and (two) "syntax" sections. The idea is that to compare Values (i.e. to know which Value you have!), you work in terms of the "semantics" section, not in terms of any particular surface syntax.
> Equivalence. Two Values are equal if neither is less than the other according to the total order.
Directly below the total order of what you call "kinds". That confused me.