Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Compile

Apr 30, 2014 7:21AM PDT

how to compress a lua file into an exe?

Discussion is locked

- Collapse -
Answer
Re: lua
Apr 30, 2014 7:35AM PDT
http://www.lua.org/about.html makes me think it isn't currently possible. It's an interpreted language, so it needs a runtime (like Java or Javascript).
But since it's open source, there is nothing that would keep you from writing a compiler yourself.

Kees
- Collapse -
You probably can
Apr 30, 2014 11:23AM PDT

You probably can, but the usual method of "compiling" an interpreted language like Lua, Perl, Python, Ruby, whathaveyou, is to just tack on the entire runtime to the executable, so you don't gain any performance benefits at all... Probably the opposite. The one and only reason to do it would be if you don't want someone being able to easily get at your code, in which case you probably wouldn't be using a language like Lua.

- Collapse -
Answer
Workaround. Command line skill. See search.
Apr 30, 2014 7:48AM PDT
- Collapse -
Answer
I'm not that familar with Lua but
Apr 30, 2014 9:18PM PDT

the difference between an interpreted language and a compiled is the compiled language is compiled into a language the and processor understand (machine language). Interpreted language are used so you can write the same code on any OS and you need a run time engine that basically compiles the code into bytecode that for that particular OS. It does it on the fly whereas a compiled language when you compile it will generate a file with an exe extension. Most languages the higher level coding uses some type of editor to write the code.

- Collapse -
Answer
When you compiling to an exe
Apr 30, 2014 9:23PM PDT

your not really compressing your converting the human understood code into machine understood code. (bits and Bytes).