News for hackers. Stuff that matters.
Re:Dumbdown – A Tree Language that compiles to HTML by joshuamorton on Monday September 02, 2019 @01:18AM (#20856923)
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?
Re:Dumbdown – A Tree Language that compiles to HTML by n1000 on Monday September 02, 2019 @02:14AM (#20857112)
Markdown 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.
Re:Dumbdown – A Tree Language that compiles to HTML by osrec on Monday September 02, 2019 @03:39AM (#20857412)
I like markdown, but also like asciidoc for when you need your documents to be a bit smarter.
Re:Dumbdown – A Tree Language that compiles to HTML by cmroanirgo on Monday September 02, 2019 @03:27PM (#20861277)
I'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)

[1] http://redcloth.org/

[2] https://daringfireball.net/projects/markdown/syntax

[3] https://github.blog/2016-03-01-upgrading-your-textile-posts-...

Re:Dumbdown – A Tree Language that compiles to HTML by pattisapu on Monday September 02, 2019 @07:52PM (#20862592)
Indeed, Textile is slightly more intuitive and powerful than Markdown, but these days it's unaccountably Betamaxing.
Re:Dumbdown – A Tree Language that compiles to HTML by pattisapu on Tuesday September 10, 2019 @11:33AM (#20929321)
And simple, helpful things like automatic list numbering are in Textile but not in canonical Markdown.
Re:Dumbdown – A Tree Language that compiles to HTML by myhf on Monday September 02, 2019 @02:11AM (#20857100)
Being explicit about node-types is useful if you are converting those names directly into tagNames. But then you just end up reinventing HAML/Pug.
Re:Dumbdown – A Tree Language that compiles to HTML by joshuamorton on Monday September 02, 2019 @02:51AM (#20857225)
Sure, it's simpler to implement, but that isn't useful for an end user, especially when markdown already exists.
Re:Dumbdown – A Tree Language that compiles to HTML by breck on Monday September 02, 2019 @01:29AM (#20856958)
You 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.
Re:Dumbdown – A Tree Language that compiles to HTML by hyperpallium on Monday September 02, 2019 @02:58AM (#20857250)
RE the thread at 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.

Re:Dumbdown – A Tree Language that compiles to HTML by breck on Monday September 02, 2019 @11:09AM (#20859523)
That'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!).

Re:Dumbdown – A Tree Language that compiles to HTML by hyperpallium on Tuesday September 03, 2019 @11:04AM (#20867159)
It was a challenge to you. Though thinking it over, it's grammar transformation, not the parsing that Tree Notation is for.
Re:Dumbdown – A Tree Language that compiles to HTML by nine_k on Monday September 02, 2019 @04:35PM (#20861599)
There 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.

Re:Dumbdown – A Tree Language that compiles to HTML by eitland on Monday September 02, 2019 @01:43AM (#20857008)
FWIW and IIRC this is the first time I see this here :-)

Oh, and thanks for pointing out the problems you see.