Lua Getting Started tutorial
Lua is a lightweight, compact scripting language, written in standard C and open in source code, designed to be embedded in applications to provide flexible extensions and customization capabilities for applications.
Lua is a research team at the Catholic University of Rio de Janeiro in Rio de Janeiro, Brazil, which was developed in 1993 by Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo.
It is designed to be embedded in applications, providing flexible extensions and customization capabilities for applications.
Lightweight: It is
written in standard C language and open in source code form, compiled after only a hundred K, can be easily embedded in other programs.
Lua provides very easy-to-use extension interfaces and mechanisms: these features are provided by the host language (usually C or C++), and Lua can use them as if they were built-in.
Supports process-oriented programming and functional programming;
Automatic memory management, which provides only a common type of table, which enables arrays, hash tables, collections, objects;
Language built-in pattern matching; closure; functions can also be considered a value; and multithreaded (collaborative processes, not threads supported by the operating system) are supported;
Closures and tables make it easy to support some of the key mechanisms required for object-oriented programming, such as data abstraction, virtual functions, inheritance, and overloading.
Apply the script independently
Web app scripts
Extensions and database plug-ins such as MySQL Proxy and MySQL WorkBench
Security systems, such as intrusion detection systems
The first Lua program
Next we use Lua to output Hello World!
After running, Hello, world!