[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Rules engine in Lua?
- From: "Keith Nicholas" <keith.nicholas@...>
- Date: Mon, 14 Jan 2008 16:28:48 +1300
we created a nice wee system for doing state machines in embedded systems with lua.
it even spat out GraphViz diagrams of the state machines automatically (not that we needed them but it was trivial to do given our lua implementation)
it meant you could interactively write software for embedded control systems. Really nice. Though it's shelved for the time being as productionising the electronics side of things needs to be done.
On Jan 12, 2008 1:26 PM, Jorge Visca <
Duck wrote:Yeah, i've noticed this reading the PiL on-line. I had to stop reading
> Bear in mind (sorry, this doesn't actually answer your question, but
> is just an observation on a neat feature of Lua which you might not be
> aware of when creating state machine code) that Lua supports proper
> tail calls,
> meaning that if the value a function returns is computed _directly by
> calling another function_, that call (the tail call) is implemented as
> a jump, not as a call.
it halfway because i was getting a "neat feature" overdose. As soon as i
get a feeling for closures and functions as first class values, i'll go