Jump to content

Lua Programming

From Wikibooks, open books for an open world

Lua (/ˈluːə/ LOO-ə; from Portuguese: lua [ˈlu.(w)ɐ] meaning moon) is a lightweight, high-level, multi-paradigm programming language created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes.

Lua is implemented in C and has simple API which helps it interface easily with other languages.

This programming language is also related to (other than C/C++): Python, Java, JavaScript, as well as a few concepts of Perl, etc.


Lua is mainly used for embedded systems and for game development. Some games that are scripted in Lua include: World of Warcraft, Roblox games, Angry Birds (video game), etc.

Some other sources that use Lua include Nmap and Adobe Lightroom.

Lua's latest version is version 5.4.3 and was released @2020-1.

Some text editors that use Lua include: SciTE, Notepad++ with Autocompletion Plugin, Visual Studio with BabeLua Plugin, ZeroBrane Studio and Atom Editor with the Love-IDE collection of packages.

At first in its release it was used as home programming language then later appeared publicly. The most famous Lua book is by Roberto Ierusalimschy, the creator of Lua and it's called "Programming in Lua fourth edition"


According to 2021 statistics so far, Lua is used 0.47 percent out of all programming languages.

Contents

[edit | edit source]

This book is divided into the following chapters and appendices:

Introduction 100% developed
This chapter introduces the Lua language and gives a brief overview of its purpose and history. It also introduces some programming concepts.
Expressions 100% developed
This chapters provides comprehensive coverage of expressions, operators and types.
Statements 100% developed
This chapter describes the statements available in Lua.
Functions 100% developed
This chapter explains the purpose and usage of functions and describes the syntax for function definitions.
Tables 100% developed
This chapter covers table constructors, metatables, iterators and sorting.
Standard libraries 100% developed
This chapter describes the functionality offered by the standard libraries.
Appendix: Software testing 100% developed
This appendix gives information about testing programs written in Lua.
Glossary 100% developed
This glossary contains accurate definitions of all significant terms used in the book and relevant to the subject.
Index 100% developed
This index contains a list of all the topics and functions covered in the book and references to the locations in the book where these topics and functions are described.