[plt-scheme] A little language for Graphviz?
At work I've started using Graphviz for diagramming system
architecture, software design, and deployment diagrams. It is working
out really well, and as I get the hang of it (aka read more
documentation) it just keeps getting better. Working with the "dot"
language used to specify the graphs is pretty easy, they look like
this:
Digraph g {
Hello [label = "Hello"];
World [label = "World"];
Hello -> World [arrowhead = diamond];
}
Thus far I've been using vim for editing, as there is no IDE to be
found. An IDE would be nice here, in particular to provide a few
things like:
• Syntax Highlighting
• Name collision detection (all nodes in dot live in the same
namespace, but can be structured within logical "clusters", it is easy
to collide with names in a big graph)
• Refactoring node names
• Graphical choosers (for example hit alt+f2 and get a popup that
shows you the actual colors or shapes)
• Argument completion (if the context is that of specifying a color, a
key-chord would pop up a combo-box with selections)
• Argument validation (it would be nice for the ide to warn the user
of invalid arguments as best it can, for example there is no color
ultra-tack, and node names can't begin with cluster)
When I look at what other folks have done with Scheme, I feel like
this is something that could be accomplished Scheme via an "embedded
DSL" or a "little language". My questions follow:
Does a little language make sense here? Why or why not? I think it
does as I know that I can get refactoring out of the box, and can use
macros to code up argument validation, name collision handling, and
graphical choosers.
If this does make sense, are macros the right way, or is the match
library? It seems like macros make the most sense since I want the IDE
to handle errors.
Would this be something that is a "language" for DrScheme? I don't
understand right now when one would provide a teachpack style
"language", and when one would use a module language.
All comments and questions welcome.
Thanks,
Grant