From what I understand, there was (and may be still is?) quite a bit of effort on the parts of the creators/maintainers (3 people as I understand it) to keep the language simple -- internally and externally.
Conceptually it reminds me a lot of Lisp/Scheme but with a syntax that feels more mainstream (though not really C-like).
To give you a taste, here's a snippet from plugin.lua (from the sample plugin):
function on_init(
directory
)
odprintf(" current working directory is: " .. lfs.currentdir())
plugin_dir = directory
odprintf(" plugin_dir set to: " .. directory)
determine_envvars()
return true
end
Below is an attempt at explaining the content (if there are other Lua folks around and see errors please speak up
).
This is a function definition.
Lines 1-3 are the portions that indicate a name for the function and a parameter names (the parameter being on separate lines is just a style I am experimenting with -- haven't seen any one else do this in Lua). The name of the function is 'on_init' and it has one parameter named 'directory'.
Line 4 is a function call. The argument is the result of concatenating (via ..) two things, a string and the result of another function call (the function currentdir in the module lfs)).
Line 5 is an assignment of the passed in value of 'directory' to the 'plugin_dir' variable (which currently is global).
Line 6 is another function call, similar to line 4.
Line 7 is a call to another function defined elsewhere in plugin.lua.
Line 8 is a return statement. It returns a boolean true value.
Line 9 delimits the end of the function statement.
For reference, some potentially handy Lua resources:
lua-users wiki
http://lua-users.org/wiki/ Programing in Lua (1st edition, covers a slightly older Lua, but still quite useful)
http://www.lua.org/pil/ The Programming Language Lua
http://www.lua.org/