3 ms·
Disclaimer: I work on Tree Notation. (https://github.com/treenotation/jtree https://github.com/treenotation/jtree) Here's a proposal: use a Tree Language. I c
by breck 7y ago
Disclaimer: I work on Tree Notation. (https://github.com/treenotation/jtree https://github.com/treenotation/jtree)
Here's a proposal: use a Tree Language.
I created a demo for you called "Fished": https://github.com/breck7/fished https://github.com/breck7/fished.
Took me just a few minutes but already get type check, autocomplete, syntax highlighting, and more.
Tree Notation is early, and there will be kinks until the community is bigger, but I think it may be useful for you.
http://treenotation.org/designer/#grammar%0A%20fishedNode%0A%20%20description%20A%20text%20serialization%20format%20for%20Fish%20Shell's%20history%20file.%0A%20%20root%0A%20%20inScope%20commandNode%0A%20anyCell%0A%20%20highlightScope%20string%0A%20intCell%0A%20%20highlightScope%20constant.numeric.integer%0A%20keywordCell%0A%20%20highlightScope%20keyword%0A%20abstractKeywordNode%0A%20%20firstCellType%20keywordCell%0A%20%20abstract%0A%20commandNode%0A%20%20extends%20abstractKeywordNode%0A%20%20inScope%20whenNode%20pwdNode%20pathsNode%0A%20%20cells%20anyCell%20anyCell%20anyCell%0A%20whenNode%0A%20%20extends%20abstractKeywordNode%0A%20%20cells%20intCell%0A%20pwdNode%0A%20%20extends%20abstractKeywordNode%0A%20%20cells%20anyCell%0A%20pathsNode%0A%20%20extends%20abstractKeywordNode%0A%20%20cells%20anyCell%0Asample%0A%20command%20git%20checkout%20file.txt%0A%20%20when%201565133286%0A%20%20pwd%20%2Fhome%2Fme%2Fdir%2F%0A%20%20paths%20file.txt http://treenotation.org/designer/#grammar%0A%20fishedNode%0A...
- dfee 7y agoWow. This looks really cool. Is there a sort of design defense on how this was designed (tree notation)?
- breck 7y agoNot sure if I’m familiar with the term “design defense”. Can you explain? Stumbled into the idea. Basically just brute forced it. Tried thousands of things, built a huge database of languages, and tried to keep it simple.
- dfee 7y agoI take the idea of “design defense” from Pyramid (Python Web Framework) [0], and have incorporated it into documentation on my projects. Basically, it’s a narrative discussion of how this solution came to be, the trade offs involved, and perhaps its relationships with prior art. [0] https://docs.pylonsproject.org/projects/pyramid/en/1.10-branch/designdefense.html https://docs.pylonsproject.org/projects/pyramid/en/1.10-bran...
- breck 7y agoVery cool. Thank you. Seems like it would be a useful exercise. Added to the todo list.
- voltagex_ 7y agoDo you know if this is called something else? (perhaps in other disciplines) Googling "Design defen{c,s}e" just got me a whole lot of military contractors.
- bmn__ 7y agohttp://enwp.org/Design_document http://enwp.org/Design_document is the commonly used term of art.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]