News for hackers. Stuff that matters.
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:

    {"abc def": ["123 456", 789, 101112, null, false]}
A better DSL for JSON would have to include actual data types or so,

    obj
     abc def
      arr
       str 123 456
       num 789
       num 101112
       null
       bool f
...or so.
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/jsonetn

It 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.

Re:Show HN: Programming is Now Two-Dimensional by breck on Wednesday June 21, 2017 @03:25PM (#14607074)
I do like the 3 letter word better than my 1 letter word. Nice job!