lua-users home
lua-l archive

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


On Sun, Sep 15, 2013 at 7:10 AM, Jayanth Acharya <jayachar88@gmail.com> wrote:
> Was going to suggest the "hsm_statechart" library which I found on luarocks
> site, and thought to be a way to implement state-machines in lua (ala iMatix
> Libero, not sure if anyone here used it). However, came across this reply,
> which seems very interesting. Any chance of being able to post some small
> sample that explains the method to the uninitiated -- time permitting ?
>
>
> On Sun, Sep 15, 2013 at 6:26 AM, Andrew Starks <andrew.starks@trms.com>
> wrote:
>>
>>
<snip>


Jayanth,

I'd be happy to, except that my solution wouldn't solve this problem.
I believe that Tim and D. Matt provided good answers.

Whether a single-lined function chain or a tree of functions is what
you're interested in, you should start here:

http://w3.impa.br/~diego/software/luasocket/ltn12.html

If you have more questions, post them, and I'd be only too eager to
throw in some more examples.

BTW: After some time with Lua, you'll then yearn for LTN12 example to
be implemented with coroutines, because it simplifies the design a bit
more and makes it even more powerful.


-Andrew