3 ms·
The `gvpr` tool in graphviz deserves more recognition. Graphviz, at its core, is a simple graph description language (DOT), which allows progressive enhancemen
by AceJohnny2 5y ago
The `gvpr` tool in graphviz deserves more recognition.
Graphviz, at its core, is a simple graph description language (DOT), which allows progressive enhancement, and a bunch of auto-layout tools where some double as renderers.
The double-duty of the layout/renderers masks GraphViz's true power, which is that you can create a pipeline modifying your graph source (confusingly referred to as '.dot' files), progressively adding attributes.
This is where gvpr comes in. While most are familiar with GV's all-in-one layout+rendering tools like `dot` or `neato`, gvpr is a generic Awk-like programming tool that iterates over nodes and edges. With it, you can implement any layout algorithm you like (or not!), to specify part or all of the attributes of your graph (like positioning and style), to then be rendered using `dot` to the format of your choice.
- AceJohnny2 5y agoI'm actually disappointed that `gvpr` isn't mentioned at all on GraphViz's main page, because I think it's its most powerful tool. All I could find are manpages, and not even on GraphViz's own website! https://manpages.debian.org/testing/graphviz/gvpr.1.en.html https://manpages.debian.org/testing/graphviz/gvpr.1.en.html
- steveroush 5y agoI second the GVPR praise. Pretty powerful.
- sterlinm 5y agoAre there any good examples of how you'd actually use this in practice?
- j0057 5y agoI don't know of any example, but I immediately thought of a use case: to use it as a sort of CSS language where you take a graph with only 'semantic' custom attributes and use the GVPR language to transform these into shape and style attributes that are recognized by Graphviz, so that you don't have to repeat all the style information for each node and edge. That's already pretty exciting to me!
- pvaldes 5y agoNever had heard about it and use graphviz since... dunno, more than 15 years probably.
- graphviz 5y agoWhen we started Graphviz, we vaguely sensed the potential for graph databases or environments, like neo4j, but we didn't work much in that area. It would take more resources, or intensity, than what we had. Anyway, gvpr is a modest attempt at a sort of graph query language. Neo4J is interesting. It does something important, mainly, rationalize the mess of graph representations and algorithms. It's not hard to understand why that is valuable, but Neo4J sell it as being "efficient for linked structures" (relational databases don't have foreign keys and indices) and "intuitive" (have you ever tried to read the code for graph matching in Cymbal? I rest my case.) They have investments of hundreds of millions? Worth billions? They contributed something valuable to the tech economy. It's surprising the conventional relational database products don't pay much attention to this opportunity, but they have gone vertical, e.g. credit card processing, because in the end it's more profitable to solve big end customer problems.