/srv/irclogs.ubuntu.com/2016/12/29/#ubuntu-us-mi.txt

cmaloneyEvening00:19
cmaloneyJeez; this is valid JavaScript: var array = [2,3,4,5,6]; console.log(array['length']);00:52
cmaloneyarray['length'] = 34;00:53
cmaloneyarray.length; // 3400:53
cmaloneyOh, it gets better:00:54
cmaloneylistOfNumbers00:55
cmaloney[ 2, 3, 4, 5, 6, , , , , , , , , , , , , , , , , , , , , , , , , , , , ,  ]00:55
cmaloney*eyeroll*00:55
cmaloney> listOfNumbers['length'] = 200:56
cmaloney200:56
cmaloney> listOfNumbers00:56
cmaloney[ 2, 3 ]00:56
cmaloneyy00:56
cmaloneyHope you didn't like that data00:56
Zimdalehahahaha01:02
Zimdalegood o'le javascript01:02
Zimdalejust change it to console.log`array['length']`  because we don't care about looking readable ;)01:03
Zimdaleoh wait that actually doesn't work the way I thought01:05
Zimdaleoh well01:05
ZimdaleThat is interesting though, should make a thing that just scans through all window variables that are arrays and changes the length.01:09
ZimdaleJust to make some developer's lives hell01:10
cmaloneyYeah, and storing dimensions['length', 'width', 'height'] is going to make thing strange01:10
Zimdalehahaha01:11
ZimdaleIf only there were alternatives to javascript01:12
cmaloney> bar = ['width', 'height']01:13
cmaloney[ 'width', 'height' ]01:13
cmaloney> bar.indexOf['length']01:13
cmaloney101:13
jrwrenbut... that is... normal.01:15
jrwrenits defined in the lang... its just not expected.01:15
ZimdaleI think making lenght maluable is super fucking weird though01:17
Zimdale> var arr = []; arr.length = 1000; console.log( arr.length );01:17
ZimdaleAt least you can't set arr.length to "Infinity"01:19
jrwrenits super weird. the whole language is wierd, but at least it has a definition and we can use it.01:19
ZimdaleAnd it's pretty easy to pick up and use01:21
cmaloneyhttp://decafbad.net/2016/12/28/stupid-javascript-tricks/01:24
cmaloneymorning14:37
jrwrenhttps://docs.python.org/3.5/howto/sorting.html#sortinghowto  does anyone know how to use sorted() to say order Desc on the first key but Asc on the secodn key?18:54
jrwreni guess i could fall back to cmp for that. meh.18:54
jrwrennevermind, just map that field to an inverse value. <3 python19:01

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!