On "may be like an IETF proposal."", that's precisely where I've been using them the most :)
https://fedidcg.github.io/FedCM
Not for everybody, I agree, but it is kinda of ironic that you mentioned "may be like an IETF proposal." :)
Also, technical blog posts, e.g.
https://code.sgo.to/2022/04/11/metamath.html https://code.sgo.to/2022/04/28/siop.html
Now the question is how do you get a block based editor on a webpage?
Depending on how you define "modern", vim (and I assume neo-vim) support block-mode.
You can't do that with Google Docs, Lucid Chart, Word, OpenOffice, Scrivener, etc.
[0]: https://github.com/DaveJarvis/keenwrite
[1]: https://kroki.io/
[2]: https://github.com/DaveJarvis/keenwrite/blob/master/docs/scr...
"Why is it better to write diagrams by hand rather than use a tool (e.g. inkscape, google docs) and export as SVG?
Because it requires everybody that wants to edit the diagram to (a) use the same tool and (b) have access to the original source file (e.g. the google doc)."
But yeah, ASCII for diagrams seems like the worst of all worlds: manual layouts, slow to create, impossible to maintain.
[1] https://github.com/mermaid-js/mermaid [2] https://code.sgo.to/typograms/#related
The arrows that point down (down and left, down, and down and right) are rendering the arrow heads as ascii V's.
That seems different than elsewhere on the page.
\ | /
\ vvv / \ | /
v+-----+v vvv
->| |<- ->*<-
^+-----+^ ^^^
/ ^^^ \ / | \
/ | \In answer to my above inquiry:
It looks to me like this section causes consecutive 'v's to be interpreted as text; it might be nice to carve out v's or give alternative glyphs for down arrows or something:
if (char.match(/[A-Za-z0-9]/)) {
const [, right, , left] = neighbors;
str = str || (left.match(/[A-Za-z0-9]/) || right.match(/[A-Za-z0-9]/));
}
Also, if you have two arrows coming together diagonally, like: \ /
v
The arrowhead points to the left rather than straight down. I think straight down would be preferred and not particularly difficult to code.I would be happy to take further conversation/contributions to whatever forum you prefer - what is the best approach?
You are welcome to send PRs if you have the inclination!
I tried using this for the control flow diagrams in V8's regexp implementation, which are documented with ASCII art in jsregexp.cc Results are here: https://twitter.com/erikcorry/status/1548954799290421249
This link explains it better than the page HN links to: https://code.sgo.to/2022/06/20/typographic-diagrams.html
It would be an improvement for the page that HN links to if the HTML snippet was surrounded by <body></body> so it worked out of the box.
Tips:
Don't use underscores for horisontal lines - use dashes (minus signs).
A vertical arrow that points at a text will collide with the text unless you add a blank line.
Rounded corners are nice. You get these by using . (period) or ' (single quote) instead of + (plus) to join lines. Use period to join to a vertical line below the horizontal line, and single quote to join to a vertical line above the horizontal line.
Or an editor plugin with something like the automatic table formatting you get with emacs org-mode.
For example, email clients (e.g. Thunderbird) have not even bothered to let us use markdown for email. flowed-format text is about the most you can get out of them for now.