$ whois lua
Lua
first released in 1993 · by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
$ guessprog --inspect lua
- year
- 1993
- paradigm
- multi paradigm
- family
- other
- memory
- automatic gc
- binding
- dynamic
- safety
- strong
LUA(7)
- AUTHORS
- Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
- HISTORY
- Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo and Waldemar Celes at Tecgraf, a computer graphics group at the Pontifical Catholic University of Rio de Janeiro. Brazil's trade barriers at the time made buying foreign software hard, so the group built its own configuration languages for clients such as Petrobras. Lua grew out of two of them, DEL and SOL, and since "sol" means sun in Portuguese, its successor was named "lua", the moon.
- USAGE
- Popular as an embedded scripting language. Lua powers game modding and scripting (World of Warcraft add-ons, and Roblox through its Luau dialect), and is used to configure and extend tools such as Neovim, Redis and nginx via OpenResty.
- SEE ALSO
- Lua on Wikipedia ↗
-- Tables are Lua's only data structure; metatables add behaviour
local Vector = {}
Vector.__index = Vector
function Vector.new(x, y)
return setmetatable({x = x, y = y}, Vector)
end
function Vector.__add(a, b)
return Vector.new(a.x + b.x, a.y + b.y)
end
function Vector:__tostring()
return "(" .. self.x .. ", " .. self.y .. ")"
end
print(Vector.new(1, 2) + Vector.new(3, 4)) --> (4, 6)