Languages
Lua
Installing Lua on Ubuntu in TIDE
Lua
Lua is a powerful, efficient, lightweight, embeddable scripting language. Designed for extension, it supports procedural, object-oriented, functional, and data-driven programming. Lua is widely used in game development engines (such as Roblox and LÖVE), web servers (OpenResty/Nginx), and text editors (Neovim).
Installation
Install the latest stable Lua release (Lua 5.4), development libraries, and luarocks (the package manager for Lua modules) via apt:
apt update
apt install -y lua5.4 luarocks liblua5.4-devVerification
Check the installed Lua version:
lua5.4 -vWriting and Running Code
Create a Lua script file named hello.lua:
print("Hello from Lua in TIDE!")Executing the Script
Run the script using the lua5.4 interpreter:
lua5.4 hello.luaInteractive Shell (REPL)
Start the interactive Lua shell:
lua5.4To exit the REPL, press Ctrl+D or run os.exit().
Installing Rocks (Lua Package Manager)
Install Lua modules using luarocks:
luarocks install luasocket