lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I need to use this for a real-time event sampling use-case.  does seem interesting but the cautionary note that its "very alpha quality and not tested ..." is worrisome.

Is there any other libs that you could recommend?

On Sun, Apr 28, 2019 at 5:53 PM Jorge <> wrote:

On 28/4/19 17:32, Sean Conner wrote:
> Personally, I tend to use mutually recursive functions to handle state
> machines in Lua.

I've used that and it works great, very compact and efficient. An
explicit data structure with states, transitions, etc. is easier to
explain to others and to manipulate programmatically, tough.

If you need more sophisticated state machines, like hierarchical state
machines / statecharts, you can check this:

(it's a very light weight implementation, we use it on
microcontroller-based robots)