Making The Case Against Markdown

For some reason, Markdown has not just become the format of choice for giving READMEs in GitHub repositories some flair, but also for writing entire websites and documents. In a recent rant, [Burak Güngör] covers all the ways in which Markdown is a good idea as a basic document formatting concept and how its implementation is absolutely atrocious.

Even without straying into the minefields helpfully provided by other Markdown dialects beyond CommonMark, there is already plenty here to indulge in. The very idea of Markdown as a ‘simple text formatting syntax’ breaks down the moment you look at the available formatting styles and how they translate into HTML. Worse, the sheer complexity of parsing Markdown makes it vulnerable to a regular expression denial-of-service (ReDoS) attack.

This is where the question arises of whether Markdown is truly a text formatting aid or trying to be a programming language that just happens to usually spit out HTML documents, as, at some point, you’re basically writing something that approaches a regular expressions engine in its nightmarish implications.

Continue reading “Making The Case Against Markdown”

Preview Markdown In The Terminal With Bash

Markdown has become an extremely popular way to document source code and other projects, thanks in no small part to how well web-based services like GitHub render it. Just sprinkle a few extra characters into a regular text file, and all of a sudden it looks like you know what you’re doing. Unfortunately, there are some places where markdown won’t actually render, and you’ll be stuck looking at those extra characters.

But thanks to MarCLIdown, the terminal doesn’t have to be one of those places. Written by [NihaAlGhul], this simple tool takes a given markdown file and spits out a fairly impressive rendering — and you don’t even need to have one of those fancy new GPU-accelerated terminals. Most impressively, the whole thing is implemented as a single Bash script.

Continue reading “Preview Markdown In The Terminal With Bash”

Hack Your Recipes

If there is one thing Hackaday readers have in common, they like to make things. Of course, we don’t all make the same things and that’s great. But, unsurprisingly, a lot of people who like to create things include the kitchen as their workspaces. Why not? We all have to eat and there’s something very nice about cooking a meal for your loved ones or even just yourself. Cooklang is a markdown-style language from [Brian Sunte] specifically for capturing recipes. It not only formats the recipe, but it provides an easy way for software to parse the key elements while still being human-readable. This allows you to manipulate recipes just like software, including using Git for version control, for example.

There was a time that cooking meant having big cookbooks, but now you are more likely to search the Internet. There’s only one problem. For some reason, nearly every recipe site follows the same format. Thousands of words about how much the cook’s family loves the dish, how they pick out only the most succulent tomatoes to ensure the dish will have a vibrant scarlet hue, and how much their poor granny would have loved the dish, if only she had survived the 1928 flood which is described in great detail. After 20 minutes you find out that you put the tomatoes in the blender, add a cup of water, and that’s it. Cooklang is a sort of antidote for that. You can easily write something that parses the recipe and generates, say, a shopping list or compares it to your household inventory and places an order for the remaining things from the local grocery delivery.

Continue reading “Hack Your Recipes”