« first day (1137 days earlier)      last day (4035 days later) » 

21:06
@RUJordan :-)
ohmai
;3
So will those 96,000 close votes ever get tended to, or do they just sit there as more and more pile up?
Hi all.
What does this mean?
You should be very careful using for in without checking the object has the property first. — David Barker 1 min ago
for...in iterates over all of the properties of the object, including those that it picked up from prototypes above it on the chain.
Oddly relevant theonion.com/articles/… @rlemon
@SomeKittens But for a random json object, it should be harmless, no?
If you ever find yourself saying 'should be harmless', you should add the extra protection.
21:18
@SomeKittens Eh. I do not fully agree.
but ok.
I see the trolls were hard at work here today chat.stackoverflow.com/…
@Shea denial is a river in Egypt.
Whether or not he even believes in conspiracy theories is a conspiracy
> Canada City, Canada’s largest community, is located in a place called a “province,” a subdivision not unlike the cantons of Switzerland.
lol
@Shea I'm in denial because I recognize laws as passed down by my government.
:P
Also, because you see the need for those laws.
To some people, is seems as if laws are just made for no reason.
21:24
Yes, but what if my inlaws are Canadian? Do I still have to follow them?
Trust me, it fucking sucks when you get rear-ended at a stop light, by an illegal-immigrant, illegally driving with no insurance.
trust me - it is a law in Ontario (likely all of Canada but I haven't looked) that you have insurance to operator a motor vehicle.
and there is a minimal amount of things you must be insured for.
I believe it, because that would be just like 90% of the entire world, with the same law
just like you have to have a license, and your vehicle must be registered.
And it's a good law, that there for a good reason
21:27
yarg, why am I listening to Green Day again? They're like the Godwin's Law of my YouTube binges.
(the exception that I know of for registered is farm vehicles. They can get away with some crap
@rlemon Just not your gun!
why are you guys still talking about car insurance ;_;
@rlemon Probably literally, too.
@nderscore I missed the conversation, so I just wanted to add my two cents :(
21:28
@nderscore yeah, let's talk about js instead
lol jk
I had to explain today why I loved JS so much, and I actually quoted our resident lemon. I felt kinda cool
Hi Everybody!
@Alnitak Hi there
@RUJordan when trying to sound intelligent, probably best not to quote me :P
@qwertynl FWIW, I don't do hasOwnProperty checks when doing for ... in, but that's because my code only targets ES5 browsers, and runs in an environment where it's not permitted to extend Object.prototype
unless done with Object.defineProperty() to create non-enumerable properties
21:34
Well it was a good answer. It's built into every browser, so you can take anything that can open the internet and a notepad and boom, you can create a super complex game or websocket thing
As a wise man once said, "when trying to sound intelligent, probably best not to quote me :P"
3
It's accessibility more or less
ok this is really pissing me off. I have a small mole / skin tag thingy on my lower lip (just under) it is almost not noticable. Today I somehow bit my lip and half tore it off. Now it won't stop bleeding (hour plus now)
Another one also said "it's better to remain quiet and appear foolish, than to open your mouth and prove it".
@Alnitak idk. if I know that the object is not extended at all I feel no need to have a hasOwnProperty check.
whatever.
21:35
@RUJordan I stole the rational from a video I watched
which you should watch
jQuery assumes that Object.prototype is unextended, so I assume the same
Show me brah
@RUJordan watch it
titled: "Programming is Terrible"
@Alnitak Thanks. Still not sure why I was downvoted though. But whatever, it is just fake internet points.
@qwertynl link?
21:37
0
A: Looping through a json object in javascript

qwertynlTo loop through a json object just use a for loop. The way you are doing it will return errors because it is trying to select that json object from the page which does not exist. Sample code: var obj = $.parseJSON(data); //assuming `data` is a string for(index in obj) { var note = obj[inde...

Holy balls that's a long video
@RUJordan the last 30 minutes are QandA
but is it an AMAZING talk
seriously. spend the time
> I code bugs. I write documentation that's not quite in english.
@qwertynl Yeah, Alnitak > Me.
@SomeKittens ?
21:39
I advised him to do the opposite, but your caveat about ES5 strict mode is true.
u be smurt - us be dumb dums
@SomeKittens :-)
@qwertynl Not sure the downvote is justified, but then I'm not sure any upvote is either, TBH...
@SomeKittens it's not a strict mode thing
it's just an ES5 thing
@Alnitak Whatever. Just fake internet points.
Should we just delete the welcome command, and allow room owners to define one with learn?
21:40
they're not fake - being a high rep contributor can be good for your CV.
@Alnitak Nope, can extend in ES5, just broke SO chat with Object.prototype.pants = 'pants';
I've had a number of companies contact me about jobs they have because of my SO profile
@Alnitak I have heard big objections to rep from the likes on @BenjaminGruenbaum and @rlemon et al
@SomeKittens I didn't say you couldn't, what I said is that there's a safe way to extend the prototype in ES5 (Object.defineProperty) which doesn't break for ... in
well of course it will help your SO CV
21:42
@qwertynl right, rep is meaningless - but it makes a big impact on your CV. I've had (more than) several companies contact me because of my SO profile too, mainly answers though, not rep.
but I don't care about that as a point of job oppertunity
The rep system does seem fairly heavily biased towards early adopters
@monners that's a fair point, indeed
I have had more head hunters who see me on github than SO
(as a side note)
@monners no, it's fairly biased towards 'answering the same question'
@rlemon yeah, more effective.
21:43
@BenjaminGruenbaum What do you mean?
@monners look at @Neal
@monners You get rep even if the question is closed as a dupe.
@Alnitak Then why are you using for... in in the first place? Use Object.keys
I use Object.keys if I want an array of keys. If I want to enumerate, I, umm, enumerate...
@Alnitak Object.keys(obj).forEach
21:44
GRUMBLE GRUMBLE
@rlemon Many people find me on LinkedIn
What the FUCK don't people understand by "It's not viewable outside of the office"??
So much nicer
Is it really that hard of a concept to grasp?
So, suppose you're not inclined to answer the same questions because you respect the rules, how many questions roll around that offer the same kind of attention as the language basics types?
21:45
@SomeKittens I actually disagree with a lot of close votes - sometimes a tailored answer to a frequently asked question can help the OP a huge amount more than a link to a question that's slightly similar.
@Alnitak Yeah, then it gets into what's "better" for the site, and what's best for OP.
@Alnitak I agree.
@BenjaminGruenbaum that's inefficient compared to a for ... in loop, unless you specifically want the additional execution scope introduced by the inner function
@BenjaminGruenbaum e.g. for scope purposes
@Alnitak if you're doing for.. in or Object.keys you likely don't care about performance anyway...
@BenjaminGruenbaum perhaps, but I also believe in using the minimal language feature that does the job. Not that I've benchmarked .forEach vs for ... in
21:48
@Alnitak Right, and having a whole iteration construct for... in is boilerplate ^^
c.f. my mini-rant on stackoverflow.com/a/20225540/6782 about using parseInt to round a number.
0
Q: Ensure an external javascript file called from plugin is loaded after jquery is called

fakeguybrushthreepwoodI am calling a javascript file from my wordpress plugin code using: add_action('init','gallery_sugar_js_init'); function gallery_sugar_js_init() { wp_enqueue_script( 'gallery_sugar_js', plugins_url( '/js/gallery_sugar.js', __FILE__ )); } But in source code for WordPress I'm seeing...

0
Q: How to manage potentially outdated data from WikiMedia API

theintellectsI am writing a web application that pulls small parts of articles from Wikipedia and presents them to users. I do not wish to delete entries of the articles because I do not want to be sending a ridiculous amount of requests to the WikiMedia API, putting unnecessary load on them. My question is...

@Alnitak author of answer is defending his stance while acknowledging it is wrong - pretty amusing.
yeah
it's the peril of this tag (and PHP too) that too many noobs think they know the answers, producing some shockingly shite answers.
look for example at wared's answer to that question
@Alnitak can't say I disagree with that. It's "mount stupid"
21:51
10+ comments and still hasn't produced a correct answer
@BenjaminGruenbaum nice! :)
as it happen's, wared's answer is 95% or so there, and it's a lot better than some of the others, but it's got specific flaws that he can't see
Doesn't matter - he shouldn't answer if he's not sure.
Do you know how PHP works? Just read the error message @RCV — qwertynl 16 mins ago
@Alnitak what I am dealing with ^
I'd upvote yours but I find the syntax a bit cryptic.
@Alnitak Array.apply(0, Array(9)).map(function() { - very cryptic. It would take me a while to understand this had I now run into this specific trick in the past
Speaking of using language constructs...
Of course the real nice solution is a generator which is what I'd do in Node ^^
21:56
@BenjaminGruenbaum this should be wrapped in a function
2
A: Generating a random numeric sequence, then appending a capital letter to that sequence in JavaScript?

AlnitakThis single expression will produce the required ID: var id = Array.apply(0, Array(9)).map(function() { return String.fromCharCode(48 + Math.floor(10 * Math.random())); }).join('') + String.fromCharCode(65 + Math.floor(26 * Math.random())); The Array.apply(0, 9).map() is a trick used to av...

@BenjaminGruenbaum I did provide a link to a blog article that explains the construct
67
Q: Creating range in JavaScript - strange syntax

Benjamin GruenbaumI've run into the following code in the es-discuss mailing list: Array.apply(null, { length: 5 }).map(Number.call, Number); This produces [0, 1, 2, 3, 4] Why is this the result of the code? What's happening here?

Of course, the trick in my question is a lot more clever imo, especially the call bit and the cast :P
user1125394
in knockout, any observable () is get and (stuff) is set?
@BenjaminGruenbaum I've linked to that question now, too
21:58
in Root Access on The Stack Exchange Network Chat, 36 mins ago, by connor.js
@rlemon No, I came to the conclusion that you don't know what law is
in Root Access on The Stack Exchange Network Chat, 31 mins ago, by connor.js
@rlemon I mean, you don't even know who your leader is, so why would you know about the laws it creates, right?
really?
@Alnitak wouldn't it make more sense to add a function range and then use that?
where did he get the understanding I don't know who leads my country?
user1125394
ok,
21:59
how does this kid come up with is conclusions?!
@BenjaminGruenbaum I have one of those - hold on...
it is amusing at times.
@rlemon stahp with the drama, just ignore him :)
@rlemon It's best to ignore him.
@rlemon It's his time of the month
21:59
I hit main site and it was in my inbox.
:P
I am bad for checking my inbox. so chatter in rooms i'm not in on other sites don't get to me
Array.range = function f(m, n) { var z; return 0 <=-- n ? (z = f(m, n), z.push(n), z) : [] };
Of course I know who my leader is. He lives at 24 Sussex Dr. and smokes crack.
Vote @rlemon 2016
4
anyone else having problems with YouTube?
lol
22:01
I mean, besides all the google+ shenanigans
@Alnitak yeah, as long as it's clearer than that map/apply - there is no way OP can understand that
anyways. home time. be back later.
@Crowz yeah.. I spend too much time there
Or... you know, use a for loop ^^
22:02
@Alnitak Reading that blog article you linked to. Interesting approach.
@monners I would destroy this country.
no doubt.
@BenjaminGruenbaum anyway, why use a range? There's no need for the actual sequence [0..8] to ever exist to solve that problem
!!youtube vermine supreme
I would be him
22:03
6 mins ago, by Benjamin Gruenbaum
Of course the real nice solution is a generator which is what I'd do in Node ^^
@SimonSarris ^^
Vermin Supreme is the man
@rlemon You'd probably make smoking cheap. :P And whores. And sex of any sort.
iknorite?
nahh. I wouldn't be that bad.
but drinking age lowered to 18
you would need to pass a aptitude test to have children
lol
how would you enforce it?
22:04
insert rod A into slot B...
ohh and natives would no longer be tax expempt
Now I really DO wanna vote @rlemon 2016!
nor churches
22:05
for (var prop in obj) {
  alert('Hi, ' + prop + ', I\'m dad');
}
Proud to say I failed level 5
in fact the only reparations I would make would be to the Chinese. They can finally have their free rail passes
"You’d be pretty dumb to pass up this signal."
@SomeKittens {Luke:"Skywalker"}
22:06
@AGirlSaidMySmileIsCute Doubtfully
!!am I?
@rlemon All signs point to yes
!!is he gay?
22:06
@KendallFrey Certainly not
one less thing to worry about
alright. seriously. home time. back in a bit.
I think the bot read the article above that no one else read
Everyone knows that gay guys just want gayness without the G.
Wtf is it with you and this gay thing?
22:07
gay jokes are funny
You know what I think? I think you wish @rlemon was gay. ;)
Not even once.
How about twice?
22:09
@AGirlSaidMySmileIsCute All signs point to yes
@AGirlSaidMySmileIsCute I The ninth letter of the basic modern Latin alphabet.
> Some say he knows two facts about ducks, and both are wrong.
"Everything's comin' up Milhouse!"
!!afk Top Gear challenge
22:16
@SomeKittens Just go already!
!!guys or girls?
@AGirlSaidMySmileIsCute girls
!!tell AGirlSaidMySmileIsCute sandbox
@AGirlSaidMySmileIsCute You know, there was this funny idea once upon a time that people were supposed to test out commands and "play" in the sandbox
22:18
@AGirlSaidMySmileIsCute That didn't make much sense. Use the !!/help command to learn more.
Ok ok
room goes quiet
That speech was awesome @rlemon
!!afk WHAT HAPPENS NOW?!?
@SomeKittens You've got some balls, coming back here after what you did.
^ Very valid afk message. She didn't like that
22:32
Possibly unhandled TypeError: Object function Page(location, services, defines) {
    at initView (eval at includeTipRanksCode (eval at <anonymous> (eval at <anonymous> (chrome-extension://pfknbhceonclhmemjhhiddajkpjnbdbo/js/lib/app_api.js:1:130))), <anonymous>:282:22)
    at initUi (eval at includeTipRanksCode (eval at <anonymous> (eval at <anonymous> (chrome-extension://pfknbhceonclhmemjhhiddajkpjnbdbo/js/lib/app_api.js:1:130))), <anonymous>:167:17)
    at eval (eval at includeTipRanksCode (eval at <anonymous> (eval at <anonymous> (chrome-extension://pfknbhceonclhmemjhhiddajkpjnbdbo/js/li
Where the heck is the exception in all this mess?
has no method....
@Esailija ^ any insights? (given it's bluebird)
> "Possibly unhandled"
How thorough lol
@BenjaminGruenbaum hmm
Where is the type error?
have you checked the lines yet
what lines? This is injected code. I don't have real line numbers and I don't have a map because of the IoC the framework we use does.
This was a big motivation to move to Bluebird in the first place.
22:35
<anonymous>:282 for example
not real line numbers
is initView your code?
Yes
Well. It's not mine but I'm fixing it.
you can inspect the error object like this
Promise.onPossiblyUnhandledRejection(function(errorObject){

});
then it won't print that
I can find the bug - I just want bluebird to give me better stack traces
22:38
does Error.stackTraceLimit = 100 change the traces?
It's calling Page.someTypo() should be Page.isInContext()
The IDE spotted the bug (took it a while and an explicit 'inspect code') and so did the build script.
I just think the stack trace should have been better. It traced the code of Page (which is a constructor) and didn't get to the error itself because it truncated.
Try invoke a function whose base is a function - you can reproduce it easy peasy
lemme do that
@BenjaminGruenbaum actually I didn't expect error text to have new lines
the truncation happens because the error text is parsed for stack frames
22:42
but of course the function body makes no sense as stack trace
Found a real bug for once.
""bug""
well I would prefer V8 not to .toString() a function like that in errors
it should say TypeError [object Function] has no method xyz
instead of dumping the body in place of [object Function]
Can VB/C#/C do web?
Yeah, or say TypeError [Function Page] has no method fubar
@AGirlSaidMySmileIsCute ew
22:43
@BenjaminGruenbaum yea I could actually do that
@AGirlSaidMySmileIsCute ever did GUI in C#/VB?
rewrite the huge function dump as that
@Esailija that'd be awesome.
so it was just the error message not the actual stack trace?
that was bad
?
You have the whole trace up there
22:49
I mean you said that the stack trace should have been better
but actually the problem was just the error text? or is there more
Yeah, that's the issue so far - the rest is not enough refactoring yet.
I'm really satisfied so far though :)
cool :) you can make gh issue if you want
(Don't know if you saw the pings from earlier)
I just favorited a Miley Cyrus video on YouTube, and I'm not even ashamed
You know, that one where she's naked?
Attention Room!
hi o/
22:51
\o
That reminded me of this for some reason youtube.com/watch?v=cNkp4QF3we8
@rlemon \0
listen big head. we don't take kindly to your type here
22:59
@rlemon /0\
Anyway. Good night people.
C ya
@Esailija I think I have a real bug now

« first day (1137 days earlier)      last day (4035 days later) »