lua: support programming presents, and add an example of that