I created a monster

Update 2024-04-15: I decided to turn DMOS into something more serious, using syntect by default rather than inkjet. Consider this post a history of its creation…

I guess it’s not a surprise, but I just don’t enjoy writing very much. I do, however, recognize its importance, so I always want to try. And sometimes, there is just this weird set of circumstances that kicks everything back into motion.

Djot

One feeling that comes up again and again when I write something is contempt for the tooling. I really like Markdown, but I hate the fragmentation of the eco-system. Therefore, I obviously really like CommonMark, but I also hate it for its lack of features. Footnotes and tables for example are essential tools for presenting certain information. Sure, I could just go with some Markdown flavor and get over it, but where is the fun in that?

And so, after once more looking around for alternatives, I decided I will be joining team Djot, at least preliminarily. Djot does a lot of things right:

  • even though it basically is Markdown, they don’t call it that - so any tooling can make a clear decision: support Djot or not
  • the syntax is more strict (like CommonMark), but all the features are there
  • the inevitable desire for some unforeseen customizations is to some extend mitigated by the generic attributes mechanism

And that’s it, that’s pretty much all I ever wanted. Unfortunately, they made one fatal mistake: sub-lists require a blank line, and it’s making me furious. Like, capital FURIOUS.

But, after comparing options yet again, I decided that - yes, indeed - this would be a silly hill to die on. So here we are. This blog is now officially written in Djot. I had to rewrite the link titles, but other than that it was pretty painless.

From C to D

The wave of enthusiasm kicked off by the decision to use Djot gave birth to something else. This blog was previously rendered by my own CMOS, and of course I wondered if I could come up with a suitable replacement. And boy, did I come up with something… I created a monster.

The successor to CMOS is - obviously - DMOS. It is less then 200 lines of Rust. It is also a supply-chain attack waiting to happen as only modern languages can deliver. Did I mention the resulting executable is almost 70 MB? But it’s soooo convenient! And also look, behind you, a three-headed monkey!

Jokes aside, the 70 MB gorilla in the room is the inkjet crate, which is sort of a fascinating beast. It includes almost all available tree-sitter parsers. I am not yet sure how I feel about this. Rendering a single document has a noticeable delay when the first syntax highlighter kicks in, but subsequent highlighting seems to be pretty fast, so this might be a viable option for let’s say a static site generator.

Fun fact: even though I now have fancy syntax highlighting for a gazillion languages at my disposal, you cannot actually see it in action, because I first need to write the CSS to actually style the result. Soon, I’m sure…

What else?

Of course a lot of other stuff has happened while I was not writing. I am hoping my new setup will encourage me to tell you more about some of that very soon! 😅

Until then, you are invited as always to send any questions or comments my public inbox