User talk:Strife Onizuka

From Second Life Wiki
Revision as of 19:36, 29 December 2008 by JS Uralia (talk | contribs) (→‎Notecard campaign to M Linden: fix duplicate job URLs)
Jump to navigation Jump to search
Strife Onizuka
is hereby awarded with the
Geek Award.jpg
Geek Award
for
the most creative template name:
Template:Template

by Zai Lynch

You found my talk page... Find old discussions at: User:Strife_Onizuka/Talkpage_Archive_01

Question about Template:Multi-lang

Heyas =)
I was trying to add the new version feature to the help template and stumbled upon a difficulty where I hoped you could help me with... I made a testpage at User:Zai Lynch/Sandbox/MLtest/de but it acts weird... when i make a change to User:Zai_Lynch/Sandbox/MLtest/version then the box is displayed at the test page. When I just edit and save the test page (without changing anything) it eats up the language bar. It acts somehow unexpectedly/random. I don't really know why it is... (o.O) Any ideas?
Zai signature.png Lynch (talk|contribs) 19:42, 5 November 2008 (UTC)

I'll take a look at the template and fidget with it. No ideas come to mind. -- Strife (talk|contribs) 20:00, 5 November 2008 (UTC)
Kewl, thx! :-)
And I'll go to bed as early as 9PM for the first time in ages (o.O) gotta be ill... ^^
*sleepy* Zai signature.png Lynch (talk|contribs) 20:07, 5 November 2008 (UTC)
hm... the bug seems to be very strange. And it isn't part of the template.
Please try the following and tell me what you see:
  • Log out of the Wiki and then browse to Quickie_Wiki_Intro/Usercategories (or User:Zai_Lynch/Sandbox/MLtest/de). Notice: there is a language bar on top
  • Log in the Wiki and look at the same page. Notice: Language bar is gone.
  • Edit the article and preview. Notice: Language bar is visible in preview.
  • Save the article. Notice: Language bar is gone again.
  • Go to Special:Preferences and change the interface language (to German, for example). Notice: The language bar is visible...
  • Change the language back to English. Notice: The language bar is gone again...
o.O Zai signature.png Lynch (talk|contribs) 07:47, 6 November 2008 (UTC)
Had to sacrifice a (unused) feature but it's working now. Weird bug nevertheless... Sorry for spamming
Zai signature.png Lynch (talk|contribs) 02:16, 7 November 2008 (UTC)

grid list

Strife, I was wondering if you'd mind if I took the idea from the grids and downloads list that you have and turned it into a template since I know of a few places (my userpage for one :) ) where it could be useful and I didn't just want to copy off the code especially without your permission. Gordon Wendt 16:34, 6 November 2008 (UTC)

Do what you want with it, I didn't put it in the global space because...
  • Make changes without having to fix what it breaks.
  • Unsure about who would want to use it.
  • Didn't want to fix my content when others changed it.
To recap, you are welcome to reuse the code. -- Strife (talk|contribs) 20:24, 6 November 2008 (UTC)

LSL Category Localization Template

Heyas! =)
It's me again... I wanted to ask for feedback/input on these two templates: German, French.
It would be supposed to easily provide unified localized LSL cats so translators wouldn't accidentally connect an article to a wrong category when they'd choose another translation for the same word. I implemented a small test version in Template:LSL Function/de, Template:LSL Event/de, Template:LSL Constant/de, Template:LSLC/de and Template:LSLGC/de. I tried about 5 different ways of implementing the template itself (without database-slaves) but they all failed due to either wiki limitations or parser function bugs (it worked well in the sandbox wiki). I'd like to try it in the German localization (can't break much content there at the moment...) and in case it works out fine, Gally would be willing to help me for the French implementation. Do you have any objections against the template (could it break something? slow the wiki down?) or input, thoughts, ...? Are there more templates besides the 5 I already altered, where I should pay attention to?
Greetz, Zai signature.png Lynch (talk|contribs) 00:35, 21 November 2008 (UTC)

I've given a lot of thought to slaves in the past (there was a time I wanted a centralized function/constant/event description lookup for the "Also..." section). The correct way to implement them is to have a slave for each letter, the advantage is that slaves can have slaves. If implemented properly the cost is very small. The problem however is that you have to be conscious of the format. If you want to change the format you have to change the entire DB. I believe the best solution is to version each of the entries. Now at this point you need to take a step back and ask "Am I reinventing the wheel?" And the answer is "Yes". Essentially what you want is a database where you can feed it a key and get the stored value pair.
There is of course another solution to this problem. Make all the Categories smart so they can be included (like the PRIM_* flags), and pass it a parameter that tells it to only return the foreign language category name you specify OR you could make a subpage like we do for the translation version (which would be really smart) and just have the lookup table there.
Anywho there are my initial thoughts on this. Last time I checked MW executes both sides of a conditional, so you need to make it so what is inside the conditional is not the template but just the name of the template (so it only executes text and not a template). -- Strife (talk|contribs) 01:42, 21 November 2008 (UTC)
Thx for the feedback =)
@Slaves: I didn't wanted to use any slaves for this. My goal was, to have all translations stored on one page so that only that one needed to be localized. Unfortunatly, the else-if chain exceeded the maximum depth allowed by the mediawiki. So I tried to break the chain into two chains and store a variable value in case the first chain didn't give a result, so the second chain starts. This works in the sandbox but not over here due to the nasty bug you mentioned as well. I also tried a recursive process where the template called itself with a value but the Wiki complained again (it doesn't like loops...). After two other work arounds failed too, I had to create the slaves to do the job... But I'm not really happy with that solution since it splits my database into 2. Splitting it further (for every letter) would erase one of the benefits: easy localization. I think the database (around 100 terms in worst case, usually less cause not all terms need a translation) is to small to justify that.
The smart cat version is a way I thought about too (and Gally had a similar idea to unify categories on translated subpages), but the problem with it would be again that it is a decentralized implementation. Someone who wants to begin with a new translation of the portal would have to edit all smart-cat pages instead of only one (or two) database pages. So I would consider this method in case it notably decreases the load on the Wiki. I don't know how computationally intensive it is for the Wiki to check the current database slaves. In case it's to much, I'd like the subpage-lookup best. With some preperation (collecting translations for more than one language, like done with the HP L10n) and then add them all when we got maybe 5 or 6 languages.
Zai signature.png Lynch (talk|contribs) 17:03, 21 November 2008 (UTC)
You would actually want to use "switch" instead of "ifeq", that said, you don't want to have a huge switch statement, it's not good for the wiki. Huge templates take a long time to execute (take a look at the templates on LSO, they take so long to rebuild that the connection times out and the wiki has a fit). Anyway you cut it, to add a new language would require duplicating the slave DB. It would not be fun. You may gain some centralization by having the Slave DB but to keep it from bringing the wiki to it's knees you won't have much. If we decide to forgo the centralization altogether and go with a system like the article versioning, we can solve several problems all at once that would have popped up as a result of having it in a DB. If we do it properly we can set it up like multi-lang with the articles in need of translation. Sure it would be a bear to setup for each language but the alternatives just don't scale or require maintenance to allow it to scale. -- Strife (talk|contribs) 04:25, 22 November 2008 (UTC)
Just to make sure that we're on the same page: I meant one DB (or X slaves) for each language. Not one DB for all languages. The German templates would only call the German DB, French only French, etc. So the maximum else-if depth got an upper bound at the count of LSL cats (worst case, when every cat has a translation other than cat/ISO-CODE) which seems to be something between 100 and 110.
That beeing said, I got to agree about the LSO article. I also checked the L10n lookup database and got to say that it needs like forever to load... Might be since I included it a hundret times in the table to verify that all translations work right and (since most of the translations are missing) it needs to run the else-if chain till the end. So it would only be included about 4 times on an average article I guess. Load would then be roughly ((current load)/100)*4 + (load of other templates).
So I think we'll go with the smart-cat-subpage-lookup? I'd then need a complete list of LSL cats to hand them out to linguists to translate. I think the table should be complete but I'm not 100% sure. For implementation we'd need to take care of the input format. French translations use "cat/fr" as input while Japanese and German translations just use "cat". So we'd either need to add these differences at the subpages (bad imho) or make the template unify the input before passing it to the lookup (better imho).
Zai signature.png Lynch (talk|contribs) 14:46, 22 November 2008 (UTC)
It won't be ((current load)/100)*4 + (load of other templates), it will be (current load)*4 + (load of other templates); there is no speed gain to my knowledge to a big switch statement (that I know of), it's O(N), not O(1). You probably don't want more than 25 items per slave, properly configured, it won't be much more costly then the slaves. -- Strife (talk|contribs) 01:27, 23 November 2008 (UTC)
Currently, the template is included about 100 times in the table. At an average article, it would be only included maybe 3, 4 or 5 times. So it would be ((the load of the 100 includes table) / 100) * (number of inclusions in the article). That is what I meant. Not the else-if depth or the switch.
Zai signature.png Lynch (talk|contribs) 01:37, 23 November 2008 (UTC)

MIA

Ouch, I hope you get yourself setup soon with a new job and computer, your a valuable member of the community and it would be somewhat depressing to lose you. I wish you good luck. --Nexii Malthus 10:53, 30 November 2008 (UTC)

What Nexii said... *adds home, job and PC to Santa's list for Strife, as well as a four leaf clover and a fresh polished horseshoe for the x-tra boost of luck*
Zai signature.png Lynch (talk|contribs) 13:37, 30 November 2008 (UTC)

It all basically means I can't write scripts, login to SL or do much template work (alignment gets funky at smaller than 100% zoom). -- Strife (talk|contribs) 01:31, 1 December 2008 (UTC)

take care... (o.O) hope you're one of them and we'll have you back soon. *hugz*
Zai signature.png Lynch (talk|contribs) 22:57, 21 December 2008 (UTC)

*Borrows a computer* for the moment things are ok, after the holidays things will be a mess... *hugs* -- Strife (talk|contribs) 17:04, 22 December 2008 (UTC)

Geek Award

LOL. That really makes my day. As to the inspiration... I got sick of having to manually double embed templates to avoid the call cost. I had been wanting a null/empty template so I could have an if on the template name and so nothing would get included... but then I'm like, why not a variable template? So I start to write it and I'm then like? What to name it... I know "Template". On review though, the null/empty template is the better idea. -- Strife (talk|contribs) 21:44, 10 December 2008 (UTC)

Glad you like it (^_^)
Can you explain why an empty template is reducing the load on the Wiki when you call it with a parser function as an argument? Has it got something to do with WEB-896?
Zai signature.png Lynch (talk|contribs) 22:45, 10 December 2008 (UTC)
Yep it has to do with WEB-896. Say you had the following code but you wanted it conditional:
{{ugly|ugly param1|ugly param2}}
The easy thing would be to just wrap it:
{{#if:{{{test|}}}|{{ugly|ugly param1|ugly param2}}}}
The problem is, Template:Ugly gets evaluated (and it effects #vars).
Lets look at this solution:
{{{{#if:{{{test|}}}|ugly|/dev/null}}|ugly param1|ugly param2}}
By putting the conditional around the name of the template, when the test fails it evaluates Template:/dev/null ... which does nothing, and with MediaWiki 1.12 template parameters aren't evaluated until they are first used by the template; so in this case, they are never evaluated. It gets us around the ugly problem of conditional templates getting called needlessly.
Historically I've used Template:! instead of /dev/null, for the only reason I hadn't gotten around to making the /dev/null template. This of course had it's own problems (specifically that it inserted a | (pipe character)). I'll probably start converting things over to /dev/null when I do template updates.
P.S. You nailed it on the head though, Template:Template is the result of me giving into my more nerdy tendencies. -- Strife (talk|contribs) 23:49, 10 December 2008 (UTC)
Oh I get it. Is really a pretty creative work around! Zai signature.png Lynch (talk|contribs) 03:01, 11 December 2008 (UTC)

Haha, nice award. Template:Template is definitely something interesting. --Nexii Malthus 02:11, 11 December 2008 (UTC)

Widgets

Kuraiko added the widgets extension to our sandbox and added your account to the widget editors group. So if you'd like to play arround with widgets in a sandboxed SLwiki-like environment in order to develop some for this Wiki, you can have a look there when you're back and got time and so... Keep in mind that parser functions are acting slightly different, but the rest should be the same and the content isn't so much outdated (maybe a few month old). Have fun =)
I hope it will all turn out well for you soon... oh btw: you got mail. Outdated though.
Greetz, Zai signature.png Lynch (talk|contribs) 02:10, 23 December 2008 (UTC)

Notecard campaign to M Linden

I have been distributing this notecard:

[If you agree, please remove this line, replace the signature below, and send to M]

M, 

Please hire Strife Onizuka; please read his user page: 

 http://wiki.secondlife.com/wiki/User:Strife_Onizuka

I don't know him personally, only through his volunteer work,
and I'm not related to him or interested in this any other
way than what I told Amber Linden at her volunteers office
hour this morning.

Would you please ask the Lindens in the HR department to read
https://wiki.secondlife.com/wiki/User:Strife_Onizuka and see if
he's ever applied, and if not, invite him to using his email
address on file, and if so, resubmit him to jobs
http://lindenlab.hrmdirect.com/employment/view.php?req=27066 and 
http://lindenlab.hrmdirect.com/employment/view.php?req=26066 ?

Thank you.

JS Uralia

JS Uralia 03:26, 30 December 2008 (UTC)