Robot Visualizer
jjenzz opened this issue · comments
Are there any plans to build something similar to @statecharts/xstate-viz
and @xstate/test
?
There are no plans currently, but I'm not against either such thing. It's just a matter of time and the right project to motivate building them. Happy to have contributions of course.
Thanks @matthewp. It's useful to know that these types of features are not already being worked on and are open for someone to pick up. I would love to help out because I prefer the FP approach here but like you have already said, time 🙈
Wanted to say I too am interested in this! I tried out xstate and it is just dauntingly huge to me, and the functional approach here is appealing - syntax errors are much more tightly scoped to where they occur and it has way less overloading, plus the much smaller bundle size :) excited to see what tools can be built on top of this and maybe I can contribute some as time comes!
A visualizer is more appealing to me now than it used to be. Especially one that could import/export statecharts XML, as that would then allow you to build a Robot codegenerator from statecharts XML. Maybe the XML import/export is something the XState visualizer would be willing to have added.
Just some thoughts
- Came across a vscode extension for fsm visualization
- It leverages graph viz for display and export
- The fsm is converted to dot language and then passed to graph viz
So, I thought about how to compile a thisrobot machine to dot language and along the way realized that only a valid thisrobot could generate a valid graph. Hence, visualization could yield validation for free. 2 robots one wrench.
- No vscode xState visualizer currently exists, so perhaps graph viz is quicker path to visualization, and in a more modular fashion.
- A thisrobot -> dot compile should be relatively easy to refactor to thisrobot -> xml (hate xml, but to each their own)
- dot language reminded me of mermaid, markdown for graphs. Think it would be much cooler to go from mermaid or dot -> thisrobot template, than xml -> anything (did I mention that I hate xml).
- Think the thisrobot fsm construct would be perfect for writing a compiler. Robot, compile thy self!
(wow, two cheesy jokes in one post. think it's time for break)