[00:03:17] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [+328] Update table (4 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642380637 [00:13:24] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( Another script update. Now properly parses the page's content. Not sure why it's not filling the object properly so that it can cycle through each element and get user data... ) ▶ https://en.wikipedia.org/w/index.php?diff=642381806 [00:18:01] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( My deferred object isn't running things in the order I'm specifying. :{ ) ▶ https://en.wikipedia.org/w/index.php?diff=642382308 [01:25:04] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [-462] Update table (2 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642389592 [03:05:22] T13|mobile, Technical_13: Tell me how you did so that all wm-bots talked in here, without being in the members-list... [03:07:11] hi [03:07:42] I was logged into the bot on labs as root. You can't do it, unless you get access to toollabs, petan adds you to the member list, and gives you root access. [03:07:45] like this ? [03:08:12] hi everybody : ) [03:28:06] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( use $.when().done() and return the object at end of each mw.Api() ) ▶ https://en.wikipedia.org/w/index.php?diff=642401429 [03:33:10] Technical_13: [[User:Krenair]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( (per irc request from user) ) ▶ https://en.wikipedia.org/w/index.php?diff=642401820 [03:40:52] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( Okay, just need to get userInfo now... Then I can tweek the results to be accurate. ) ▶ https://en.wikipedia.org/w/index.php?diff=642402402 [04:13:34] (late response) but they weren't in the channel...impossible... [04:15:55] Josve05a: Only if the channel is restricted to only accept messages from nicks in it. [04:16:22] ooh... [04:17:04] [23:16] == Channel modes on ##T13 are: +grz [04:17:28] : ) [04:19:15] whoa twitch.tv uses IRC for its chat window [04:19:23] that proves IRC isnt obsolete even yet [04:19:24] Really? [04:19:37] Hrmmm. [04:19:53] I wonder if I could access the chat window feed from my IRC client... [04:20:54] doesnt seem so. its a closed network [04:21:00] e.g. you have to log in through the web [04:21:08] so the fact that it's IRC doesnt really mean anything [04:21:28] oddly though, Twitch does seem to have its own IRC network [04:22:01] hmm maybe it is just regular IRC [04:22:04] http://help.twitch.tv/customer/portal/articles/1302780-twitch-irc [04:22:27] I dont see why theyd give all that info if it was just to control bots or something [04:24:41] Soapy: I learned that 2 years ago... [04:25:10] I used mIRC to do it... [04:27:01] you logged into twitch? [04:27:06] cool. so it can be done [04:27:34] it is 2015 [04:27:38] IRC is now 24 years old [04:27:58] and people, including me, have been saying it's obsoloete for at least 17 of those years/. And yet here we are [04:44:10] :P [04:44:14] I'm connected to a stream now. [04:44:28] There's not even a whois feature. [04:45:27] so it's not true IRC but its compatible [04:49:29] Basically. It Says it is still very new, some maybe they're still working on it. [04:52:06] There's apparently a chanserv, but it doesn't respond (not even to help) [04:53:19] <{soap|bed}> ok [04:57:44] <{soap|bed}> i wonder if thats how "raids" take place? probably not though since they still require you to have a name that is a twitch.tv account [04:58:07] lol I tried to /nick and it threw me out... lol [04:58:15] <{soap|bed}> there were a bunch of disrupters on my favorite twitch channel a few days ago [04:59:06] My fav channel gives out some TP point codes at the end of the lunchtime show on Wednesdays, they are always gone almost immediatly.. Now I know how they are scraping them so quick. [04:59:36] Pulling them from IRC and posting them to their accounts via a script or API apparently... [05:05:37] <{soap|bed}> TP point codes what is it? [05:05:42] <{soap|bed}> https://www.lotro.com/forums/showthread.php?534808-I-want-to-give-a-gift-of-TP-points <----- that? [05:05:54] Kinda [05:06:51] @link [[ddo:Turbine Point]] [05:06:51] http://ddowiki.com/page/Turbine_Point [05:06:57] :p [05:07:51] <{soap|bed}> ok [05:21:31] <{soap|bed}> -13F in Sanford Maine right now : ) [05:30:34] wow [05:41:22] You are root identified by name .*@wikimedia/Technical-13 [05:41:22] @whoami [05:42:17] !user [05:42:17] There is no such key, you probably want to try: !1CA, !css-import, !Gadget-codeAnchors, !Gadget-codeBacklinks, !Gadget-listStyles, !mySULinfo, !SULinfo, [05:42:25] !whoami [05:42:25] * wm-bot4 thinks you are Technical_13!.*@wikimedia/Technical-13 [05:43:44] !username [05:43:44] There is no such key, you probably want to try: !mySULinfo, !SULinfo, [05:43:45] Your username/ident is 4cb2f17f [05:44:53] !decode 4cb2f17f [05:44:54] Hex string '4cb2f17f' decodes to '76.178.241.127', which resolves to 'cpe-76-178-241-127.maine.res.rr.com'. [05:49:54] !username [05:49:54] There is no such key, you probably want to try: !mySULinfo, !SULinfo, [05:49:54] Your username/ident is ~{{Guy}} [05:49:54] http://enwp.org/Template:Guy [05:50:10] Lol oh yeah. Duh [06:04:28] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( Okay... I am going to do this for now... ) ▶ https://en.wikipedia.org/w/index.php?diff=642415183 [06:34:04] Technical_13: [[User:Technical 13]] created [[User:Technical 13/Scripts/UpdateMailingList.js]] (new page Nested version that almost works... ) ▶ https://en.wikipedia.org/w/index.php?title=User%3aTechnical+13%2fScripts%2fUpdateMailingList.js [07:09:26] !phonenumbee [07:09:31] !phonenumber [08:39:06] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [-329] Update table (1 request) ) ▶ https://en.wikipedia.org/w/index.php?diff=642427328 [09:19:54] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [+393] Update table (2 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642431314 [09:55:36] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [-393] Update table (1 request) ) ▶ https://en.wikipedia.org/w/index.php?diff=642434237 [11:01:58] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [+349] Update table (2 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642439016 [11:47:54] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [-349] Update table (1 request) ) ▶ https://en.wikipedia.org/w/index.php?diff=642442677 [12:18:31] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [+349] Update table (2 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642445118 [12:49:20] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [-349] Update table (1 request) ) ▶ https://en.wikipedia.org/w/index.php?diff=642447787 [14:52:41] Technical_13: [[User:Addshore]] modified [[Wm-bot]] ( /* Support */ phab not bz ) ▶ https://meta.wikimedia.org/w/index.php?diff=10952652 [16:19:12] Much cabal. [16:19:18] T13|needsCoffee: What I can do for you? [16:19:43] [[User:Technical 13/SandBox/UpdateMailingList.js]] [16:19:43] http://enwp.org/User:Technical_13/SandBox/UpdateMailingList.js [16:20:33] I can't get the last function to process and return all the data before the console.info is done to see results. [16:20:35] There is currently no text in this page. [16:21:22] Try again [16:22:26] [[User:Technical 13/Scripts/UpdateMailingList.js]] has almost the same problem, only it is the calls nested instead of deferred. [16:22:26] http://enwp.org/User:Technical_13/Scripts/UpdateMailingList.js [16:22:59] !rights marktraceur [16:23:00] I could not find any rights for the username "marktraceur". [16:23:04] T13|needsCoffee: The last function doesn't return a promise. [16:24:50] Did I mention I suck at callbacks/promises/deferred objects because I just haven't been able to understand them? I was told $.when.apply( $, listOfStuff ) might work, but I don't understand that either or how to adapt examples I've seen. [16:25:03] Heh [16:25:30] At least I'm honest... [16:25:46] T13|needsCoffee: Make a new promise for every user you're updating, add it to an array, and at the end of the function return $.when( myArrayOfPromises ) [16:26:25] Can you show me with that function? [16:26:43] T13|needsCoffee: At the top, var promises = []; [16:26:55] If I see it, I'm sure I can adapt it for other places I need a similar effect. [16:27:04] T13|needsCoffee: Add promises.push( ... ) wrapping your mw.Api.get statements in the for loop [16:27:15] T13|needsCoffee: At the bottom return $.when( promises ) [16:28:47] So, the promises.push should wrap the whole if..else statement? [16:28:53] No [16:29:02] T13|needsCoffee: There should be two promises.push-es [16:29:11] T13|needsCoffee: One in the first if block, the second in the else block [16:29:21] T13|needsCoffee: It's pushing the promise returned from mw.Api.get() into the array [16:29:30] Er sorry else if* [16:30:29] Kk. [16:31:33] Oh, wait. [16:31:36] It doesn't take arrays [16:31:38] What's the point [16:31:40] There are two mw.Api in the else if. [16:33:13] T13|needsCoffee: Yes, wrap both with the push() call [16:33:34] T13|needsCoffee: You'll need to do something like return $.when.apply( $, promises ) at the end [16:33:56] Because it doesn't accept arrays. [16:35:30] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( with help from marktraceur on irc ) ▶ https://en.wikipedia.org/w/index.php?diff=642472180 [16:35:45] Like that? [16:37:26] T13|needsCoffee: return $.when.apply( $, promises ); [16:37:28] I'm missing a )... [16:38:54] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( return and remove a stray ; ) ▶ https://en.wikipedia.org/w/index.php?diff=642472614 [16:39:11] Returns null [16:40:13] Ugh. [16:41:16] Cleared the cache and now get expected expression, got if... guess each mw.api in the else if needs its own push.. [16:41:51] How will that work? [16:42:29] Do I need a separate array for that chunk and nesting? [16:42:44] marktraceur: ? [16:44:13] Wait. [16:44:41] T13|needsCoffee: What's wrong with it now? [16:44:50] I didn't understand what you said [16:45:30] Open my sandbox list page for it. [16:45:47] importScript in the console [16:46:08] Line 174 expected expression found if [16:51:28] T13|needsCoffee: Put the push inside the if [16:51:32] You can't push an if statement [16:52:11] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/MLsand]] ( add footer and delimiters for script. ) ▶ https://en.wikipedia.org/w/index.php?diff=642474337 [16:52:19] Wait. [16:52:26] lol [16:52:27] It looks like you copied the code for some reason [16:52:39] Copied? [16:53:15] OH. [16:53:26] T13|needsCoffee: OK, put the promises.push() call inside the if statement [16:53:39] T13|needsCoffee: Then just push the other mw.Api.get() call the same way [16:53:48] I didn't realize there were two gets in the else if [16:53:58] One request gets the timestamp for when the page was created and the other gets the last edit [16:54:03] Got it. [16:54:35] They actually look the same [16:56:02] Still not working. :frustrated: [16:56:27] They are the same except one has rvdir:newer [16:57:07] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( updating ) ▶ https://en.wikipedia.org/w/index.php?diff=642475635 [16:57:24] Got it. [16:58:58] T13|needsCoffee: Now I think it's failing for unrelated reasons [16:59:15] Your regex looking for {{Mailing list member seems to be returning null. [16:59:38] That part is working. [17:00:04] I'm just on the wrong page [17:00:35] Works for me! [17:00:38] Try clearing the cache? [17:01:06] lastactive is false, but it's not nothing [17:01:18] Or null...hm [17:02:05] I tried in a completely diff browser and it's not updating all info. [17:02:51] I'm not even seeing those API requests go out, I think [17:03:01] Correct [17:03:22] Oh, herp [17:03:33] T13|needsCoffee: You need to run userInfo() after getEditors() [17:04:24] So do getEditors().then( function () { return parseList(); } ).then( function () { return userInfo(); } ).done( function () { ...} ); [17:05:19] Sorry I didn't pay attention to where the data was coming from :) [17:05:26] Let me see if I understand... [17:05:49] T13|needsCoffee: You were running all three in async mode, you need them to run one after the other. [17:06:25] There's probably something to be said about passing the data returned from each one into the resolve() call instead of a global. I won't say it. Oops, I already did. [17:08:15] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( marktraceur ... like this? ) ▶ https://en.wikipedia.org/w/index.php?diff=642478327 [17:09:09] Wait, what? [17:13:29] T13|needsCoffee: That can be the next lesson, this should work for nowe [17:13:30] now. [17:14:12] It's not... well.. not completely, but that might be my logic. What do you mean global? [17:15:49] Didn't declaring the obj up top like I did make it a global? [17:15:53] T13|needsCoffee: You have mlmInfo as a global, yes [17:16:10] T13|needsCoffee: The Promise Way would be to pass the info from one promise to the next, but this should work anyway [17:16:39] So, how would I do it passing as a promise? [17:16:54] Well [17:17:34] T13|needsCoffee: In the getEditors function, you'd do your processing on a local object in the done() callback, and return that. [17:17:44] Actually you'd need to use a .then() instead of .done() [17:17:53] Then parseList would get it as an argument [17:18:10] Then you could do more processing on it in parseList, and return the result from parseList's .then() [17:18:24] And then userInfo() gets that as an argument. [17:18:40] But that shouldn't affect it that much [17:19:44] Isn't that kinda of what the nested version did? [17:19:50] Kinda, except with globals [17:19:56] Wait, nested version? [17:20:11] If that's something that existed before you asked for help, I don't know it [17:20:29] Oh, wait. [17:20:53] T13|needsCoffee: You might need to switch to .then() anyway, it may be running the last .done() callback before the ones you set in the functions [17:22:08] Maybe I can take a pass at this after my meeting? [17:22:37] ...s [17:23:59] Sure. :) [17:56:00] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/TPERTable]] ( [+376] Update table (1 request) ) ▶ https://en.wikipedia.org/w/index.php?diff=642484184 [18:06:15] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/TPERTable]] ( [-376] Update table (0 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642485422 [18:09:23] T13|needsCoffee: Didn't think this through, I can't edit your pages [18:09:31] I'll copy it locally and pastebin maybe [18:10:53] Copy it to the doc page [18:11:14] Or make a copy in your userspace [18:11:17] :) [18:12:03] Ugh, spaces for indentation [18:12:09] My mediawiki developer senses are screaming in pain [18:13:03] If you do it on the doc page, can test in console with mw.loader.load( '...&action=raw&ctype=text/javascript' ); [18:13:26] Indentation? I use tabs. :p [18:14:09] It's the default in notepad++ [18:14:24] Weird [18:14:29] I'll replace spaces with tabs then [18:15:10] !coffee [18:15:10] Get your own friggin' coffee! [18:15:10] * Helpmebot pours T13|needsCoffee a cool cup of ice coffee with cream and sugar. [18:15:26] Wait [18:15:38] Why aren't you cloaked? [18:15:46] I'm cloaked. [18:16:47] Oh. Not a wm cloak [18:17:13] Do you have permissions on Helpmebot and wm-bot? [18:17:27] I...may have permissions in -helpers [18:19:50] !myaccess [18:19:52] You are root identified by name .*@wikimedia/Technical-13 [18:19:52] @whoami [18:19:52] T13|needsCoffee!~{{Guy}}@wikimedia/Technical-13 has the access level: Superuser [18:19:52] http://enwp.org/Template:Guy [18:21:13] !ping [18:21:13] !ping [18:21:14] Pong. [18:21:14] Pong. [18:23:18] T13|sleeps: Try https://en.wikipedia.org/wiki/User:MarkTraceur/SandBox/UpdateMailingList.js [18:23:28] T13|sleeps: I'm not really sure what a success looks like... [18:25:47] Inspect the Techncial 13 object inside the mlmInfo object. [18:26:50] Blocked should have an epoch style number, so should joined and lastactive. [18:27:12] Notarget should be false [18:27:55] Groups[] should have two indexs, '*' & 'user' [18:32:28] Can I merge some of my userInfo requests into batches to reduce api calls? [18:33:01] I bet that would help? [18:33:22] !userinfo MarkTraceur [18:33:24] https://en.wikipedia.org/wiki/User:MarkTraceur https://en.wikipedia.org/wiki/User_talk:MarkTraceur https://en.wikipedia.org/wiki/Special:Contributions/MarkTraceur https://en.wikipedia.org/wiki/Special:Log%3Ftype%3Dblock%26page%3DUser:MarkTraceur Groups: user, autoconfirmed Age: 1064.01:05:34.4986780 Registered:02/15/2012 17:27:49 Count: 384 Activity:0.360886810029882 [18:35:09] Dang it.. My mobile client keeps crashing. [18:35:28] Did you get any of what I said marktraceur ? [18:35:35] !userinfo MarkTraceur [18:35:36] https://en.wikipedia.org/wiki/User:MarkTraceur https://en.wikipedia.org/wiki/User_talk:MarkTraceur https://en.wikipedia.org/wiki/Special:Contributions/MarkTraceur https://en.wikipedia.org/wiki/Special:Log%3Ftype%3Dblock%26page%3DUser:MarkTraceur Groups: user, autoconfirmed Age: 1064.01:07:47.1556540 Registered:02/15/2012 17:27:49 Count: 384 Activity:0.360886289283192 [18:37:20] Technical_13: I did [18:37:28] !logs [18:37:28] http://tools.wmflabs.org/wm-bot/logs/index.php?display=%23%23T13 [18:37:29] https://en.wikipedia.org/w/index.php?title=Special:Log&page={0} [18:37:39] let me get what you might have said... [18:37:55] I didn't say anything, I'm in a meeting :) [18:38:50] Oh, I thought you were done. [18:39:03] in -office? [18:39:54] No, in google hangouts [18:45:09] T13|sleeps: I disagree, https://en.wikipedia.org/w/index.php?title=User:Technical_13/SandBox/MLsand&action=edit [18:45:21] T13|sleeps: The blocked value doesn't exist on any of the users [18:45:45] !blockinfo Techncial_13 [18:45:46] Block 4415355 targeting Techncial 13 blocked by Nick for infinity starting at 2013-07-03T11:27:44Z because {{checkuserblock-account}} Flags: NOCREATE AUTOBLOCK [18:45:46] http://enwp.org/Template:checkuserblock-account [18:45:54] Yes, it does. [18:46:02] Oh, from the API [18:46:07] I'm looking in the wrong place [18:47:56] So, for that user, it should be `blocked: 1372850864000` [18:49:52] getEditors should return `blocked: false`, then parseList shouldn't change it, then userInfo should make it `blocked: 1372850864000` [18:50:07] Technical_13: Maybe Date.parse( 'infinity' ) is breaking it. [18:50:10] I think that's probably why [18:50:22] Oh, no. [18:50:24] Never mind. [18:50:43] Yeah, it should be parsing the timestamp, not the expircy [18:50:43] why would it be... [18:50:55] lol [18:50:57] It's not [18:51:01] I'm having trouble tracing a bit. [18:51:16] For that user... [18:52:31] OH LOL [18:52:32] SCOPE [18:52:43] getEditors should return: `Techncial 13: { blocked: false, extras: '', groups: [], joined: Date.parse( mlRevisions.query.pages[ pageid ].revisions[ u ].timestamp ), lastactive: false, notarget: false, status: 'edited', type: 'user' }` [18:52:52] First I'm going to fix it, then I'm going to tell you the silly mistake you made. [18:53:06] Yes, please tell me the silly mistake. [18:54:03] Actually... getEditors shouldn't add that at all... parseList should and status should be 'listed' [18:54:15] Technical_13: Hush, you're on the wrong track [18:54:47] Hm... [18:54:49] Damn it. [18:54:53] That's *one* of the problems [18:54:56] * Technical_13 goes to stir his frozen chop suey and put it back in nukulator for 3 more minutes... [18:55:36] Technical_13: When you do a for loop in JavaScript, and you update a variable outside of the forLoop, like thisUser, then every call to thisUser uses that new value. [18:55:48] So you were updating ShoeMaker with the information of every user [18:56:00] Now that's fixed at least, but still no blocked timestamp [18:56:39] Wait, what? [18:56:45] It's a classic mistake to do for ( i in list ) { asyncWithCallback( function () { list[i].blah = true; } ); } [18:57:20] "Updating information for: Technical 13" index.php:127 "Updating information for: Technical-13" index.php:127 "Updating information for: Techncial 13" index.php:127 "Updating information for: T13bot" index.php:127 "Updating information for: ShoeMaker" index.php:127 [18:57:21] i will always be the last entry in the list [18:57:33] It seems to update thisUser with every iteration... [18:57:36] Sure, that worked, because the console.log call is outside of the callbacks [18:58:24] GET http://en.wikipedia.org/w/api.php [HTTP/1.1 200 OK 110ms] GET http://en.wikipedia.org/w/api.php [HTTP/1.1 200 OK 160ms] GET http://en.wikipedia.org/w/api.php [HTTP/1.1 200 OK 170ms] GET http://en.wikipedia.org/w/api.php [HTTP/1.1 200 OK 190ms] GET http://en.wikipedia.org/w/api.php [HTTP/1.1 200 OK 180ms] [18:58:34] Those all show the different users too... [18:58:46] I'm confused. [18:59:07] *shrug* it wasn't working for me, anyway [19:00:07] I will say that ShoeMaker is the only one with a groups array, but it is the array that belongs to T13bot [19:01:10] That's correct. [19:01:22] Oh, right, 'cause the API queries get fired before the callbacks too [19:01:26] That all happens in synch mode. [19:01:31] But when it goes async you get fucked [19:01:44] Aha. [19:01:54] But how do I fix it? [19:01:54] and it is marked as bot with notarget = true which means it processed that one last (alphabetically, it would be I guess). [19:01:55] * Technical_13 goes to stir his frozen chop suey and put it back in nukulator for 3 more minutes... [19:01:56] Technical_13: Second silly mistake, apparently Date.parse doesn't do what you think it does [19:02:31] Technical_13: See https://en.wikipedia.org/wiki/User:MarkTraceur/SandBox/UpdateMailingList.js for a working version [19:03:25] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse The parse() method takes a date string (such as "Dec 25, 1995") and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC. [19:03:44] Technical_13: But an ISO 8601 string can go right straight into new Date() [19:04:01] Do not pass parse, do not collect 200 errors. [19:05:22] "Dec 25, 1995" is not in the same category as "1995-12-25T00:00:00Z" [19:05:49] Oh, you want the seconds since the epoch. Well that's fine, add a getTime call or something I think [19:06:20] "Dec 25, 1995" is more likely to be found when parsing the {{Mailing list member|user=foo|blocked=Dec 25, 1992}} template. [19:06:20] http://enwp.org/Template:Mailing_list_member [19:06:36] Ah. [19:06:40] Well...you could try both [19:06:54] I need the seconds since epoch to be able to compare and see which one is older or newer depending on the case. [19:07:03] Technical_13: Just put a check, see if Date.parse is null, if it doesn't work, try new Date().getTime() [19:07:16] Technical_13: Actually Date objects are comparable I think [19:07:46] Even with integers [19:07:50] So you can mix and match [19:11:00] if ( Date( 'Dec 25, 1995' ) === Date.parse( '1995-12-25T00:00:00Z' ) ) { alert( 'true' ); } else { alert( 'false' ); }// returns false [19:12:12] alert( Date( 'Dec 25, 1995' ) + ' + ' + Date.parse( '1995-12-25T00:00:00Z' ) );// returns Wed Jan 14 2015 14:11:22 GMT-0500 (Eastern Standard Time) + null [19:13:19] Wed Jan 14 2015 14:12:58 GMT-0500 (Eastern Standard Time) + 819849600000 is what I get when I'm not on Wikipedia... [19:13:55] still get false for first one. [19:15:55] Okay, I think that it's just what I'm returning that is off now... Let me work on that. It is updating from the API, I'm just not getting what I expect back... [19:16:23] * Technical_13 goes to get his hot lunch... [19:18:39] Technical_13: You can use Date.parse for template-sourced dates, and new Date for API-sourced ones, maybe. [19:18:45] Technical_13: Or just try both and see which one works. [19:23:06] So, you used an $.each() instead of a for in? I thought $.each() could only be used on arrays and objects didn't work... *sigh* Okay. [19:24:02] What do the return $.Deferred().resolve(); do exactly? [19:26:34] Technical_13: Just ends the promise. [19:26:39] It mayyyy not be necessary. [19:26:41] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( updated per [[User:MarkTraceur/SandBox/UpdateMailingList.js]] ) ▶ https://en.wikipedia.org/w/index.php?diff=642494935 [19:46:31] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( Change date format to seconds since epoch ) ▶ https://en.wikipedia.org/w/index.php?diff=642497517 [19:53:34] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( This should fix most of the stuff being returned as null... ) ▶ https://en.wikipedia.org/w/index.php?diff=642498401 [20:07:53] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( This returns all the correct information for each user on [[User:Technical 13/SandBox/MLsand]]. Time to save and step it up and test on [[Wikipedia:WikiProject Userboxes/Members]] ) ▶ https://en.wikipedia.org/w/index.php?diff=642500378 [20:08:00] Mark [20:08:08] marktraceur: ^^^ [20:08:13] :D [20:08:56] T13|sleeps: Working now? :) [20:09:47] It did on my little test page. [20:10:01] Timing out on a much larger list. :/ [20:11:57] Ran on second try, but didn't give my object back.. :/ [20:12:34] Aw. [20:12:42] T13|sleeps: Maybe run the API calls one at a time. [20:12:49] Or some number at a time. [20:13:14] Can I batch them? 50 names per call? [20:13:25] 'cause right now, if you have 1000 list items, you send 1000 API calls all at once [20:13:36] T13|sleeps: You should be able to, it'll take some creativity [20:14:00] If I can, that'll cut 1000 down to 20. [20:14:43] Hm. [20:15:01] T13|sleeps: It'll still probably need to be different requests per user, but you can do 50 at a time, or less [20:15:28] It looks like just the last 20 are `(canceled)` which I'm guessing is Chrome's wat of saying timeout. [20:17:30] Batching them multiple users per query is Disabled due to miser mode [20:17:32] I see [20:19:25] Technical_13: [[User:AnomieBOT]] modified [[User:AnomieBOT/PERTable]] ( [+396] Update table (2 requests) ) ▶ https://en.wikipedia.org/w/index.php?diff=642501858 [20:22:27] marktraceur: What about using Maximum lag can be used when MediaWiki is installed on a database replicated cluster. To save actions causing any more site replication lag, this parameter can make the client wait until the replication lag is less than the specified value. In case of excessive lag, error code "maxlag" is returned with a message like "Waiting for $host: $lag seconds lagged". See https://www.mediawiki.org/wiki/Manual:Maxlag_parameter [20:23:48] Hm. [20:23:58] I don't know if that's the problem [20:26:12] can we add a .fail() and have it pause a second or three and try again? [20:27:01] Hm, maybe [20:27:07] But you might as well batch them first [20:27:37] Okay. [20:27:54] How might I go about that? [20:28:21] [[Wikipedia:WikiProject Userboxes/Members]] is my large list test page... [20:28:21] http://enwp.org/Wikipedia:WikiProject_Userboxes/Members [20:28:51] It's got all kinds of little nuances in it. Like people who added their name wrong, blocked people, people with `extras` aka comments... [20:30:23] I spent like two and a half hours a couple days ago converting it from a list of signatures to use {{Mailing list member}} manually... [20:30:23] http://enwp.org/Template:Mailing_list_member [20:31:12] Technical_13: Have userInfo only do 20 at a time (or whatever), then if there are more users, fire another userInfo call and return that promise instead of the default. [20:31:27] Use an offset or something to make sure you don't do the same requests every time [20:31:28] Once I get all the data collection working correctly, then I get to spend a couple days working on the interface to be able to select which attributes to apply back to the updated list. :) [20:32:15] Hrmm. [20:35:44] That means I need to change the $.each() ? [20:36:55] Hm. [20:36:58] Sort of, yes. [20:38:55] var offset = 0;while(offset <= mlmInfo.length){for(var i =0; i < 20;i++){ ...api call ... } offset += 20;}// kind of like that? [20:42:05] Would that be able to work and know which index I'm on? [20:42:56] Would I have to use a named offset based on the keynames? [20:44:01] Would I have to create an array and put each of the elements of the object in there so they could be consistently numbered? [20:46:35] Successfuly added .*@fsf/member/marktraceur [20:46:35] @trustadd .*@fsf/member/marktraceur operator [20:46:47] !accesslist [20:46:48] http://helpmebot.org.uk/wiki/Special:AccessList [20:48:12] There. You have some access in here now.. :) [20:57:44] 663 requests on that page... [21:07:26] Nope, that doesn't work... [21:10:58] I have another idea.. let me try... [21:16:33] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( marktraceur this seems to work for batching, although, I don't seem to be getting expected results back... ) ▶ https://en.wikipedia.org/w/index.php?diff=642509535 [21:17:08] I'm guessing that is becuase it isn't passing the name through again... [21:17:19] But, I'm not exactly sure how to fix that... [21:23:25] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( Okay, this gets all the names and seems to batch them up, except now I get a `Uncaught TypeError: Cannot set property 'groups' of undefined` error for each name... ) ▶ https://en.wikipedia.org/w/index.php?diff=642510349 [21:36:32] marktraceur: You still here? [21:36:39] Yup [21:36:51] I had batching kind of working, but I seem to have lost that... [21:36:59] Looking [21:37:34] Technical_13: for loops don't have a separate scope in JavaScript [21:37:37] Stop doing that. :P [21:37:37] The version I saved had batching working (with a number of 20, 50 failed because there were still to many.. [21:38:04] Okay. How do I fix it? :p [21:38:18] Technical_13: When you do for (...) { var thisUser = ... } it's the same thing as doing var thisUser; for (...) { thisUser = ... } [21:38:29] So when you finish the for loop and your variable is set to the last username [21:38:34] The callbacks all call with that name [21:38:53] Technical_13: Either use a closure and pass in the username in the loop but outside of the callback, or use $.each [21:38:59] Wait, let me update, I got the names right, but lost the batching effect... [21:39:14] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( names right, lost batching effect. ) ▶ https://en.wikipedia.org/w/index.php?diff=642512427 [21:41:18] Which would be more efficient? [21:41:34] $.each doesn't allow batching. [21:42:47] As far as I can tell, Unless I break the object into a bunch of little objects and do a $.each for each one.. [21:44:01] The alternative best I can see, is to break the actual api call into it's own function and put the loops in another and just call the api on a time delay for each request. [21:44:13] I really think that there has to be a better way. [21:44:50] I'm having such a hard time adapting to the synchronous javascripting from the old asynchronous... *sigh* [21:45:25] I really wish they'd offer an advanced js course someplace that taught this stuff hands on... [21:45:35] Technical_13: You could use $.each with a slice of the array [21:45:39] * Technical_13 calls his program coordinator... [21:45:54] a slice? hrmmm. Hadn't thought of that... [21:46:25] What would that look like. I understand the concept, just can't visualize how to put it to gether. [21:47:31] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( back to a version that worked on short lists... ) ▶ https://en.wikipedia.org/w/index.php?diff=642513596 [21:48:55] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/UpdateMailingList.js]] ( Works on small lists.. Developing for larger lists in SandBox... ) ▶ https://en.wikipedia.org/w/index.php?diff=642513783 [21:53:41] I could use this batching function in [[User:Technical 13/Scripts/ACCHelp/Creation log.js]] which times out sometimes too... [21:53:41] http://enwp.org/User:Technical_13/Scripts/ACCHelp/Creation_log.js [21:53:53] Technical_13: You'd pass the full array along, then $.each( mlmInfo.slice( offset, offset + 20 ), function ( ... [21:57:26] How do I define this user? offset or this? [21:57:45] or $( this) [21:59:01] wait... [21:59:13] function ( i ) then offset + i [21:59:16] okay.. [22:00:21] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( `Uncaught SyntaxError: Unexpected identifier` save it and run the code on a page in debug=true to find out where... ) ▶ https://en.wikipedia.org/w/index.php?diff=642515272 [22:03:02] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( marktraceur --- Okay... I think this ''should'' work... ) ▶ https://en.wikipedia.org/w/index.php?diff=642515619 [22:04:10] * sigh * Gets to Updating user information and dies.. [22:09:09] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/SandBox/UpdateMailingList.js]] ( I dunno... I've had enough for today of this script. ) ▶ https://en.wikipedia.org/w/index.php?diff=642516339 [23:03:37] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/OneClickArchiver.js]] ( Blocked editors can't archive talk pages... ) ▶ https://en.wikipedia.org/w/index.php?diff=642522547 [23:14:08] Technical_13: [[User:Technical 13]] modified [[User:Technical 13/Scripts/OneClickArchiver.js]] ( Yeah, that breaks the script because block is undefined if you are not blocked. Not worth it at this point. ) ▶ https://en.wikipedia.org/w/index.php?diff=642523659