Lua scripting/Requirements

Here is a list of thing which are possibly necessary for end-users (found by polling random template writers):

  • String functions and regular expressions — requested by most users whom I asked. Essentially one of the reasons why we want scripting language at all.
  • Functions.
  • Proper error reporting. If an error occurred on certain wiki page, there should be a traceback which lists all modules and the line on which the error occurred.
  • Image output.

TODO: ask more users. Open a village pump discussion about that.

Here is a list of things we would probably want to do as well:

  • Global scripts
  • Code editor
  • Debugging tools

Here are potential implementation obstacles:

  • Lua has a feature called "pattern matching". This is essentially a regular expressions, but with their own special features. They are not Perl-compatible unlike what most of Wikipedia use.
  • Image output sounds like something that has a rather low priority.
  • Lua seems to have issues with error handling. Apparently it does not have proper exceptions.
  • The main issue with global scripts is to invalidate the cache on local wikis when a global script is changed.
  • Lua is on bad terms with Unicode. See http://lua-users.org/wiki/LuaUnicode.