News for hackers. Stuff that matters.
Re:Designing state machines by karboosx on Monday June 26, 2017 @04:42AM (#14635091)
There is good tool for making diagrams (so state machines as well) called mermaid[1], just by writing simple readable text.

[1] https://github.com/knsv/mermaid

Re:Designing state machines by nerdponx on Monday June 26, 2017 @08:22AM (#14636163)
I wanted to like Mermaid, then I realized it was just a neutered version of GraphViz. I had wanted to write a Mermaid-to-Graphviz compiler but never got around to it.

It produces pretty ugly graphs that can't be exported to any other format. Meanwhile just about ever graph manipulation program (e.g. Gephi) can handle GraphViz DOT format.

Re:Designing state machines by karboosx on Monday June 26, 2017 @09:20AM (#14636540)
I didn't know GraphViz. I have to try it. DOT language looks very similar to Mermaid.

It was too hard to make that compiler or you have encountered another problem?

Re:Designing state machines by nerdponx on Monday June 26, 2017 @02:42PM (#14639183)
I didn't even know what BNF was when I had the idea ;)

It's still on my list of short projects. I have a lot of learning to do, knowing nothing about writing parsers and such. Yes, I know I could probably hack it together with a bunch of garbage Python. But that just does not sound fun to write, let alone maintain.

Re:Designing state machines by karboosx on Monday June 26, 2017 @04:14PM (#14639970)
Apparently some people also wanted graphviz syntax: https://github.com/knsv/mermaid/issues/5

I also find another project called Viz.js[1]. It's graphviz in javascript. Looks promising. It's hard to choose between this two. On the one hand is very simple syntax, and on the other hand more flexibility.

[1] https://github.com/mdaines/viz.js/

Re:Designing state machines by amorphid on Monday June 26, 2017 @08:36AM (#14636245)
PlantUML is a text based solution, too. I use it write in the Atom IDE.

http://plantuml.com/state-diagram