Browser-based compiler and playground for Lua, Progsity IDE.
Lua is a small scripting language built to be embedded: it scripts Roblox games, World of Warcraft add-ons, the Neovim editor and many network devices. The whole language fits in a short manual, with one data structure, the table, doing the work of arrays, maps and objects.
The playground runs the reference Lua interpreter in a sandbox. Integers are 64 bits and separate from floats, strings have their own pattern matching, and functions are values you can pass around and return.
Because the language is so small, it is a good place to learn closures, coroutines and metatables without a framework in the way.
Lua 5.4, the reference interpreter from PUC-Rio. It is not LuaJIT, so 5.4 features such as integer division with // and the <const> attribute work.
By convention, yes. The length operator # and the standard library functions count from 1.
The standard libraries (string, table, math, io, os, coroutine, utf8) are loaded already. LuaRocks packages are not installed, and a program is one file.
In Lua 5.4 the / operator always gives a float. Use // when you want an integer result.
Yes, and it needs no account. Signing in adds saved snippets and share links.
Tap “Try this” to load sample code into the editor above.
local nums = {3, 1, 4, 1, 5, 9}
table.sort(nums)
print(table.concat(nums, " "))local a, b = io.read("n", "n")
print(a + b)local function counter()
local n = 0
return function()
n = n + 1
return n
end
end
local tick = counter()
print(tick(), tick(), tick())for word in ("to be or not to be"):gmatch("%a+") do
io.write(word:upper(), " ")
end
print()Competitive Programming for Beginners
৳3,999 ৳7,999 50% off
Live Bangla cohort starts in October · Bangla live batch · Starts Dec 5, 2026
Run your code to see output here.