Lua is an actively used programming language created in 1993.

26Years Old 61,300Users 408Jobs

Example code from the Hello World Collection:

# Hello World in Lua

print "Hello world"

Example code from Linguist:

-- A simple counting object that increments an internal counter whenever it receives a bang at its first inlet, or changes to whatever number it receives at its second inlet.

local HelloCounter = pd.Class:new():register("h-counter")

function HelloCounter:initialize(sel, atoms)
	self.inlets = 2
	self.outlets = 1
	self.num = 0
	return true
end

function HelloCounter:in_1_bang()
	self:outlet(1, "float", {self.num})
	self.num = self.num + 1
end

function HelloCounter:in_2_float(f)
	self.num = f
end

Example code from Wikipedia:

$ cc -o example example.c -llua
$ ./example
Result: 8
Edit

Last updated February 11th, 2019