lua-users home
lua-l archive

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


on 9/17/04 7:45 AM, Adam D. Moss at <adam@gimp.org> wrote:
> Michael Newberry wrote:
>> Is there a way to procompile chunks to byte code and load that/them at
>> script execution time?
> 
> Use the 'luac' compiler that comes with Lua.  The resulting .luac files
> can be loaded and run interchangably with the original .lua files.

I have one project that has about 60 .lua files. Long time ago (6 months?) I
compiled (tokenized?) my most common library file into a .luac file (I love
asText btw! Thanks to whomever wrote it. ;-). All was good except that my
cvs system didn't like the .luac extension. Somehow ether it (or our
elaborate build system from heck or I?) renamed the compiled file back to
.lua. The surprising thing is that it still works!?!

The bad news is that we compact our cvs system on every GM release to only
contain those releases (all the interim engineering builds are discarded).
In that process my original .lua source file got discarded. Any way to get
the source back? I'm sure the comments get stripped but if I could at least
get something close to the original source back then I could fix some bugs I
found and start merging some new code into the single source.

Any ideas?

BTW: If you add goto/gosub to the language I'll never use it again.

-- 
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)