lua-users home
lua-l archive

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


On Wed, Aug 12, 2009 at 6:08 AM, David Manura<dm.lua@math2.org> wrote:
>> - instances of Alice have a more efficient representation in memory.
>>  Since the set of all possible fields is known, it can be stored
>>  as an array with known offsets for each member instead of as a
>>  table keyed by "x" and "y".
>
> That's interesting.  A similar type of thing might be done using one
> of the struct libs [1].

This does seem like an option; parse some simple representation (could
well be a stripped-down proto format) and generate the formating codes
for lstruct (etc). The focus would be on reading and writing the
'native' binary representation and  would make code for reading binary
files much more obvious.  Such a representation is then a way to go
from Lua tables to struct layout, and vice versa.

steve d.