lua-users home
lua-l archive

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


UTF-8 source code*

On 19.06.22 14:21, Flyer31 Test wrote:
Lua is interpreter language.

It will run in the target directly from ASCII source code, or from a
so called "Lua bytecode".

Lua bytecode will perhaps load a bit faster, and be a BIT smaller than
ASCII source code, but not very much ... . So most people prefer to
use the ASCII source code directly. (Lua bytecode also has
disadvantage, that it can deviate very clearly from Lua version to Lua
version ... ASCII code for simple / "basic" Lua code can typically be
identical / not depend on Lua version).

Compiler language like C is COMPLETELY different... here the Compiler
will NOT run during runtime, but during development time. This will
create typically some sort of "exe file" - and this exe file then will
run ONLY on a specific target (you need clearly DIFFERENT exe e. g.
for Windows (even possibly depending on Windows version), for Android,
for Apple - you need different exe files for such systems).

Whereas ideally a lua ascii code will run on any system, where lua is
installed. So you need only ONE Lua file for all of them.

Disadvantage of Interpreter language like Lua is, that the code will
run much slower (typically factor 100)... this can be especially
pinching if you use extensively for loop calculations in Lua ...
better code such things in C and present a C coded subfunction for
your Lua system for such "hard calculation pucesses".

On Sun, Jun 19, 2022 at 11:06 AM Budi <budikusasi@gmail.com> wrote:
What actually is luac, lua compiler of Lua programming language? Is it