Re:Show HN: Programming is Now Two-Dimensional
by drostie on Wednesday June 21, 2017 @02:43PM
(#14606747)
It's the latter. The JSON encoding example is actually a really bad example for this language because there is a huge class of JSON which it cannot easily be seen to encode, though you can probably make some exceptions. An example of the many undefined things would be:
A better DSL for JSON would have to include actual data types or so,
...or so.
[ Parent
| on HN ]
Re:Show HN: Programming is Now Two-Dimensional
by breck on Wednesday June 21, 2017 @03:09PM
(#14606969)
The paper takes the example from jsonETN. The first letter is the data type.
s: StringNode
n: NumberNode
a: ArrayNode
o: ObjectNode
b: BooleanNode
j: OtherNode
I just posted the repo here if you're curious. https://github.com/breck7/jsonetnIt used to pass every test, but I haven't touched it in a while and seems like a few lines need to be updated to bring it up to date with TN 4.0 (it's on 3.8 now). Handles the tricky JSON edge cases fine.
It would be great if someone wanted to maintain a solid JsonETN! I'm on to the Turing Complete ETNs nowadays, but a JSON ETN would be great and would let you use ETN tools to work with JSON.
Package.json for NPM should eventually switch to an ETN. Would provide noticeable benefits.