lua-users home
lua-l archive

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

Hi all,

I'm a big fan of state machines in reactive designs. So when I started learning Lua it was among the first design patterns I started implementing.

You can find version 1 of an HSM pattern in Lua here:

The design is based on the excellent work of Miro Samek (hence the module name "miros"). This implementation closely follows an older C/C++ implementation which I've also used. It was published in the 8/00 edition of "Embedded Systems" magazine by Miro Samek and Paul Montgomery under the title "State Oriented Programming". The article and code can be found here:

This module is pure Lua. I've learned alot doing it but I'm counting on you guys for suggestions to correct and improve it.

There's also an updated version of Lunar there that builds with recent MSVC releases and Lua 5.1.