FANDOM


Forums: Yew Grove > Scribunto
Replacement filing cabinet
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 22 June 2014 by Urbancowgurl777.

As some of you may be aware, Scribunto has been enabled on wikimedia sites for some time. It has recently been backported to wikia's codebase and is being rolled out across wikis as I type this. Scribunto is essentially a programming language that can embedded into wikitext - for the time being the only option is Lua. Lua is supposed to be one of the quickest languages to pick up, I understand it's used to mod world of warcraft and has apparently been quite successful as a choice of language for that application.

I've asked for it to enabled here. For anyone wondering, I didn't feel it warranted any consensus as it's an optional feature. If we don't like it or don't get on with it we can ignore it and carry on with our lives. The benefits however are faster page loads and the ability to get rid of the mess that is some of our most complex templates and swap it for structured, easy to follow code. I'm literally unable to think of a single down point other than it being another language to learn, although it doesn't seem too hard to pick up assuming you have some coding experience.

The extension will be enabled here shortly, I don't have an eta quite yet, but I'd imagine within the next week or two. What I don't know is which our worst performing templates are and which templates are a huge mess of parser functions that no one ever wants to touch. there's likely to be some overlap in these too Wink These should be the first templates for us to convert and compare. Some ideas of mine are the templates used for displaying all our exchange data and {{coins}} but I'd like some others that people have noticed.

For anyone interested in having a go with lua, there's documentation on dev wiki and it's enabled on my test wiki which should serve as a place for us to test ideas out until its enabled here. User:Cqm/Signature

An example of a converted template: {{coins}} which requires {{ntsh}} becomes Module:Coins (usage example). It can be used in exactly the same way as the current template, so we don't need to do anything except alter the template page itself. This also eradicates the junk number string that causes problems in wikiamobile and it's variations and sortable tables. User:Cqm/Signature

Discussion

Comment - No more mess of code? Woohoo! --Jlun2 (talk) 01:56, May 30, 2014 (UTC)

Comment - Template:sof is probably the worst template on the wiki. If this extension could somehow help in optimizing it, I would be glad. 5-x Talk 09:38, May 31, 2014 (UTC)

I don't think Scribunto is going to help navboxes much, but looking an wikipedia's there's definitely something we can do to improve them. User:Cqm/Signature
{{ExchangeItem}} is 932x worse than that. MolMan 18:07, June 7, 2014 (UTC)
I've already got most of the way to moving navboxes over to lua, the improvements I'd like to add from wikipedia are some css alteration to allow us to scrap using {{*}} and just use bulleted lists which will hopefully make them easier to maintain.
{{ExchangeItem}} is something I'm working on at the moment, but it's going to be a larger effort to move all the data we have to the module ns rather than just simply replacing the backend of one or two templates and carrying on as normal. User:Cqm/Signature

Comment - I think this SO question might be useful to link to for a basic guide on how to get started with LUA, for those who are interested. JOEYTJE50TALKpull my finger 13:11, June 1, 2014 (UTC)

25/10 would have loved years ago Weird gloop @Gaz#7521 01:25, June 7, 2014 (UTC)

neutral - After only reading the first paragraph. RuneSkype is already too much like Wow, so we don't need to be modding our wiki the same way wow apparently mods the game. On the other hand, wikipedia uses LUA, and we are wikipedia, afterall. MolMan 18:07, June 7, 2014 (UTC)

Comment - Scribunto has been installed to make it easier for us to start converting templates over without having to copy over the entire template infrastructure. Someone is working on moving {{Infobox Item}} over, hopefully we can use that as a base to use for all the other infoboxes. If anyone does decide to start converting a template, please remember to test it extensively before rolling it out on the wiki. User:Cqm/Signature

Question - Who can edit modules. I think it'd be something I'm interested, but will I have the rights? Also, what's the best place to learn Lua? MolMan 22:58, June 11, 2014 (UTC)

As far as I'm aware there is no protection applied to the module ns by default, much like there's no protection applied to templates by default. I'd assume we'd continue our practice of protecting high use templates and leaving everything else to be edited by anyone.
As for learning lua, I've found the standard resources I can find on google to be a little complicated for me. Joey's link above seems to be one of the best resources, but there's no substitute to having a go and googling what you don't know. It's never failed me so far. User:Cqm/Signature
Information icon A user has requested closure for Scribunto. Request complete. The reason given was: Discussion has died. 18px-Avatar.png Fswe1 26px-Brassica_Prime_symbol.svg.png 15:37, June 22, 2014 (UTC)

Closed - It has been implemented. User:Urbancowgurl777/Signature 17:01, June 22, 2014 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.