[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] LuaSrcDiet 0.9.0 -- reduce source code size
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 15 Feb 2005 21:58:52 -0200
> > LuaSrcDiet reduces the size of Lua 5 source files by removing all
> > unnecessary whitespace and comments.
> I'm intrigued; given luac, why would one want such a thing?
I'm not sure about his motivations, but I see two reasons: one is that
precompiled chunks are not always smaller than the original source, because
of debug information, for instance; the other is that you may want to
store Lua code as a string inside your code and using source instead
of precompiled code will give you portability, because the format of
precompiled code changes with each version. I think tolua did this.
Shameless plug: my ltokens library comes with a lstrip tools that does
exactly what LuaSrcDiet does but uses the Lua lexer for that.