Hacker News new | ask | show | jobs
by anoncept 1393 days ago
One potential solution direction, which you can try out via my own incomplete drawing toy [1] is to treat punctuation characters like SP (“ “), COMMA (“,”), and SEMICOLON (“;”) as markers for the product operations of a family of monoids that allow you to specify more and more complicated sequences without requiring the typist to “move the cursor left” to add a matching character.

This way, simple lists can be specified via juxtaposition:

a b c

And then more complex lists

thing 1, thing 2, thing 3

and still more complex lists like

A complex thing; with data, and more data

can be specified in a way that is potentially still human-legible and easily editable.

Combined with ~instant feedback while typing and, ideally, a “brushing” system to allow selection of parts of the textual model via the linked drawing, I am hopeful that this can be solved resiliently, at least for the most common use cases.

(Part of why I am excited about OP’s work here though is that while I have done a fair bit in my own project on drawing a related kind of diagrams, I have myself only begun thinking about how to make the resulting drawings nicely stylable/themeable.)

[1] https://mstone.info/depict/ -> https://github.com/mstone/depict