Introduction
The Goal
In my computing life, my happy place is the terminal. I enjoy typing - pressing each of those little buttons on the keyboard in front of me, the steady ‘duh-duh-duh-duh’ as I type, the appearance of glyphs on the screen in response. I might use a keyboard and read from a monitor, but it can feel my mind is connected to the machine.
Typing is about words, and words are about language. They convey feelings and ideas, but though I love words, sometimes they are the wrong tool. If I need to convey or absorb information both accurately and quickly, I turn to a different tool - diagrams.
But I don’t want to leave my happy place of pressing those oh-so-satisfying buttons in front of me and seeing things appear in response. Maybe I can keep that and still create diagrams? Maybe rather than drawing diagrams, I can type them?
The Motivation
Direct manipulation
Let’s start with the negatives. Most diagrams are created using the direct manipulation paradigm - a mouse cursor is used to select a rectangle tool, then drag and resize a rectangle at the appropriate place within some canvas. Graphical objects are ‘directly manipulated’ as they appear, as though the diagramming tool provides virtual shapes and lines which can be conjured out of the air, then squashed, pushed, tweaked, duplicated and destroyed until the diagram satisfies its creator. There will be hundreds of tiny actions - mostly unconscious - which contribute to the final diagram, as the diagrammer gets the final output ‘just right’. The history of how the diagram is created is incidental, and only becomes conscious when mistakes are recognised and the magical ‘undo’ spell is invoked.
Is there an alternative to this WYSIWYG tweak-it-until-you-make-it approach? And is there anything wrong with it anyway?
To answer the second point first, no - there’s nothing wrong with it. But it does have strengths and weaknesses, and considering the alternatives will help us see how sometimes other approaches may be better.
“You probably don’t need a static site generator”
- pandoc + Makefile; raw HTML; …
SVG
- just write raw SVG.
HTMX
C++ & Cppfront
- same semantics as C++, new syntax.