I’ve been hoping to try (or get someone else to try :-) using Excalidraw as a front end.

Aside: in my earlier experiments, I used CL to parse the XML and then punted to Prolog to infer missing information. Prolog rules could recognize “intersection” and “bigger”/”smaller” rectangles which then produced containment relationships. Something like “this rectangle is smaller than that rectangle, so this rectangle must be a port, and, this rectangle intersects an edge of the bigger rectangle, so it must be a port that belongs to the bigger rectangle”. And “what is the prototype name of the bigger rectangle? Answer: this text box is completely within the bigger rectangle, but outside of all other rectangles, so this text box must contain the prototype name of the bigger rectangle”. And, likewise, with arrows - “this arrowhead nearly touches that box, which has already been determined to be a port, hence, this arrow must feed into the port”. Etc., etc. Draw.io’s file format supplies you with that information, so Prolog isn’t needed there, but, other drawing tools don’t supply you with that info, so you have to infer it from various - simple - relationships (intersects, contained, above, below, to left of, to right of, etc.).

Using only such simple relationships - that any high-schooler has the math chops to calculate - one might devise other interesting syntaxes. The conversion from draw.io to JSON is boooring and repetitive and niggly to code up. Maybe so boring that it might be punted to an LLM, instead of wasting human time?

WIP: draw.io allows only 1 piece of text to be associated with a rectangle. But, the text can contain just about anything, including newlines and Unicode. So, I wrote some 0D Components that have very, very long names, i.e. a magic character (like λ and ė) followed by one name (no whitespace) followed by lines of (Odin) code. Once converted, by das2json, to JSON, the very, very long names become strings. A text parser (written in OhmJS of course) picks off the strings that begin with the magic characters, parses them and creates boiler-plate Odin 0D components from them (along with housekeeping stuff like registering the components by name vs. Odin procs). So, in at least some cases, I type the code for components directly into the draw.io diagram rectangles and use a t2t transpiler to convert them into Odin for inclusion in my project. WIP code is in repo https://github.com/guitarvydas/gen0d.

Appendix - See Also

References

https://guitarvydas.github.io/2004/01/06/References.html

Blog

blog

Blog

obsidian blogs (see blogs that begin with a date 202x-xx-xx-)

Videos

videos - programming simplicity playlist

Books (WIP)

leanpub

Pamphlets

gumroad

Discord

Programming Simplicity all welcome, I invite more discussion of these topics, esp. regarding Drawware and 0D

Twitter

@paul_tarvydas