lua-users home
lua-l archive

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

> Could a coordinated project to create a standard library, seperate from
> the main Lua distribution, that dumps/undumps in a universal format, be
> useful?

Yes. I've been working on a general-purpose tool that only knows the structure
of precompiled chunks and relies on user-supplied functions for I/O. This tool
is not ready; I have to work on getting 5.1 out of the door first!

Another point is that the dump/undump modules of the Lua core are mostly
independent of the rest. You could write your own. The current modules
are written in such a way to make this relativelyt easy: you only have to
replace a few low-level I/O functions. For instance, it's pretty simple to
use plain-text as a format for precompiled chunks. I think Rici Lake was
toying with that idea. The supplied dump/undump modules are just the
simplest possible.

Outputting Lua source code is not a good idea because one of the reasons
for precompiled chunks is to avoid running (and linking!) the parser; this
is an important points for embedded applications with limited memory.