4 ms·
Graphviz is such an amazing DSL. I thought myself it in college and do all of my architecture drawings in it. (I even outlined a chat bots conversation flow wit
by RubenSandwich 9y ago
Graphviz is such an amazing DSL. I thought myself it in college and do all of my architecture drawings in it. (I even outlined a chat bots conversation flow with it.) I'm surprised by how many developers don't know about it/use it. It might be because of it's late 90's website, http://www.graphviz.org/ http://www.graphviz.org/, which is a shame.
- kasbah 9y agoI love Graphviz and use it a lot but can't help but think every time: there must be a better way to describe directed graphs. Does anyone know of any alternative DSLs that try to solve the same problem in a radically different way?
- perryprog 9y agoSome that I've seen are js-sequence[1], flowchart.js[2], and Mermaid[3]. They aren't all directed graphs, but they are pretty neat and relevant. [1]: https://bramp.github.io/js-sequence-diagrams/ https://bramp.github.io/js-sequence-diagrams/ [2]: http://flowchart.js.org http://flowchart.js.org [3]: https://mermaidjs.github.io/ https://mermaidjs.github.io/
- enriquto 9y agoWhat probblems do you see, for example, in the graphviz language ? It seems to me that the syntax is rather simple and minimal.
- Someone 9y agoI’m not the OP, but of the top of my head, I would like to have: - scoping for node and edge styles (among other things, this would help towards copy-pasting graphs into subgraphs) - named styles (e.g. define *”shape=foo”* as red rectangles with italic text) - more consistency in graph attributes across layout engines - more intuitive effect of graph attributes on layout - easier way to style node content (the ‘old’ way was ugly, but the restricted subset of html isn’t that nice, either) - ability to switch layout engines in subgraphs (among other things, this would help towards copy-pasting graphs into subgraphs) Also (from the article) ”If your rankdir is vertical, then you need to use {} to change the record type’s direction.”, IMO, is not what most users would expect, and is a pain in the ass when experimenting to find an optimal layout engine/graph attributes pair.
- kasbah 9y agoI agree with most of the issues the sibling commenter mentions though I haven't encountered all of them. It's a declarative language that has adopted a C/ALGOL style syntax. I find the way properties and declarations mutate and propagate quite unintuitive and I hate the boilerplate. I haven't thought about it enough but I am a big fan of Elm's declarative graphics [1]. I think starting with something like that would be interesting. n1 = circle "node 1" n2 = square "node 2" |> outlined red main = graph [edge n1 n2, edge n2 n1] [1]: https://csmith111.gitbooks.io/functional-reactive-programming-with-elm/content/section3/Graphics.html https://csmith111.gitbooks.io/functional-reactive-programmin...
- majkinetor 9y agoThere is also plantuml, IMO the best tool and language from all mentioned. If you are on Windows, cinst plantuml. It provides bunch of types of diagrams, including GUI mockups (salt), gantt charts, all UML types, time diagrams etc. It can also export to ASCII art, totally awesome. Plugins are there for everything, such as Gitlab, VSCode, Redmine etc. and you can easily integrate it otherwise. Highly recommended.
- arca_vorago 9y agoRadically different, no, but I use blockdiag and its variations now (netdiag, seqdiag, etc) for automation of text based diagram generation. I still occasionally use graphviz and plantuml, but they aren't that different. I've played with but not really used the only two that you might consider radically different, yEd and Gephi. Originally what spurred me towards text based diagram generation was a visceral hatred for out of date visio network maps, so I wrote a script to automatically update network maps and diffarchive old ones so I could walk back in time on the network. It was something that could be put in a report and look nice (due to manual layout control) vs the automap generation of things like LibreNMS/Zabbix/Nagios.
- SpinyNorman 9y agoI don't now about radically different.. after all a graph is just a bunch of nodes, edges and associated attributes. There are standard alternatives to the DOT/GV graph description language though, such as GraphML (XML based) and GML (others too, but these seem to be most supported). For graph layout, tools worth looking at include OGDF (an open source C++ library), the commercial yFiles Java library with free yEd editor/layout tool (includes support for GraphML attributes), and Gephi (an open source Java-based graph layout/visualization tool). If your graph represents some type of directed dataflow, then maybe Google's Tensorboard graph visualizer (intended primarily for neural nets) is of interest - it's open source and very slick (esp. wrt subgraph collapsing/expanding), but you'd be on your own in terms of importing a foreign graph format.
- hit8run 9y agoAhhh that table based layout: haven't seen a beauty like this for way too long :D Anyways content matters.