Lua is a small scripting language. A team of researchers at the Pontifical Catholic University of Rio de Janeiro in Brazil It was formed by Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo and developed in 1993. It is designed to be embedded in applications to provide flexible extension and customization capabilities for applications. Lua is written in standard C and can be compiled and run on almost any operating system and platform. Lua does not provide a powerful library because of its positioning. So Lua is not a good language for developing standalone applications. Lua has a concurrent JIT project that provides just-in-time compilation on a specific platform.

Lua Complete Self-study Manual

Lua scripts can be easily called by C/C++ code and can be called by C/C++ functions in reverse, making Lua widely used in applications. Not only as an extension script, but also as a common configuration file, replacing XML, INI and other file formats, and easier to understand and maintain.

Written in standard C, Lua is simple and elegant, and can be compiled and run on almost any operating system or platform. A complete Lua interpreter is only 200K, making Lua the fastest of all scripting engines. All of this makes Lua the best choice as an embedded script.

Lua features:

  • Lightweight: it is written in standard C language and open in the form of source code, compiled only more than one hundred K, can be easily embedded in other programs.
  • Extensible: Lua provides very easy to use extension interfaces and mechanisms: provided by the host language (usually C or C++), Lua can use them as if they were already built in.
  • Other features:
    • Support for procedure-oriented programming and functional programming;
    • Automatic memory management; Only provides a general type of table (table), with it can achieve array, hash table, collection, object;
    • Language built-in pattern matching; Closure (closure); A function can also be viewed as a value; Multithreading (collaborative processes, not threads supported by the operating system) support;
    • Closures and tables make it easy to support some of the key mechanisms needed for object-oriented programming, such as data abstraction, virtual functions, inheritance, and overloading.

Lua application scenarios:

  • The game development
  • Standalone application scripts
  • Web Application Scripts
  • Extensions and database plug-ins such as MySQL Proxy and MySQL WorkBench
  • Security systems, such as intrusion detection systems

More excellent courses:

Official website of Ali Yun University (Official website of Ali Yun University, Innovative Talent Workshop under cloud Ecology)