|
|
|
|
|
by datavirtue
1910 days ago
|
|
Very cool. I looked through jssm but get the sense that fsl or jssm might be adapted so that it can be used to declaratively generate an FSM for any language? I wish my colleagues knew what an FSM was and how to create one. Getting tired of seeing 400 nested IF statements sprinkled across 10 classes. Something that makes it easy to create an FSM declaratively for any language might help raise awareness and spur adoption. |
|
A bunch of these, and some I haven't listed yet due to sloth, are already implemented and just not published yet because they're not satisfactorily tested, and because I still don't know what I'm doing about portable hooks
https://github.com/StoneCypher/fsl/issues/418
https://github.com/StoneCypher/fsl/issues?q=is%3Aissue+is%3A...
https://github.com/StoneCypher/fsl/issues?q=is%3Aissue+is%3A...
There are, actually, things like what you describe already - SMC, Canopy, and Ragel, by example, and depending on how you look at it, there's sort of an argument for Drakon and some others. I'm making mine because they don't fit my needs, but if you need something right now, they're options.
SMC is probably the best of those in my opinion. It reaches 14 languages including most of the stuff you'll actually want, is durable, near-zero-bug once you learn what it means by its phrasings, reasonably fast, and does mostly everything you're likely to want in practice. It is entirely adequate from basically every angle, something very few state machines can say (mine cannot.)
But also I'm hungry for users, so please try mine and let me know how you think I could improve. I believe that my ease of use characteristics are pretty nice, and my opinion is that ease of use is probably the Genuinely Big Barrier to fsm usage.
My opinion is that mine is simple enough that people who don't know these things can often see the value. To me, that seems important.
Try giving them this and the resulting graph, and when they look at you funny, afterwards, give them some beefy awful thing with a bunch of control logic from your existing product, rewritten in a state machine, also with the resulting graphThe resulting graph: https://stonecypher.github.io/jssm-viz-demo/graph_explorer.h...
If they're still on the fence, ask them how TCP works and give them a machine to read
TCP machine to read: https://stonecypher.github.io/jssm-viz-demo/graph_explorer.h...
One dollar on PayPal says they'll come around fast