Blame | Last modification | View Log | Download
These are simple tests for Lua. Some of them contain useful code.They are meant to be run to make sure Lua is built correctly and alsoto be read, to see how Lua programs look.Here is a one-line summary of each program:bisect.lua bisection method for solving non-linear equationscf.lua temperature conversion table (celsius to farenheit)echo.lua echo command line argumentsenv.lua environment variables as automatic global variablesfactorial.lua factorial without recursionfib.lua fibonacci function with cachefibfor.lua fibonacci numbers with coroutines and generatorsglobals.lua report global variable usagehello.lua the first program in every languagelife.lua Conway's Game of Lifeluac.lua bare-bones luacprintf.lua an implementation of printfreadonly.lua make global variables readonlysieve.lua the sieve of of Eratosthenes programmed with coroutinessort.lua two implementations of a sort functiontable.lua make table, grouping all data for the same itemtrace-calls.lua trace callstrace-globals.lua trace assigments to global variablesxd.lua hex dump