News for hackers. Stuff that matters.
Re:Functional, stateless JavaScript finite state machines an... by bandrami on Monday November 19, 2018 @02:00PM (#18488765)
I'm missing what value the word "stateless" adds to this description, and the article didn't help
Re:Functional, stateless JavaScript finite state machines an... by jbeard4 on Monday November 19, 2018 @02:12PM (#18488849)
It means state is passed in as a parameter to the state machine interpreter - as opposed to being contained in the interpreter object. This is helpful when building pure functional systems, where state is passed in from some external data store, like in Redux reducers.
Re:Functional, stateless JavaScript finite state machines an... by davidkpiano on Monday November 19, 2018 @02:17PM (#18488883)
Thank you - this is correct (the interpreter is impure). It also makes it possible to create your own custom interpreters.

Also, your work has been a huge influence on XState, and I can't thank you enough for SCION!

Re:Functional, stateless JavaScript finite state machines an... by jbeard4 on Monday November 19, 2018 @02:22PM (#18488914)
Thanks!
Re:Functional, stateless JavaScript finite state machines an... by jmakeig on Monday November 19, 2018 @07:22PM (#18490916)
This took me a while to figure out, but it’s incredibly powerful once you get it. As others have suggested, I was working on a Redux-based interpreter.
Re:Functional, stateless JavaScript finite state machines an... by maxxxxx on Monday November 19, 2018 @04:52PM (#18490054)
I would call it "external state". Instead of having the state tightly coupled to the state machine it can be persisted somewhere else.