4 ms·
Created TAO[0] -- a minimal syntax that's even simpler than S-expressions. Building notations on top of it, currently focusing on one for data -- an alternativ
by djedr 5y ago
Created TAO[0] -- a minimal syntax that's even simpler than S-expressions.
Building notations on top of it, currently focusing on one for data -- an alternative to XML, JSON et al.
Open-source, prototyping on GitHub[1].
Keepin' it simple ain't easy.
[0] https://tree-annotation.org/ https://tree-annotation.org/
[1] https://github.com/tree-annotation https://github.com/tree-annotation
- majewsky 5y agoIs this not too little syntax, though? The two JSON documents { "foo": true } { "foo": "true" } would both have to map to the same TAO representation: foo [true]
- djedr 5y agoYes, Data TAO as shown on the website maps to a subset of JSON with only one primitive type (string). However this is by design. The idea is to provide only the most generic constructs, decouple specialized data types from the core syntax and enforce/interpret them on a separate layer. An ad hoc (but perfectly sensible IMO) way to apply this idea to the example is: if foo is supposed to be a string then no need to do anything (that's the default primitive). If it's supposed to be a boolean, then parse it as such (e.g. 'true' -> true, 'false' -> false, error otherwise; or even error if typeof JSON.parse(value) !== 'boolean' in JS). A non-ad hoc data type layer for TAO is something I've thought about a lot and it's still baking. Two basic (non-exclusive) ways to do this: 1. Inline/mixed with the data -- type annotations, op-based literals 2. Separated from the data -- schema-based Example designs for the 1st point: foo [`t] foo`: boolean [true] foo`: json [true] All of these would associate the boolean `true` with `foo`.
- dr_kiszonka 5y agoIt looks very neat. I quite like the example where tapping JSON code shows, which characters would be removed in TAO.
- djedr 5y agoGlad to hear that, tried my best to present it in a clear and concise way. Quite the task in itself.
- neolog 5y agoIs your project related to the tree notation project or are you the same guy?
- djedr 5y agoIf you mean https://treenotation.org/ https://treenotation.org/ then it's completely unrelated. I saw this recently on the front page. Was pretty confused myself. Domain name is very similar and what the project is about seems to overlap, but ultimately it goes in a different direction. TAO is my independent original project, but it makes sense that there is > 1 person making an effort to figure this stuff out.