7 ms·
Dumbdown – A Tree Language that compiles to HTML
- ToJans 7y agoJust a short remark: this reminds me of Cobol.
- joshuamorton 7y agoThe 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.
- Kwpolska 7y agoThis is not an alternative to Markdown in any shape or form. Markdown resembles plain text and can be easily parsed by anyone without syntax highlighting, a Markdown → visual format compiler, or prior knowledge of the format; moreover, Markdown is meant to be quick to type without wondering about the intricacies of the output format. This thing is anything but. You need to know the keywords and type them out all the time, you can’t use it in an e-mail because your readers won’t understand you, and if you like trees so much, just write regular HTML — or a “simplified” HTML format like Pug — and call it a day.
- cttet 7y agoElm markup has a similar approach and I quite like this
- geraldbauer 7y agoFor a more pragmatic alternative to Markdown see Text with Instructions (.texti) that gets you the best of Markdown, Wikipedia Markup, LaTeX & Friends. See https://texti.github.io https://texti.github.io
- masklinn 7y agoI don't see anything pragmatic about it. It seems like a complete mess, less convenient than markdown (putting a space before a title makes it into a comment? uwot?), and no more extensible.
- geraldbauer 7y agoYou're misreading what texti is all about. A comment is unix-style # and a heading (title) is using the wikipedia markup convention. You can put as many spaces before as you like it makes no difference to a comment or to a heading (title). See some samples @ https://github.com/texti/texti.github.io/tree/master/samples https://github.com/texti/texti.github.io/tree/master/samples to compare markdown, texti and wikipedia markup using a real-world article (from wikipedia itself on markup languages). About extensible - it's no different from markdown with two additions - 1) evolution / changes are more than welcome and 2) texti (like wikipedia markup) has (recursive) template extensions / includes built-in.
- breck 7y agoInteresting. Thanks for sharing the link! Always helpful to read about related projects.
- wetpaws 7y agoNow let's add attributes, some stylesheets and perhaps some small script language for basic interactivity and we are done
- jspash 7y agoI'd love to volunteer for the scripting language but I only have about 10 days. And I'm not very bright. But that's ok since it's unlikely to get much adoption. How does Scripty McScriptface sound for the name?
- ourmandave 7y agoWill there also be components? And can I get a compiler, in say, 25 years?
- jobigoud 7y agoFor the name it would be better to use an existing programming language and add "script" at the end, it won't be confusing. Maybe JavaScriptScript?
- friend-monoid 7y agoBut... why?
- mr__y 7y agoFor the glory of Syntax :)
- cybervegan 7y agoI've been working on something similar, with the intention of making something that separates semantic tags from formatting tags, such that the resulting document could be directly narrated or dictated, without resorting to too many (if any) "special" words for punctuation. Renderers could easily translate/format the output for better style or into a form more appropriate for their purposes; "editors" could do the same. Currently, screen-readers do not cope well with modern web pages, and can you imagine trying to dictate HTML to a speech-to-text based editor? Using our approach means you can literally speak the content to the stt, and have it appear on-screen in a displayable format. I'm thinking this would be useful for verbal/conversation applications where you can effectively dispense with a visual display. I haven't put my ideas into any kind of proper documentation, but they are very close to yours.
- mr__y 7y agoThis sounds interesting to me! I actually thought about something relatively similar with the intention of creating js-based renderer to make it web browser compatible. I was also contemplating the idea to put semantic data into a separate structure, similarly to schema.org data in json-ld format. While this is probably worse from the editor point of view, the advantage would be more clear and more human readable content since the semantic tags would be omitted. This could also save some bandwidth if client software could fetch only the part that it needs (for instance if a given reader does not support semantic tags parsing it could download only the main content, while search engines could download only the semantic part). The problem is that thinking about that for a while is all that I've achieved so far :)
- cybervegan 7y agoI know what you mean.
- breck 7y ago> schema.org data in json-ld format It would be cool if you explored Tree Notation in your thoughts. We have an idea roughly called "World Wide Tree" (or at least one person calls it "World Wide Forest"). We think Tree Notation might be the trick to getting the semantic web vision realized. One simple universal syntax for HTML, CSS, Javascript, JSON, Data schemas, data itself, etc. The semantics you still need to define and build machines for, but if we had a simpler syntax (without sacrificing a single capability!) that might move the ball pretty far.
- gagan2020 7y agoIt's more like what is YAML to XML. HTML is also tree structure. Markdown is just plain readable file that can be beautify with HTML and CSS.
- rraghur 7y agomarkdown has a bunch of flaws - most egregious is that it lacks a spec. GFM brings in a few nice QOL improvements and CommonMark tried to standardize - but it's very very soon that you run into it's warts - For ex - try to have a list which has a code block in it (or other complex content) For me, Asciidoc (and Asciidoctor) have become the default - formal spec, test cases and extension mechanism so that you don't have N + 1 flavors of it. It also has a markdown migration mode that eases moving from md. IMO, it is better in almost every way than markdown - the only reason it isn't as popular is that Markdown was made popular (and drove adoption) by the Github & others.
- edraferi 7y agoI evaluated several light markup languages a while back for use in technical contracts. Basically I was fed up dealing with MSFT Word’s formatting problems while iterating on complex content with internal and external lawyers. Asciidoc definitely seemed like the best option. The biggest thing for me was the ability to do complex numbered headers. Unfortunately the tooling wasn’t really good enough for my use case. I needed a clean way to move between Asciidoc and Word, and it wasn’t really possible. Pandoc claimed support for both Asciidoc and word, but it was only partial and couldn’t round-Trip the document. I considered developing & contributing the functionality, but I didn’t know the language the tool was written in and couldn’t justify investing more time in the experiment. Maybe it’s time to review the tooling situation and take another crack at it...
- rraghur 7y agoI've found decent results with .adoc --(asciidoctor)--> docbook --(pandoc)--> docx It won't roundtrip (and I doubt anything will ever) but I usually go only one way - converting to docx in the last stage.
- geraldbauer 7y agoSo how is: .Ordered . number . number .. letter .. letter better and more readable than 1. number 2. number a. letter b. letter For sure Markdown has some cruft but isn't it better to improve Markdown itself than to try to "establish" a completly new format with some weird conventions such as: Level 3 Heading ^^^^^^^ Level 4 Heading +++++++++++++++ Why? ^^ or ++ is this in any way intuitive or an established convention that is so much better? PS: See Text with Instructions (.texti) for a (better) Markdown evolved variant / flavor :-) - https://texti.github.io https://texti.github.io
- enriquto 7y agoUnpopular opinion: markdown is mostly useless, and plain text is better nearly in all cases. As a corollary, markdown so complex that is unreadable before being "rendered" is worse than useless.
- chriszhq 7y agoMaybe we don't need so many "light" markup languages. Writing html directly is as easy as writing any markup language if you have a good html editor. I have been taking notes with html-notepad (https://html-notepad.com/ https://html-notepad.com/) for a long time and the writing experience is much more enjoyable than writing md, rst or emacs org mode (I only tried these three). Taking notes with html doesn't mean you have to write verbose html tags or the html tags would clutter the edit area. The html-notepad is a WYSIWYG editor which means what you see is a rendered html page when you are editing. There are keyboard shortcuts for oft-used elements like header1~6, lists, code and so on, and you could edit the html source if you like. Although the html-notepad has some flaws and lacks some really useful function (like search and replace), it's definitly a very convenient tool for me.
- pgcj_poster 7y agoI think the main reason people like using lightweight markup languages is because they don't have to depend on any special tools. I can comfortably edit markdown in any text editor, whether I'm using VS Code on my laptop, Notepad on a public library PC, Vim on a remote server, a form in my source host's web interface, or whatever it is that people use to edit text on phones. And I don't need to worry about the status of someone's proprietary hobby project.
- boomlinde 7y agoI think the only redeeming feature of markdown is that its formatting markup mimics plain text formatting coventions. In that sense it’s hard to agree that this is an alternative to markdown. It lacks the one quality markdown has that otherwise more complete document formats lack, really its only distinguishing feature.
- fao_ 7y agoI wrote something vaguely similar (Except instead of being inspired by Markdown I was inspired by Lisp) a few months back and then wrote my website in it: https://gitlab.com/finnoleary/wisp-new https://gitlab.com/finnoleary/wisp-new