In association with heise online

18 March 2013, 17:00

Wikimedia adopts Lua for page generation

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Lua Wikimedia has activated Lua-based templating on several of its sites including English Wikipedia. Driven by a new MediaWiki extension called Scribunto which allows scripting languages to be embedded in MediaWiki, it is hoped that the Lua templating will help improve performance where editors take advantage of its capabilities.

Lua code is stored in module pages like Module:Bananas and is then referred to in pages with {{#invoke:modulename|functionname}} like this example page. Lua offers a more powerful, and much less obscure, way of performing complex tasks which are reused within pages. There is already a queue of requests to get existing templates converted to Lua.

This may be a slow process though. In another posting on the Wikimedia blog, Sumana Harihareswara, Engineering Community Manager, noted that there are 488,731 templates on English Wikipedia alone, which may or may not be optimisable. The same posting notes, though, that the addition will "empower those frustrated Wikimedians who have been spending years breaking their knuckles making amazing things in wikitext", even if there are some slight differences between Wikimedia Lua and standard Lua.

Wikimedia points out that, as well as improving performance, the Lua functionality will offer new ways to display structured data and to help structure unstructured data. Harihareswara says that this "is the first time that the Wikimedia site maintainers have enabled real coding that affects all readers" and they are taking the "anyone can edit" maxim of Wikimedia "one big step forward" by allowing anyone to write code and include it in an article "without much review". To help developers, there is a reference manual with a getting started tutorial and a sandbox for trying out new Lua code.

See also:

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1825268
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit