lua-users home
lua-l archive

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


Hi Ben and thanks for your help earlier. Certainly, I could use Pluto to
serialise both code and runtime data. However all the code to serialise and
read the dump format is already in the baseline Lua codebase. After our
earlier exchange, I realised I did not even need to write the serialising
code, just code to generate a Lua function prototype! Also, when the
compiler IS left in, the same input stream will be able to take Lua source
code also.

It is going well now thanks to tips from you and others - I can now
serialise numbers, Booleans and strings along with a function to process
them on read. Tables will be a little more involved, but not, I think, too
difficult.

Of course it is nothing like the complete persistence solution that Pluto is
- it will not do closures, userdatas, or complex looped table structures.
However, it should be more than adequate for the intended use. (Note that I
only ever wanted to serialise closures as a way of serialising runtime data
in the upvalues, the "engram" approach does this using a simple function
(the values being stored in constants) so string.dump serialisation works
fine).

-----Original Message-----
>>Ben Sunshine-Hill Sent: 03 February 2009 16:55

>>If you really wanted, you could probably rejigger luac to output in
>>Pluto format rather than Lua chunk format pretty easily, and use that
>>as the "unified format".

Attachment: smime.p7s
Description: S/MIME cryptographic signature