Live data from Hacker News

Shaky: ASCII Diagram to PNG

shaky.github.bushong.net

31–40 of 72 posts

Re: Shaky: ASCII Diagram to PNG

#31
post #27

Earlier quoted context omitted.

That looks like it's using Dot notation: https://en.wikipedia.org/wiki/DOT_%28graph_description_langu... I like to use http://www.graphviz.org/ to convert from DOT to PNG.

Uhm, if the only thing you base that assumption on is the use of -> to mark a line with an arrowhead ... sure. But it's pretty far from dot, actually.

They are similar in that they are both languges that can be used to specify diagrams.

Re: Shaky: ASCII Diagram to PNG

#33

These ideas always seem to top HN. They are cute, but interactive diagram editors have been around a while and, unfortunately, are just faster to use and are more flexible. Maybe it'd make more sense to just have one of these tools implement export to ACSII?

> They are cute, but interactive diagram editors have been around a while and, unfortunately, are just faster to use and are more flexible.

Personally, I build most of my diagrams in either graphviz or LaTeX/TikZ. Graphviz constructs certain types of diagrams very quickly, as long as you don't care deeply about precise placement and layout. And TikZ integrates perfectly with LaTeX documents, and makes complex diagrams and graphs more manageable and scriptable.

Re: Shaky: ASCII Diagram to PNG

#35

Earlier quoted context omitted.

I think the appeal would be that, since it's text based, it's already supported by git/mercurial/svn/name-your-vcs. A binary format would need some sort of history/diff support inside it to work well with a specific plugin for s VCS. An XML-based format would integrate well with a VCS, but you lose the clarity of the ASCII based diagrams. It may seem "cute" or "toyish", but I woudl try to use it before giving an opin…

SVG/GraphML are text based too

SVG cannot be entered by humans in the same way this can

Re: Shaky: ASCII Diagram to PNG

#36

I use this tool almost every day turning sequence diagrams into drawings. https://www.websequencediagrams.com While the "back of a napkin"style is hip, management seems to prefer cleaner drawings. I'd use shakey, if it made "professional" drawings.

PlantUML does the same thing also.

Re: Shaky: ASCII Diagram to PNG

#37
post #32

My impression is most people don't know about graphviz and dot, and implement these sorts of tools to fill this (admittedly big) gap.

Graphviz is great if you either want to automatically generate diagrams of huge graphs, or if you care more about structure than appearance.

But creating pretty diagrams with Graphviz/dot is an exercise in pain.

I love seeing more of these tools, and plan to integrate several of them in the scripts I use to build my blog, not to supplant the cases where I use Graphviz, but to augment them for the many situations where I want to do diagrams that need more precise control than Graphviz does.

(My personal Graphviz self-flagellation exercise involves an XSL file to convert the SVG output from dot to something prettier: https://github.com/vidarh/diagram-tools )

Re: Shaky: ASCII Diagram to PNG

#38

Earlier quoted context omitted.

I think the appeal would be that, since it's text based, it's already supported by git/mercurial/svn/name-your-vcs. A binary format would need some sort of history/diff support inside it to work well with a specific plugin for s VCS. An XML-based format would integrate well with a VCS, but you lose the clarity of the ASCII based diagrams. It may seem "cute" or "toyish", but I woudl try to use it before giving an opin…

"since it's text based, it's already supported by git/mercurial/svn/name-your-vcs" But doesn't that still apply if you had a visual tool exporting to ASCII? It'd save you the difficulty of moving sections around in a text editor, but give you the visual diff.

No, "supported by git" means that if I edit the diagram and check it in, and you also edit the diagram and check it in, Git can usually merge the changes automatically if they don't conflict; and if they do conflict, it can give us a version of the file that contains both changes, with the conflict marked, and makes it pretty easy to produce a merged version.

If your visual tool merely exports to ASCII, this won't work. If it stores its data in ASCII, it might. But it needs to be more than just "doesn't use control characters and non-7-bit characters" — it needs to have reasonably short lines that mostly don't reoccur and whose position, if meaningful at all, is meaningful only relative to the position of other nearby things, rather than by absolute line number or byte position or something.

Re: Shaky: ASCII Diagram to PNG

#39
post #17

Earlier quoted context omitted.

I think the appeal would be that, since it's text based, it's already supported by git/mercurial/svn/name-your-vcs. A binary format would need some sort of history/diff support inside it to work well with a specific plugin for s VCS. An XML-based format would integrate well with a VCS, but you lose the clarity of the ASCII based diagrams. It may seem "cute" or "toyish", but I woudl try to use it before giving an opin…

This. I would love, as an author and teacher, to keep my flowcharts, diagrams, etc with my book code. Right now I'm using SVG for that, but it's kinda rotten.

Yeah, I feel this pain too. MJD's Linogram might work. I've also tried writing the diagrams as Python to produce SVG, or in D3 (to produce SVG), which both work reasonably well but seem like a lot of work.
Post reply on HN