Lua is a way to talk to computers. It helps programs do new things. People made it a long time ago. It is small and fast. It helps many kinds of tools work well. Do you like to use computers?
Lua is a way to talk to computers. It was made in Brazil. Three people worked to create it. They wanted a tool that was small and fast. It helps other programs do new things. One special part is called a table. A table holds many pieces of information. It is like a list of items. This makes the tool very easy to use. It can work on many different kinds of computers. Lua is a helpful tool for many people.
Lua is a way to talk to computers. It is a programming language. People use it to add new features to other software. This is called being an extension language. Three people from Brazil created Lua in 1993. They worked at a group called Tecgraf. At that time, Brazil had rules about buying software from other countries. This led the team to build their own tools from scratch.
Lua is very small and fast. This makes it easy to fit into different programs. It uses a special part called a table. A table is a way to store data. It can act like a list or a set of items. Tables are the most important part of Lua. They help make other types of data.
Lua is also very flexible. It is a multi-paradigm language. This means it can be used in many different ways. It can work on many kinds of computer systems. This is called being cross-platform. Lua is a great tool for making software do exactly what a user wants.
Lua is a special way to talk to computers. It is a programming language used to add new features to other software. This job is called being an extension language. Lua is very small and very fast. These traits make it easy to fit into many different programs. It is also cross-platform. This means it can work on many different kinds of computer systems.
Lua works by using a few simple tools to do big jobs. It is a multi-paradigm language. This means it can be used in many different ways to solve problems. Instead of having many complex parts, it has a small set of general features. Programmers can then extend these features to fit their specific needs. The most important part of Lua is called a table. A table is a single data structure that can act like a list, a set, or a record.
Three people created Lua in 1993. Their names are Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. They worked at a group called Tecgraf at the Pontifical Catholic University of Rio de Janeiro in Brazil. At that time, Brazil had rules called a market reserve. These rules made it hard to buy software from other countries. Because of this, the team at Tecgraf built their own tools from scratch.
Lua has a very interesting history. Before Lua, the team used two other languages called SOL and DEL. SOL stands for Simple Object Language. DEL stands for Data-Entry Language. The name Lua actually comes from the Portuguese word for Moon. This is a nod to its predecessor, SOL, which means Sun. Lua 1.0 used many ideas from other languages like Modula and C++.
Using Lua is a bit like using building blocks. The language provides the base blocks, and you can build almost anything with them. It uses a system called garbage collection to clean up memory automatically. It also uses a small amount of space, about 247 kB when compiled. This allows it to run on many different devices. Even though it is simple, it can handle very complex tasks through its flexible tables.
Lua is a lightweight, high-level, multi-paradigm programming language. It is primarily designed for embedded use within other applications. This means Lua is often used as an extension language to add features to existing software. Because its interpreter is written in ANSI C, it is cross-platform and can run on many different systems. Lua is highly portable and has a simple C application programming interface, or API. This API makes it easy for developers to embed Lua into their own programs.
To achieve its goals, Lua focuses on speed, portability, and extensibility. It does not provide a massive set of specific features for every possible task. Instead, it offers a small set of general, flexible tools. Programmers use these tools to build the specific features they need. This approach is why Lua is called a multi-paradigm language. It can be adapted to many different styles of programming. The base language remains very light and compact.
The core of Lua is a single, powerful data structure called a table. A table is a heterogeneous associative array. This means it can store different types of data together using various types of keys. In Lua, a table can act as a list, a set, or a record. It can even represent more complex structures like arrays or namespaces. Tables are the foundation for almost all user-created types in the language. This design keeps the language simple while allowing for great complexity.
Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. They were members of the Computer Graphics Technology Group, known as Tecgraf, at the Pontifical Catholic University of Rio de Janeiro in Brazil. At the time, Brazil had a policy called a market reserve. This policy created strong trade barriers for computer hardware and software. Because of these barriers, Tecgraf's clients could not easily buy customized software from abroad. This forced the team to implement their own basic tools from scratch.
Before Lua, the team used two languages called SOL and DEL. SOL stands for Simple Object Language, and DEL stands for Data-Entry Language. These were developed in 1992 and 1993 for engineering projects at Petrobras. However, these languages lacked flow-control structures. The creators needed more programming power, which led to the birth of Lua. The name Lua means "Moon" in Portuguese. This was a tribute to SOL, which means "Sun."
Lua's design was influenced by many different programming languages. Its syntax for control structures was borrowed from Modula. It also took ideas from CLU, such as multiple assignments and multiple returns. The creators used ideas from C++ regarding local variable declarations. They also drew from SNOBOL and AWK for associative arrays. Most importantly, the decision to use tables as the primary data structure was influenced by LISP and Scheme. Over time, Lua's semantics have been increasingly shaped by Scheme, especially through the use of anonymous functions and lexical scoping.
Lua is highly efficient and occupies very little space. The full reference interpreter is only about 247 kB when compiled. This small size allows it to fit onto a wide variety of host platforms. The language manages memory automatically through a process called garbage collection. It also supports advanced features like coroutines for cooperative multitasking. These features allow Lua to handle complex tasks while remaining a small, fast, and easy-to-use tool for developers.
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.