lua-users home
lua-l archive

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


Mike Pall wrote:
Hi,

umm ... we had that discussion half a year ago. And there was
even a broad consensus which lead to the current implementation:
the core does native loading only -- conversion is done with
external tools (e.g. ChunkSpy).

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

It could, for example, employ fixed endianity regardless of the underlying native one, use arbitrary precision values for integers[1], uses pairs of mantissas and exponents to express floats, etc.

This would provide a standard way of dumping and undumping without platform problems for only a small performance penalty, and wouldn't bloat the core Lua to boot.

[1] e.g. MIDI numbers, where bit 8 set means the number continues in the next byte.

--
Lisa
http://www.thecommune.org.uk/~lisa/