4 ms·
Exactly. There are lots of situations where it's worth trading up some polish for simpler tools and formats. Especially simpler formats. There is lots of pri
by cben 11y ago
Exactly. There are lots of situations where it's worth trading up some polish for simpler tools and formats. Especially simpler formats.
There is lots of prior art extracting diagrams from textual drawing but AFAIK all required global conformance to some accepted "syntax". Markdeep's(?) idea of local beautification while maintaining the global fixed-width layout is brilliant as you're not limited to particular structures and anything unsupported degrades gracefully!
(If this idea has no name, let's call it "2D ligatures"?)
We could have a dozen different tools based on this idea, each supporting a somewhat different dialect, yet any diagram will be reasonably readable under any of them — which is exactly the quality you want when excavating a 40-year-old README of unknown origin.
It's the simplest thing that could possibly work. Except one: using line drawing characters directly in the source (and requiring no tool at all, just view in fixed-width font). Let's try:
* . *
* 0 3 P ● Eye ╱ ▶ ╱ *
* ●───────● +y ╲ 〈) ╲ ╱ Reflection *
* 1 ╱│ 2 ╱│ ▲ ╲ ╲ ╲ ▶ *
* ●───────● │ │ v0 ╲ v3 ────────●──────── *
* │ │4 │ │7 │ ●────╲─────● *
* │ ●─────│─● +─────▶ +x ╱ ◀ X ╲ ◜⎺◝◀──────── ○ *
* │╱ │╱ ╱ ╱ ○ ╲ ( ╱ ) Refraction ╱ ╲ *
* ●───────● ▶ ╱ ╲ ◟⎽◞ ╱ ╲ *
* 5 6 +z v1 ●──────────────────● v2 │ ○─────○ *
* ▼ *
Hmm, not as good but mostly OK (though font dependent), except for circles. Disappointingly I found no matching parts for bigger than 2x2 circle. It's easy (technically, not sure about politically) to add a few more but it's impossible to support smooth circles of arbitrary radiuses. (OTOH, neither does Markdeep.)
Perhaps the best of both worlds would be writing unicode (perhaps using some ascii->unicode helper at typing time) and further enhancing it with this kind of tool...