lua-users home
lua-l archive

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


Hi Luis,

after fiddling with your code a little, it now works like a charm...
fast and efficient. Here are two further small remarks:
1) In
	local TREF = 9
	local TGUARD = 10
the numerical values could usefully be a little bigger to allow for
further storable lua types (I've used 254 and 255, which is probably a
tad optimistic).

2) As your functions read and write a binary format (as compared to some
other pickle()'s I've seen which produce Lua table initialisation code),
how about writing a small signature (2 or 4 byte) with a version id at
the start of the file? This way future versions can read "old" dumps in
a backwards-compatible manner.

Thank you very much for sharing that. For one thing, I would not have
thought of storing functions as your code does.

-- 
cheers  thomasl

web : http://thomaslauer.com/start