5 ms·
The consistent reposting and commenting about tree notation is tiring, especially when it has obvious flaws. As a simple example, this language requires you to
by joshuamorton 7y ago
The consistent reposting and commenting about tree notation is tiring, especially when it has obvious flaws. As a simple example, this language requires you to label each node-type. A list is
list
- one
- two
instead of just
- one
- two
which is an obvious deficiency compared to markdown. This seems like a general problem with something like tree notation, maybe there's a way to fix it, but it isn't obvious. Why's this preferable?
- breck 7y agoYou could make - a top level node type. You could also use pattern matching, instead of prefix notation. Tree Languages can use prefix notation, infix, postfix, pattern matching, omnifix, etc. prefix notation seems to work well for this case.
- hyperpallium 7y agoRE the thread at https://lobste.rs/s/solbtw/this_is_dumbdown_alternative_markdown#c_bdrerg https://lobste.rs/s/solbtw/this_is_dumbdown_alternative_mark... could you just write a parser (in Tree Notation) that that converts a language in Tree Notation into BNF? e.g. to produce BNF of dumbdown Also, to parse BNF and produce a (bare bones) version in Tree Notation. This would make it more accessible while also demostrating its power.
- breck 7y agoThat's a really good idea! If you give it a shot, I'd be happy to add any features or fix any bugs that you come across in the Grammar language. I'd also be happy to do a screenshare to explain any questions you might have about Grammar before you get started (since the UX is still pretty bad--I apologize. Slowly getting there!).
- hyperpallium 7y agoIt was a challenge to you. Though thinking it over, it's grammar transformation, not the parsing that Tree Notation is for.
- eitland 7y agoFWIW and IIRC this is the first time I see this here :-) Oh, and thanks for pointing out the problems you see.
- myhf 7y agoBeing explicit about node-types is useful if you are converting those names directly into tagNames. But then you just end up reinventing HAML/Pug.
- joshuamorton 7y agoSure, it's simpler to implement, but that isn't useful for an end user, especially when markdown already exists.
- n1000 7y agoMarkdown remains the best hybrid for me, because it strikes the perfect balance between a. formal enough to use pandoc and make htmls, doxc, etc with it and b. still fully human readable, which allows me to take all my meeting minutes with it and be able to quickly copy & paste them into an email or store them on our project share and nobody will really wonder.
- osrec 7y agoI like markdown, but also like asciidoc for when you need your documents to be a bit smarter.
- cmroanirgo 7y agoI'm a bit of a fan of textile [0] and first came across the redcloth version[1] years ago, especially for non technical writing. In particular, it's closely aligned to the html that gets generated without all the angles. Eg. You can easily add class and/or id to a paragraph: > Some text p.red Some red text It has easy to do left, centre and right alignments. Markdown was (slightly) influenced by textile too [2]: > While Markdown’s syntax has been influenced by several existing text-to-HTML filters — including Setext, atx, Textile, reStructuredText, Grutatext, and EtText — the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. Too bad it's gone the way of the dodo [3]. [0] https://en.wikipedia.org/wiki/Textile_(markup_language) https://en.wikipedia.org/wiki/Textile_(markup_language) [1] http://redcloth.org/ http://redcloth.org/ [2] https://daringfireball.net/projects/markdown/syntax https://daringfireball.net/projects/markdown/syntax [3] https://github.blog/2016-03-01-upgrading-your-textile-posts-to-markdown/ https://github.blog/2016-03-01-upgrading-your-textile-posts-...
- nine_k 7y agoThere is a great, time-tested, full-featured tree text format. It's called Org. The problem is that the only editor that has a full support for it is Emacs (org mode). If I wanted to make a difference in this area, I would dedicate my time to writing a very good HTML renderer / JS control for it, then a good VIM mode, then maybe a good VScode mode. It's not easy because the spec is large, and every part of it is useful.