Tag Archives: introspection

See.lua – Documentation

See.lua – A Lua introspection library

	> see(string)

	.byte(?)            .char(?)            .dump(?)            .find(?)
	.format(?)          .gfind(?)           .gmatch(?)          .gsub(?)
	.join(self, table, ...)                 .len(?)
	.lower(?)           .match(?)           .rep(?)             .reverse(?)
	.sub(?)             .upper(?)

Lua is a wonderful little language that lets you do…

Posted in Blog, Lua, Programming, Snippets | Tagged , , , | Leave a comment

Lua – Get a table of function arguments

The lua standard libraries do not provide anything that helps you get the table of arguments for a given function. This can be accomplished by directly introspecting the bytecode of the function. The following snippet generates a function get_args that…

Posted in Blog, Lua, Programming, Snippets | Tagged , , , , , , | Leave a comment