Earlier quoted context omitted.
> I feel like we don’t need a novel language for this. Well, there's like 50 others, many of whom are in heavy use in industry, so, I guess I feel like a lot of people think this is useful. . > I feel like Erlang is already a great language — almost a DSL — for “making complex finite-state machines easy to create.” Erlang is almost my favorite language. I've tried using both of its finite state machine libraries. I d…
> I've tried using both of its finite state machine libraries. I'm not talking about gen_fsm or gen_statem — note how I said "without OTP" above. I'm talking about writing Erlang the way it was originally conceived before proc_lib existed — where each process has a module that's exclusively responsible for its own receive loop, rather than being a delegate module for a generic receive-loop manager framework (proc_lib…
I apologize for overlooking this
.
> You don't call into arbitrary slap-dash non-formalized libraries
Respectfully, no, it sounds like you write them yourself, instead
.
> > FSMs are a great example. You either need to reach outside the Beam VM with `hipe_bifs:array` or you need to copy the entire machine state every time you want to mutate it. > > Why are you mutating something outside the FSM from within the FSM?
I'm not. I'm talking about the expense of the action of the FSM mutating itself.
.
> The point of an FSM is to reduce the "power" of reasoning needed to prove things about the abstract machine
I apologize, but you and I have strongly contrasting opinions here.
The rest of you trying to teach me what an FSM does is noted. Thank you for your time
.
> I think we might be talking about very different things here but both calling them "FSMs." I'm talking about how Erlang's native syntax is really good at expressing https://en.wikipedia.org/wiki/Deterministic_finite_automaton (like non-backtracking regexps) succinctly. What are you talking about?
My library, and finite state machines, which are the superfamily containing DFA and a great many other things. DFA is not a common interpretation of the phrase FSM; usually that phrase means a Mealy machine or a Moore machine, or maybe a Harel machine.
I think you're spending more time attempting to force this library to implement some computer science term you're familiar with than is warranted. JSSM doesn't fit any of those labels well.
DFAs are generally a small group of functions meant for parsing strings. JSSM isn't even superficially similar to a DFA, and most state machines in practice aren't implemented that way in my personal experience.