[00:25:21] <{{Technical_13}}> @link [[en:User:Technical 13/Scripts/UpdateMailingList.js]] <~~ can someone help me understand why the deferred object isn't doing the tasks in the order I specified? I'm befuddled. [00:25:21] http://enwp.org/User:Technical_13/Scripts/UpdateMailingList.js [02:01:32] is it weird I still use Monobook for English Wikipedia? Do people like me give the devs headaches? :) [02:02:31] yes [02:03:04] (it's weird, not sure if it causes headaches) [02:03:25] (I didn't have to deal with it recently) [02:04:44] Magog_the_Ogre: not weird, I use monobook everywhere :) [03:03:00] Is there anyone that can help me figure out why https://en.wikipedia.org/wiki/User:Technical_13/Scripts/UpdateMailingList.js isn't completing the api queries before moving on to the next step.. I really don't want to have a lot of nesting... [03:05:12] Technical_13, what are you doing at the end there with .done? [03:05:48] once the section before is done, then do next section. [03:06:00] you resolve it so it starts running stuff? [03:06:17] Yes [03:06:29] the resolve() initaties the sequence [03:08:29] Technical_13, those functions return as soon as they start their requests [03:09:04] I'm horrible with promises, callbacks, and deferred objects... *sigh*... The raw code works flawlessly when I do it nested... [03:11:58] Technical_13, I guess you could do $.when( getEditors(), userInfo() ).done( function () { console.log( mlmInfo ); } ); then have getEditors and userInfo return the deferreds they generate... [03:12:19] or promises, in this case [03:13:10] So, use $.when() instead of $.Deferred().done()? [03:13:27] I'll try it.. [03:13:41] they are not the same thing [03:16:29] Krenair: I get the same result. [03:16:40] Object { User:Technical_13/SandBox/MLsand: Object } [03:17:01] When I click on object, all the names are in there (I'm testing in console on https://en.wikipedia.org/wiki/User:Technical_13/SandBox/MLsand ) [03:17:16] edit the new source into the page [03:17:32] It's not updating the information with userInfo, because it's not finding any names in the object when it gets there. [03:18:06] $.when( getEditors(), parseList(), userInfo() ).done( function() { /* show result */ console.info( mlmInfo ); } ); [03:18:33] Rest of the functions are unchanged. [03:19:45] I really wish I could get a handle on this whole promise deferred thing... It drives me nuts sometimes. [03:21:19] 31<Krenair>30 then have getEditors and userInfo return the deferreds they generate... [03:21:32] and parseList if you're using that again now [03:23:47] What do you mean have them return the deferreds? like an actual return statement in each? [03:24:05] they do need to return deferreds to go into $.when, yes [03:24:08] otherwise it makes no sense [03:28:29] Krenair: Like:28] <+wm-bot4> 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:29:16] no, not at all [03:29:35] * Technical_13 cries with frustration. [03:30:08] Can you show me what you mean by updating getEditors() and I'll see if I can figure out the rest based on that? [03:30:16] every function you have inside .done will not get run until later [03:31:25] (at least, with requests like this which won't be instantly resolved) [03:31:40] so you can't change the return value of your getEditors function by altering stuff in .done [03:33:50] oh... [03:33:53] I see. [03:34:22] That makes sense too, kind of. [03:34:29] let me try it... [03:36:08] userInfo will not be as simple because you appear to be making several requests there [03:36:20] you want to wait for all of them [03:36:32] Hrmm. Well, my object doesn't look empty at the end anymore... But, they're not getting returned before userInfo... [03:36:34] Yes. [03:37:27] update the page you linked with your current code [03:41:06] :41] <+wm-bot4> 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 [03:54:05] Krenair: ^ [03:54:42] okay I saw that bit [03:54:55] I haven't been testing this but it looks more likely to do what you want [03:54:58] Could I return a counter and have it wait until the counter = the length of the object to return? [03:58:46] declare usersUpdated = 0; at the top of the page, then do a usersUpdated++; at the end of each for loop [04:02:16] you could keep a list of the promises and then return $.when.apply( $, listOfPromises ) [04:03:02] keep a list of the promises? documentation? apply? googling... [04:11:12] yeah so the idea is that your final promise only resolves when they're all done [04:12:35] check https://www.google.co.uk/search?q=%24.when.apply [04:14:26] :\ Note: Most browsers, including Chrome 14 and Internet Explorer 9, still do not accept array-like objects and will throw an exception. [04:14:57] context? [04:15:04] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply [04:15:41] I don't think that should get in your way here. [04:21:10] Krenair: Maybe it's just that it's so late and I'm tired, but none of that makes much sense to me atm... [04:24:44] Technical_13, I need to go. good night [04:25:54] Good night. [07:21:36] hi! Is there an API way to obtain a file from Commons at arbitrary thumbnail size? [07:22:12] yes [07:22:25] let me just find out how [07:22:37] MatmaRex: oh thanks! [07:27:06] abartov: hmm. or maybe you can't D: [07:27:41] abartov: you can, however, go to /w/thumb.php to get a thumbnail. https://www.mediawiki.org/wiki/Manual:Thumb.php#Details [07:28:48] MatmaRex: thanks! I feel better for not having just failed to find a way. :) [07:31:20] MatmaRex: what do you know of JavaScript promises and deferred objects? [07:32:32] T13|sleeps: enough to use them, but i don't know the answer to the question you asked earlier today (or don't understand the quesiton itself) [07:32:53] Okay. Thanks [07:33:46] Hopefully I can find someone tomorrow that can guide me to a better understanding. :) [07:34:40] Any suggestions for someone I might be able to ping for that? [07:46:37] [[Tech]]; ArchiverBot; Bot: Archiving 1 thread (older than 30 days) to [[Tech/Archives/2014]].; https://meta.wikimedia.org/w/index.php?diff=10950738&oldid=10931093&rcid=5855652 [08:11:53] hoo: hoohoo! [08:13:53] hey :) [15:21:38] bugzilla down [15:21:59] *phab i mean [15:22:16] meh. back. [15:24:08] Steinsplitter: intentional, see https://www.mediawiki.org/wiki/Phabricator/Maintenance [15:24:44] :) [15:24:54] and if you want a redirect or not can be discussed in https://phabricator.wikimedia.org/T86114 :P [17:40:36] Phabricator has "Performance issues" [17:40:49] Oh? [17:41:09] Reedy: https://status.wikimedia.org/ [17:41:23] I wouldn't trust that too much [17:41:26] It was down for maintenance [17:41:42] I underestand [17:41:56] Your connection is not private [17:41:56] Attackers might be trying to steal your information from status.wikimedia.org (for example, passwords, messages, or credit cards). [17:43:00] Wilfredor: that's in history section [17:43:00] not current [17:43:16] An insecure connection is a way of distracting to protect the information that really matters [17:44:05] Glaisher: I underestand that like a history issue yes [17:44:10] Glaisher: thanks [17:44:25] Note, that WMF don't host status.wm.o [17:44:54] Right now Migration is completed [17:47:16] What is the better way to search all images with small size, no exif data and self in Wikimedia Commons py [19:23:02] Hmm, top of https://www.mediawiki.org/wiki/Special:Notifications?debug=true looks ugly in FF34 (icons way lower than text) and JS console shows a wonderful line with just one colon, pointing to https://bits.wikimedia.org/static-1.25wmf14/extensions/EventLogging/modules/ext.eventLogging.core.js :222 [19:23:23] I have CPB enabled; seems to be broken on that page [19:23:48] and the red notification does not go away either. sigh. [19:24:24] * andre__ should probably create a bug report after this meeting... [19:25:09] andre__: try disabling adblock? [19:25:20] wild guess, but it caused issues with eventlogging tings in the past IIRC [19:25:22] uh, hah, true! [19:25:31] I think I even saw a bug report about that, thanks! [19:25:39] * andre__ already a bit braindead this evening [19:26:07] yes, bingo [21:58:00] mw.o DB lagged and read-only :o [23:27:23] What is this request, which Chromium doesn't make for the same page? http://www.webpagetest.org/result/150114_36_167T/5/details/#request-overlay-10 [23:28:49] Nemo_bis: checks for revoked certificate, if you mean the OSCP [23:29:16] you mean the one to oscp2.globalsign? --> http://en.wikipedia.org/wiki/OCSP_stapling [23:30:36] No, I mean request #10 [23:33:03] something in the Diffusion app, which was giving us the permissions errors before the update [23:33:14] https://phabricator.wikimedia.org/diffusion/MW/ [23:34:46] Nemo_bis: all the git infos for the displayed files (modified, author, details, date,...; all table columns except first) [23:35:31] Ah perhaps I was comparing to the wrong Chromium thingy [23:35:57] Yep se4598, that stuff is loaded in a second moment (which is nice)