Lua scripting
Group: | Platform |
Start: | 2011-08 |
End: | |
Team: | Brad Jorsch (anomie) |
Lead: | Tim Starling |
Status: | See updates |
We're working to support Lua as a scripting language for MediaWiki end users, including Wikipedia editors. You can try it out now at en.wikipedia.org and several other WMF wikis, and we will roll it out to all WMF wikis on 13 March 2013.
Several editors are porting existing templates such as Cite over to Lua (see recent changes in the "Module:" namespace and the tutorial).
Contents |
Status [edit]
-
[edit status] • [add new]2013-04-monthly:Some bugs were fixed and internationalization changes merged this month; no major changes were made. The community continues to develop Lua-based templates, such as the citation templates on the English Wikipedia.
Rationale [edit]
Templates and ParserFunctions were introduced to allow end users of MediaWiki to replicate content easily and build tools using basic logic, effectively turning wikitext into a limited programming language.
However, complex templates have caused performance issues and bottlenecks.
This project aims to make it possible for MediaWiki end-users to use a proper scripting language that will be more powerful and efficient than ad-hoc ParserFunctions-based logic.
See also Scripting, Extension:Scribunto.
The example of Lua's use in World of Warcraft is promising; even novices with no programming experience were able to make large changes to their graphical experiences by quickly learning some Lua.
- <marktraceur> hashar, sumanah, also Minetest (http://minetest.net) has recently implemented a similar system, though it mods the server more than the client, from what I've seen it's driving people to learn Lua so they can add in their ideas, something not possible with C++
- <hashar> sumanah: the secret of WoW is that they managed to expose an API which is very easy to understand
- <YuviPanda> hashar: heard of Celestia? It's a planaterium software of sorts. Uses Lua for scripting. When I was in 9th grade, me and (also!) everyone around were able to learn and use it without much of a problem at all.
Open tasks [edit]
- Product tasks
- Where are the lists of templates that need to be converted? Help wikis gather those lists, and link to them on this page. For instance, English Wikipedia lists its Lua requests here. Or help create those lists by using parsercountfunction.py to find wikitext templates that currently parse slowly and thus would be worth converting to Lua.
- Improve the "getting started" part of the Lua reference manual in response to novice developers' requests.
- Spread the word about available reference material (such as that linked to in the blog post).
Roadmap [edit]
Scribunto is deployed to more than a dozen WMF wikis right now and will be deployed to all of them on 13 March 2013. From the Platform Engineering part of the Roadmap and the site performance part of the yearly goals, here are upcoming milestones:
Milestones by quarter [edit]
July-September 2012 |
|
October-December 2012 |
|
January-March 2013 |
|
Documents [edit]
- Extension:Scribunto - MediaWiki extension page for this tool
- Extension:Scribunto/Lua reference manual - Documentation for Lua as available in MediaWiki.
- User requirements: notes
- Status updates
- Tutorial on using Lua for MediaWiki templates
- Planning documents:
- Software design document: Explanation of why Tim's preferred language is Lua
- /Benchmarking
- Release management plan: Lua scripting/Release management
- Extension:Scribunto/We_use_Lua a reciprocation page between Lua developers.
Lua modules on this wiki [edit]
- List of all modules on this wiki testing mw:Lua scripting