r/ProgrammingLanguages
•
u/iamgioh
•
Aug 21 '24
•
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!
19
u/[deleted] Aug 22 '24
Great work. A suggestion is perhaps a larger font on mobile, some of it seem to render in half the normal size. But perhaps that's just the unproportionally large margins in the demo.
17
u/Silly-Freak Aug 22 '24
I can't not mention Typst in such a discussion: https://github.com/typst/typst
I'd say it has a similar goal, with a few differences though:
Also possibly (I haven't used it) in the same space is Quarto, taking a look is worth it: https://quarto.org/ It uses Pandoc Markdown and exports to multiple formats, e.g. to PDF via either LaTeX or Typst.
5
u/breck Aug 22 '24
Interesting stuff!
I don't have anything particularly insightful to add but if it helps I recorded a user test: https://www.loom.com/share/fb3b6326c6be4a7fb404718b30d4decb?sid=fcae1628-357e-4cdb-9ccc-63c35dac1bf7
2
u/[deleted] Aug 22 '24
Seems like an interesting project but the syntax looks - if you'll forgive me - rather cursed. Don't know how married to it you are.
Periods as function/syntax escapes I really don't like. Firstly, periods are extremely common in written language, ending almost all sentences. This makes them hard to find visually, as the syntactically-meaningful
.get lost in all of the other.. On top of that, they're very small (basically the smallest glyph). I think there's a reason LaTeX used\- it's almost never used in normal language (and so stands out immediately), it's tall, and it already means "escape this" to most (all?) programmers, so it's an immediate cue that "hey we're leaving the regular text now". Especially for a language embedded in natural language, I think.is a very poor choice.Re: function calling, from another comment:
This is different from pretty much every programming language I'm familiar with and imo quite hard to read.
abc:{arg2}looks like the beginning of a whole new thing, rather than an argument to the function. Again, looking at LaTeX, you have\command{var1}{var2}, which is all obviously its own thing - the{}{}are all next to the function name and contain the arguments. Or Python,my_function(arg1, abc=arg2), the()delimit the arguments and create a contained unit that's easy to visually parse.And using
:to essentially assign a value to a variable is non-standard. I would expect=to do that, like in most languages.Maybe something like
.func{arg1}{abc = arg2}would be clearer, or even.func{arg1, abc=arg2}.Anyway, just some hopefully-constructive criticism from someone who uses a fair amount of MarkDown and LaTeX, and would potentially find something like this useful.
1
u/iamgioh Aug 22 '24
I truly want to thank you all. I made this post yesterday at 2AM (local time) just to gather some feedback on my thesis project and show y’all what I was up to, but never could I have imagined this kind of support. You guys rock!
1
u/factotvm Aug 22 '24
I just ask that you fix bold and italic markup.
1
u/Holothuroid Aug 22 '24
OK, including lines from code files can be useful for documentation, preventing the two falling apart.
Not sure about control structures.
1
u/Cilph Aug 22 '24
Are we just reinventing LaTeX now in a way?
1
u/dacydergoth Aug 25 '24
What security issues do you a anticipate from having a turing complete language and how have you mitigated them?
1
u/TotesMessenger Aug 22 '24
I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:
If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)
1
u/[deleted] Aug 23 '24
Next gen of js.
0
u/[deleted] Aug 22 '24
[deleted] — view deleted comment