Catuse says at 23:12, September 13, 2014 (UTC) "Somewhere a zealous god threads these strings between the clouds and the earth, preparing for a symphony it fears impossible to play. And so it threads on, and on, delaying the raise of the conductor's baton." | |||
As I'm sure most of you are aware, Wikia finally rolled out Scribunto, an extension that allows for server-side scripting in Lua, to us yesterday. There's a lot of advantages to rewriting templates in Lua, including readability, reducing the pages that break template limit and (this is a big one -- see Forum:Navbox Megathread) load time. Module list: Template:See Also
| |||
Discussion
The modules and their methods and properties should be documented. Help:Lua would be the consistent place for it. JBed (talk) 23:34, September 13, 2014 (UTC)
Navbox will be a lot easier than you think. A lot of it is repetition and options, both things Lua handles far better than ParserFunctions ever could. Aside from that, it's literally all HTML with CSS classes. Once we got the bigger Modules down, Navbox will be easy. Infoboxes; there are different kinds. Enemy ones, with the way they're handled, I'd say that'd be something along the lines of making our own /stats builder, or just our own /stats using thing. If you look at Some other minor things: a module for Lbox and Mbox is easily doable. Could easily | |||
Using bots to turn {{#if: to {{if| would be a bad idea. Parser functions work slightly differently to templates in that their parameters allow "=". So changing the former to the latter will break things if you try to do it without checking the outcome.
And yeah, I vote we {{#invoke}} in templates. Ergo, people who don't use Lua need never reference modules. They transclude templates which invoke modules. JBed (talk) 00:53, September 14, 2014 (UTC)
Oh, fuck, of course. Could use bots to turn them into invokes, or find some workaround. I just don't think we'll need to keep parsers around if we have modules replacing their functions but faster. Another reason I wanted to, though, is stuff like ifstring, can probably be made consistent with other parsers with modules. Still divided on that issue. It's useless because it keeps a page around for no reason. But then again, preserving history and, as you said, allowing the non-Lua people to ever need to invoke, since I'm sure every user knows how to transclude, might be reason enough. Eh, I dunno. Lua is useful as hell, but I get the feeling of, "will we ever need templates again?" or "is this way too ambitious?" | |||
Catuse says at 01:20, September 14, 2014 (UTC) "Somewhere a zealous god threads these strings between the clouds and the earth, preparing for a symphony it fears impossible to play. And so it threads on, and on, delaying the raise of the conductor's baton." | |||
Of course we'll still use templates. You don't wire your home security system to a bomb or use a CAS to find 2 + 2. | |||
Hm, I think we have enough documentation content to justify Help:Lua at the moment. Move from the forum to there? | |||
Catuse says at 18:29, October 2, 2014 (UTC) "Somewhere a zealous god threads these strings between the clouds and the earth, preparing for a symphony it fears impossible to play. And so it threads on, and on, delaying the raise of the conductor's baton." | |||
Talk is almost done!
As you can see there are a few minor kinks that I need to work out involving top corners and the speech triangle -- probably just typos, I've found quite a few already. Once that's done, we can roll it out. Because of template limits, I'd rather it replace I also want to create some added functionality aside from the Talk.main() method, for example, a method that can be used to call different bubbles conditionally for people who have like six or seven talk bubbles and an awkward mess of nested #if statements in their talk bubbles. Thoughts/other ideas? | |||
I'd like to see what happens when #invoke is compared to TL with regards to template include size limit. JBed (talk) 19:31, October 2, 2014 (UTC)
With templates I got 8462 and 8072 before timing out. With invoke I got 7304 twice... that doesn't sound plausible but it did happen. It being that way doesn't make sense, unless caches plays a part when being invoked from the template but not when direct invoking from a page. I might get different results if I keep trying, don't know.
We're talking 12615 before we hit template include on templates. Invoke does have template include limit, and actually we're getting 19175 uses before hitting it. Under "uses" I include both successful displays and script errors. That could mess with things, I doubt that much though.
TLs not exactly a lightweight module. I mean, it's simple but not really simple. I wonder what would happen with Talk.
I think the demo proved that processing time differences are insignificant between invoke via template vs. direct invoke; and template include size increases when invoking via templates. But the limit is just intended to be a cap to prevent bad situations, we already know from the script time outs that it's not causing a bad situation. JBed (talk) 20:13, October 2, 2014 (UTC)
Okay, I think this is almost complete now. I need to re-manage the invokables section, write an intro, and then get someone to read over the rest of the body.
Besides that there is the finishing of the documentation of mw
. I also found out os
was a thing few days ago. Techno, Catuse: if either of you want to document these then feel free. Although I probably have the most free time of both of you so I feel like I shouldn't really ask it of you.
I wish Scribunto gave us COOKIE access. Then we could factor in user preferences into things. Like talkbox display style: simple, forum-style, or classic FFWiki-style. That's just a simple example, there's a lot more control we'd have. JBed (talk) 07:25, October 19, 2014 (UTC)