[08:03:07] phuedx: good morning! [08:14:26] phedenskog: g'morning [08:14:34] * phuedx joins tracyisland [08:37:52] arning [08:38:22] s/ar/mor/ [14:26:44] \o [15:00:35] dr0ptp4kt: jdlrobson i'm running 10 min late [15:00:38] i'll be there soon [15:01:10] joakino: k [16:26:58] bearND: the MCS tests are failing in stable :( [16:27:08] bearND: do you want me to open a bug? [16:30:01] bearND: https://phabricator.wikimedia.org/T135649 [16:31:03] joakino: no, we already have a patch for that. Will review it right after the meeting [16:31:06] when i said stable i wanted to say master obviously :/ [16:31:12] oki! [16:31:23] joakino: https://gerrit.wikimedia.org/r/#/c/289320/ [16:35:02] thanks bearND, tagged the bug on the patch [16:35:33] joakino: thanks [16:42:55] mobrovac: would you rather have me assert.deepEqual(Object.keys().length === 0)? [16:43:31] mdholloway: heh, no because Object.keys([]).length equals exactly 0 (not null, undefined or something else) [16:44:00] i.e. you are just making sure you are getting back something that is empty [16:44:14] but the ticket explicitly says that an empty object is being returned [16:44:24] s/is being/ should be/ [16:45:07] ah, i see [16:45:12] if you want to make sure you're getting back an object, you should check its type too [16:45:15] right [16:45:43] mobrovac: thx, will update [16:45:46] hm, unfortunately, typeof [] === 'object' [16:45:53] gotta love JS [16:45:54] hehe [16:45:57] haha [16:46:27] mobrovac: Array.isArray should do [16:46:50] yup joakino [16:46:58] was about to suggest that [16:47:02] :D [16:47:30] mdholloway: so, what you want is typeof lead.protection === 'object' && !Array.isArray(lead.protection) [16:47:34] simple! [16:47:35] haha [16:49:34] mdholloway: well, to be complete, you need: typeof lead.protection === 'object' && !Array.isArray(lead.protection) && !Object.keys(lead.protection).length [16:50:34] mobrovac: mdholloway there's also the classic: [16:50:34] > var typeOf = function(it) { return {}.toString.call(it).slice(8, -1) } [16:50:34] undefined [16:50:35] > typeOf(1) [16:50:35] 'Number' [16:50:35] > typeOf([]) [16:50:35] 'Array' [16:50:36] > typeOf({}) [16:50:36] 'Object' [16:50:42] mobrovac: yep -- actually i'm testing with it splitting into two lines/tests -- assert.ok(type is object) and then assert.ok(Obj.keys().length) == 0 [16:51:07] lool joakino [16:51:29] best way if you ask me :p [16:51:49] joakino: lol, nice [16:56:15] mdholloway: euh, sorry had a brain fart, re obj type, lead.protection.constructor === Object works just as well [17:16:49] mobrovac: joakino mdholloway : Isn't there anything simpler now with ES2015 syntax? [17:17:06] bearND: nzr android standup [17:17:11] oops [17:35:43] nzr: hey, not sure if you check regularly but there are a couple of tasks in the sprint board https://phabricator.wikimedia.org/project/view/1997/ awaiting design signoff [17:37:10] bearND: not that I know of, see http://bonsaiden.github.io/JavaScript-Garden/#types.typeof for example, that's never going to improve with new versions because of backwards compatibility, and there's nothing on the spec for better type detection [17:37:19] besides adding adhoc functions like Array.isArray [17:38:34] it's like a magic incantation you need to learn, {}.toString(X).slice(8, -1) [17:38:39] wingardiumleviosa [17:39:05] with arrow functions it is shorter :) [17:39:08] const typeOf = (x) => {}.toString.call(x).slice(8, -1) [17:42:35] bearND: mobrovac I guess you could use .constructor too [17:42:35] > (1).constructor == Number [17:42:35] true [17:42:35] > "".constructor == String [17:42:35] true [17:42:35] > [].constructor == Array [17:42:36] true [17:42:36] > ({}.constructor) == Object [17:42:37] true [17:43:17] joakino: using .constructor is what i suggested [17:44:53] \o/ [17:44:58] alright heading outsies [17:45:01] bb! [17:54:56] mdholloway: bearND: are you planning on deploying today? [17:55:52] mobrovac: i wasn't planning on it [17:55:58] kk [18:26:18] mobrovac: well, if we get the outstanding geo patch merged I'd be open for it. Why are you asking? (sorry bbl) /cc: mdholloway niedzielski [19:22:02] bearND: niedzielski: what are you guys thinking about grooming/triage? [19:22:17] mdholloway: either way is fine with me [19:28:41] bearND: niedzielski: there's a lot more there than i expected. i vote we do it. [19:30:04] mdholloway bearND: max and i are here [20:02:00] bearND: niedzielski: i didn't realize that mcs geo fix patch was a crash fix. if we can get my fix for the tests and that patch merged, it might be worth asking in #services if there's a reason we shouldn't deploy after all [20:02:39] dr0ptp4kt: in hangout [20:02:49] maxbinder: i'll be there in about 90 seconds [20:03:22] mdholloway: did i say it was a crash fix? my mistake! this just causes an unknown error page in the app (bad but not a crash) [20:03:31] maxbinder: more like 180 seconds [20:03:54] niedzielski: oh, no, that was my mistake [20:04:07] niedzielski: sorry. still would be nice to merge the fix, though :) [20:04:22] yeah, i think so. quite prevalent on es wikipedia at least [20:05:06] niedzielski: i haven't actually looked at the patch yet but will now [20:05:41] mdholloway: niedzielski I think we'll merge it this week but deploy it on Monday