A CSS-Inspired Syntax for Flowcharts
tone-row.com
tone-row.com
As a result, for either high-speed or larger scale usage, my experience is that text (in combination with constraint-respecting automatic layout options that suit one’s personal aesthetic) really starts to shine.
The intention, though, was the make the variable assignment general-purpose enough for whatever node data needed to be stored. So, in my case, I'll be storing things like "x" and "y" positions, so that the nodes can be restored to their absolute position on the graph.
As for the video, please feel free to ask any questions; I'm sorry about it being kind of slow and incomplete. This was recorded to showcase how the tokenization is dynamic: https://streamja.com/JKPkJ
- if indentation is significant, then save yourself headaches and require either tabs or spaces. Don't allow both. - not sure why i'd want to use this instead of plantuml which can do this, plus so much more.
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.
Of course, one can write off that quote simply as Dijkstra's typical arrogance and over-exaggeration (and hey, who even uses BASIC or COBOL any more?) but every time I see attempts to carry the CSS experience over to other areas, or just the "CSS is amazing, why do you all not see it?" attitude, I get an uneasy feeling that he might've actually been on to something.I needed to read the source html to see what it was about. Pentagrams in the source, btw.
All of the hacks and warts around the specifics of rendering for the browser? Pretty bad.
DOT seems like a really robust, expressive language. Maybe at some point I'll to write something that transforms from this syntax to DOT.
The result is that it’s very challenging to type syntactically correct dot at “line-speed”, e.g., if one is taking notes.
(This is one of several reasons that I think there is definitely still room for improvement in notation for graph-drawing, as I have begun exploring in my own work.)
It's a disappointment or even failure of our current language scanning and parsing tools or, really, the way we used them, that this is not an easy exercise.
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
It leaves me wondering: if somebody carefully looked at all the languages and all the use cases, is it possible to build a single language that does it all while still being easy for smaller charts? Or are the goals of easy and complete in too much tension, such that we're better off with a bunch of languages, each one tuned for making things easy in a particular zone of the problem space?
What I think may emerge though is a better shared understanding of “what’s needed” as well as a great (ideally libre) library for implementing those ingredients consistently and interoperably — e.g., a DOM/CSSOM for these graphs as well as maybe an adaptagrams- or cairo-like library for the common layout and drawing capabilities.
(For example, have you noticed how many general-purpose drawing tools now have “align and distribute” capabilities that all work similarly? AIUI, many of those tools are either directly using or are inspired by Kim Marriot, PJ Stuckey, Tim Dwyer, & colleagues’ work in this area?)
---
#token Some Node That is Referenced Often
other node A
(#token)
other node B (#token)
other node C other node D
(#token)So if your markup was:
```
#parentA Start 'Welcome Node'
#childA /1 "this node has a
line break, so its content is in quotes"```
That could be "tokened" as
[
{
tokenType: "ID"
value: "parentA"
decorators: [{ "character": "#", indexes: [0]}]
},
{
tokenType: "CONTENT"
value: "Start"
decorators: null
},
{
tokenType: "TITLE"
value: "Welcome Node"
decorators: [{character: "'", indexes: [0, 13]}]
},
...
]
So it could be that you can read multiple different syntaxes into the same tokenizations.
Like
```
#parentKey parent
#childKey child
#childKey -> #parentKey /north
```
could be equivalent to
```
#parentKey parent
#childKey child /north
```This is a cool idea! Although my project is now in a back burner, in the future if I want to pick up where I left off I might just use your library.
The biggest differentiator is indenting to create edges, which I think is useful for some graphs and in some contexts (especially for quick brainstorming). Mermaid is great and super expressive.