lua-users home
lua-l archive

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


D'oh!  Looks like Mark and I are in competition for implementation of his
idea.  :-) I didn't realize Mark would be sharing his work so soon, and I
really enjoyed hacking in my version.  Thanks.

On Wed, Jul 16, 2008 at 04:26:32PM -0400, Mark T. Tomczak wrote:
> I imagine our solution is pretty special-case, so I don't know if anyone  
> else will find this hack useful. But if you do, that's wonderful and I'd  
> love to know about it!

I think this hack is useful in any embedded environment that needs to avoid
DOS (accidental *or* intentional).  Through the allocation function, Lua is
very easy to constrain in space (memory), but time (execution) is beyond
control in standard Lua.  The bailout flag is effective, safe (AFAIK), and
elegant (IMO).

Just becuase a need hasn't been met for a long time doesn't mean it isn't a
real need.  Consider the Lua regression tests. [*]

Ever hear the joke about the efficient market economists?
  EME1: "Hey, is that a $20 bill on the ground?"
  EME2: "Couldn't be.  If it was, somebody would have picked it up."

[*] What regression tests? [**]
[**] See what I mean?
-- 
Chip Salzenberg <chip@pobox.com>