Incremental

Lua Snippets

Incremental uses the Lua programming language in a number of projects, and some of our Lua projects are available here for free, under the MIT license.

Rima

Rima is a binding from Lua to a number of open source Linear and Integer Program Solvers, specifically, the COIN project's CLP and CBC, and lpsolve. Rima handles equations symbolically, and has very expressive and innovative data handling so you can formulate your problems more quickly.

The latest version is available here, and you can browse documentation here.

Rima has been presented at INFORMS 2010 (presentation) and at ORSNZ 2010 (presentation, paper)

kd-tree

An implementation of a read-only kd-tree with a benchmark using a DIMACS map. Download here.

Heaps

Binary and skew heaps with tests including a benchmark. Download here.

Documentation testing

doctest.lua checks Lua snippets embedded in markdown files. Download here.

Raytracer

ray.lua is a rough copy of the "minimal" raytracer at flying frog. This comment on reddit inspired me to port it to see how LuaJIT performed - in short, the commenter loses his wager.
It's available here, but it needs updating to test some of LuaJIT's newer features.
Usage is 'lua ray.lua 9 512 > lua-ray.pgm', where 9 is the oversampling, and 512 is the image size (it's square). If you want to actually see the resulting image, you'll need something like pnmtopng from netpbm: 'lua ray.lua 9 512 | pnmtopng > lua-ray.png'.