User:Xenwolf/Lua: Difference between revisions
Created page with "'''Lua''' is an easy to learn but powerful scripting language. MediaWiki supports Modules written in Lua (by the extension Scribunto, bundled with 1.34+) which can simplify..." |
→See also: +1 |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
MediaWiki supports Modules written in Lua (by the extension Scribunto, bundled with 1.34+) which can simplify writing templates a lot. Especially in cases where a lot of calculations must be done efficiently or when loops are inevitable, Lua is the better choice (if not the only one). | MediaWiki supports Modules written in Lua (by the extension Scribunto, bundled with 1.34+) which can simplify writing templates a lot. Especially in cases where a lot of calculations must be done efficiently or when loops are inevitable, Lua is the better choice (if not the only one). | ||
Lua modules are currently (Dec. 2020) evaluated on dev.xen.wiki: | |||
* Can this feature help us building tables info boxes etc? | |||
* Is it easy to use and easy to maintain? | |||
* Is it safe? | |||
... see [[:dev:Category:Lua modules]] and [[:dev:User:Xenwolf/SandBox]] for examples | |||
== Notes == | == Notes == | ||
=== Performance === | |||
The performance is really great, compared to templates. | |||
As far as I know, modules are actually the measure taken by Wikipedia/MediaWiki to deal with the load caused by (nested) templates: | |||
[[File:Server-kitty.jpg|400px]] | |||
=== Limiting the impact === | |||
in [[mw: Extension:Scribunto#Configuration]] there are some parameters to limit the impact/load of Lua scripts may have | in [[mw: Extension:Scribunto#Configuration]] there are some parameters to limit the impact/load of Lua scripts may have | ||
| Line 15: | Line 32: | ||
== See also == | == See also == | ||
* [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual Extension:Scribunto/Lua reference manual - MediaWiki] - Lua+MediaWiki reference | |||
* [https://www.lua.org/ The Programming Language Lua] -- Lua homepage | |||
* [[Wikipedia: Lua]] | * [[Wikipedia: Lua]] | ||