r/ProgrammingLanguages • • Aug 21 '24 • Heart of Silver 1

Language announcement Quarkdown: next-generation, Turing complete Markdown for complex documents

Hello everyone! I'm thrilled to show you my progress on Quarkdown, a parser and renderer that introduces functions to Markdown, making it Turing complete. The goal is to allow full control over the document structure, layout and aesthetics - pretty much like LaTeX, just (a lot) more readable.

A Quarkdown project can be exported to HTML as a plain document, a presentation (via reveal.js) or a book (via paged.js). Exporting to LaTeX is planned in the long term.

Functions in Quarkdown are incredibly flexible. Here's what the stdlib offers:

  • Layout builders: .row, .column, .grid, ...
  • View modifiers: .text size:{small} variant:{smallcaps}, ...
  • Utility views: .tableofcontents, .whitespace, ...
  • Math operations: .sum, .divide, .pow, .sin, ...
  • File data: .csv, .read, .include
  • Statements: .if, .foreach, .repeat, .var, .let, .function (yes, even function declarations are functions)

I'm not going to overwhelm you with words - I guess practical results are way more important. Here you can find a demo presentation about Quarkdown built with Quarkdown itself: https://iamgio.eu/quarkdown/demo.
The source code of the presentation is here.

Here's the repository: https://github.com/iamgio/quarkdown

I hope you enjoy this project as much as I enjoyed working on it! It was my thesis of my bachelor's degree in Computer Science and Engineering, and I like it so much that I decided to keep going for a long time, hoping to get a nice community around it (I'm going to make some getting started guides soon).

A lot of work is still needed but I'm proud of the current results. Any feedback is much appreciated. Thank you for the time!

66 Upvotes

35 comments sorted by

View all comments

Show parent comment

1

u/iamgioh Aug 22 '24

First of all, thank you for the constructive criticism.

Regarding the period, I must admit I took this decision quite quickly because I think it’s the easiest symbol to type. I thought/think a backslash or similar (typst uses # which requires two keys) would feel way too unnatural to type in a language that aims to be simple and concise. You’re right and I get your point, but at the end of the day I think it’s personal preference? I personally like it - maybe let’s hear someone else?

As for the named arguments… I don’t really get why the current syntax is confusing. Isn’t something like .row alignment:{center} gap:{2cm} easy to read?

2

u/[deleted] Aug 22 '24

As for the named arguments… I don’t really get why the current syntax is confusing. Isn’t something like .row alignment:{center} gap:{2cm} easy to read?

It's hard to read as one unit. There's nothing linking the arguments to the function call as one visual unit. And when you have lots of arguments, and you're split into multiple lines, or whatever, it gets worse. 

And : isn't a normal assignment operator, so it's not immediately clear what it's doing. 

Maybe three are just issues when first seeing that go away over time, but I think a good first impression is important, as is reducing cognitive load, clarity, etc., all of which I think could be improved.