Lua

**Lua** is an open source programming language. It was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. Lua is used for many different things, especially in video games such as World of Warcraft, SimCity 4 and Transformice. It is also used in the popular virtual world sharing website Roblox under a dialect called Luau. In June 2010, Apple Inc. changed the terms of use for the software development kit of its iOS operating system to allow the use of Lua. This led to Lua being used to make iPhone applications such as Angry Birds. In June 2011, Lua was ranked the tenth most popular programming language by the TIOBE Index.

## History

Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. They are members of the Computers Graphics Technology Group (Tecgraf) at the Pontifical Catholic University of Rio de Janerio.

From 1977 until 1992, Brazil had strong trade barriers for computer hardware and software; these barriers were called a market reserve. At the time, clients of Tecgraf could not afford software from abroad. They would have to go through a complicated process to prove their needs could not be met by Brazilian companies. This caused Tecgraf to implement its needed tools from scratch.

Lua followed SOL (Simple Object Language) and DEL (data-entry language). They are computer languages that described and managed data. They had been independently developed at Tecgraf for two different projects. These projects were for engineering applications for the Petrobras company. Petrobras later wanted more power in SOL and DEL. They lacked functions to control flow.

Lua’s syntax for control flow was mostly borrowed from Modula. It also taken influence from other programming languages: CLU for multiple inputs and outputs from calling functions, C++ for local variables, and SNOBAL and AWK for associative arrays. LISP and Scheme also influenced the focus on tables. These two languages used a single structure mechanism.

## Examples

An example Hello World program in Lua:

An example of setting a value, then printing it:

An example of a function, then using it:

An example of a loop that prints each entry in the list in order:

Lua also supports Object-Oriented Programming:

## Other websites

- Lua.org
- lua-users.org

## Infobox (programming language)

- **name**: Lua
- **logo**: Lua-Logo.svg
- **paradigm**: Multi-paradigm: scripting language, scripting, imperative programming, imperative (procedural, prototype-based, object-oriented programming, object-oriented), functional programming, functional
- **year**: 1993
- **designer**: Roberto Ierusalimschy
 Waldemar Celes
 Luiz Henrique de Figueiredo
- **typing**: dynamic, strong, Duck typing, duck
- **implementations**: **Lua**, [http://luajit.org/ LuaJIT], [http://code.google.com/p/llvm-lua/ LLVM-Lua], [http://code.google.com/p/lua-alchemy/ Lua Alchemy] [http://luvit.io/ Luvit]
- **dialects**: [http://metalua.luaforge.net/ Metalua], [http://idle.thomaslauer.com/ Idle], [http://www.nongnu.org/gsl-shell/ GSL Shell]
[https://roblox.github.io/luau/ Luau]
- **programming language**: C (programming language), ANSI C
- **influenced by**: C++, CLU, Modula, Scheme (programming language), Scheme, SNOBOL
- **influenced**: Io, GameMonkey, Squirrel, Falcon, MiniD
- **operating system**: Cross-platform
- **license**: MIT License