« first day (1634 days earlier)      last day (3313 days later) » 

7:00 PM
@StevensHaen Stack Overflow
 
could you guys ease the hell up with the flagging bullshit?
 
@rlemon Who is this guy?
 
Are people still flagging..?
 
@Jefffrey guy running for mod, also dislikes many people from the JS room. has avoided the room. Benji called him out on being a nuisance in the past and he's not happy about that. in meta asking mods to purge the comments and such.
shortly after I joined the conversation this room saw a buttload of flags
and my messages in that channel got flagged (so I'm told, I can't see meta chat flags)
 
user1596138
@FilipRoséen-refp Sure, but ease up yourself a bit too please.
 
7:03 PM
@meagar I don't think you've ever graced us with your presence
o/
unless I'm just blind
 
I've learned lots from meagar on Main :) his answers are quite brilliant
 
I lurk like a boss.
I don't spend a lot of time in chat though; I find it too distracting
 
one of us one of us
 
.... I might know what you are talking about.
 
I cannot normally leave it open while at work :|
 
7:05 PM
Flagging fun again? Good times.
 
@Undo they have been
 
:checks post count:
 
@Zirak <3 2.9
Run for mod
 
as of this message, I have 304,648 chat posts
 
Show the world what an old man can do for us
 
7:06 PM
Can't, don't have the necessary badges
 
@rlemon 391! Woo!
 
Otherwise I'd be up for a shindig
 
@meagar we do need more moderators in the chats
currently I can only think of three that are often online
and TM seems to be 'afk' more than online when I'm awake at least
 
just sent a particularly anal email
 
God I hope that's not how I'm picturing it.
 
7:08 PM
!!> Math.round(-0.665, -2) // oh look it rounded down instead of up
 
@KendallFrey -1
 
oh fucknuggets
 
@KendallFrey Sent lube beforehand?
 
BTW, WTF is Math.round10?
 
7:09 PM
Something you made up
 
undefined
 
Anyway, the point is, someone was incorrect in saying that round -0.665 to -0.66 is rounding down
 
@rlemon I don't want to be that guy, but...
 
@Retsam I bet he used postfix increment when he came up with that name.
 
@Zirak something my coworker made up
 
7:10 PM
First campaign promise: If elected I will be on chat 24/7 :p
 
:D!
 
Even if only lurking
 
@meagar what about when you're showering?
 
so you're going to setup a rpi to just login every day and sit in the chats?
 
This is a very interesting kata. About trampoline and tail recursion. codewars.com/kata/tail-recursion-with-trampoline
 
7:11 PM
@ssube My laptop is usually in the room with me
... No seriously I listen to music :|
 
mhm
yay more flagging
 
I think it’s somewhat funny.
 
in Tavern on the Meta on Meta Stack Exchange Chat, 14 secs ago, by rlemon
it is a nice coincidence that any post mentioning the election or bjb in the js room has been getting flagged
inb4 flag
 
Seriously?
 
7:16 PM
Apparently, very srsly.
I'm going to see if it is a bot. I hear meta.stackoverflow.com/users/2371861/bjb568 likes cakes.
 
Does shit usually get this cray around elections?
 
@Jhawins I prefer hanging out in Lounge<C++> where people aren't as easily offended, but.. thanks.
 
Aka the Bartek tantrum room?
 
@FilipRoséen-refp s/aren't as easily offended/generate 80% of the network's flags/
 
user1596138
I saw you were from C++ and decided better of mentioning you were from the temper tantrum room.
 
7:20 PM
I think they call it the Lounge because there is often reasons to sit back and grab a bag of popcorn
3
 
^ funny
 
Aww, I missed the flags!
 
this doesn't refer to the object, it's executed in in use strict. Is that spot on or not ?
 
@rlemon lolol
 
FLAGGING MESSAGES LIKE THIS IS A GREAT WAY TO ENSURE YOU NEVER GET TO BE A MOD~!!!!!! /yell-type
 
7:24 PM
flagged from the transscript for sure
 
for sure
 
Which one was it this time
 
they are hours old
messages from benji
 
Are flags anonymous? Can't mods tell who's doing the flagging?
 
7:25 PM
mods can if they are online when they get flagged
iirc they have no 'flag history' on chat (TM says so)
 
@StevensHaen rephrase, please.
 
@Retsam 1) there are no mods online 2) they can see who flagged what, but they won't tell you anyway
 
I miss the websocket bug
:(
 
@rlemon that is fixed, right?
 
@StevensHaen Not really sure what you mean; use strict just switches this from window to null when you invoke a function without an explicit context
 
7:26 PM
@rene yup
 
Well that sounds like a system that can't be abused at all, alright.
 
Say what @meagar?
Oh lol I was reading up like what did I dooooo
 
Usually the first three characters are enough to be unambiguous :|
 
@meagar you have 120 seconds to edit chat messages
up arrow or from the message menu
FYI
 
Whoa...
 
7:28 PM
dafuq?
 
I didn't know the up arrow shortcut.
 
Woh mah gad, how do i chatted :|
 
@towc refresh
 
refresh
 
@towc That looks noisy.
 
7:28 PM
ninja'd
 
yeah yeah, but this had never happened to me before
 
@towc reinstall windows
 
@Luggage ok, maybe not
 
install msdos mobile
 
@towc happens to me every so often.
by that I mean, twice in 4 years.
 
7:32 PM
oh XD
 
@SterlingArcher lol
now I want dos on a mobile device
imagine installing/getting the drivers working for everything omg.
 
Good luck installing the touch screen driver using your touch screen.
 
haha exactly
I think there was usb support later in dos.. you could maybe add a keyboard
 
omg that would be awful haha
 
Especially when your 1080p SUPER AMOLED display isn’t supported by your VGA driver.
 
7:36 PM
a lot of phones can accept a usb keyboard, now
 
gotta get that vesa 2.0 driver for the screen!
 
Last time I checked, MSDOS didn’t really have USB support ;P
 
If one wanted to do this realistically, you'd run dos in a VM on linux
 
yeah looks like 6.22 has it
 
then you'd have your keyboard, video, etc
 
7:37 PM
@poke USB to PS/2 adapters are good for more than just n-key rollover
 
hah yeah I have a few of those floating around the house
ps/2 to usb to micro usb adapter..
 
But those adapters are usually the other way around
 
still not any worse than putting together null modem cables
 
@ssube see you on the other side, "champ".
 
user1596138
<div class="giveaway">
	<p class="giveHead"></p>
 
user1596138
7:39 PM
I loled
 
user1596138
Cause I'm a kid
 
yeah the way they mix case
that makes me lol as well
 
user1596138
Then I got mad because he was inconsistent
 
@FilipRoséen-refp are you referring to seeing @ssube after death?
See you on the other side brother
^ in a Hulk Hogan voice ofc.
 
user1596138
Well there's "giveawayContent" too, I think he left out the "away" for a personal laugh. Actually this might be the girl who used to work here's stuff
 
7:41 PM
You can't see people after you're dead. Zombies have awful eyesight.
 
@ssube eh it should be ok for at least a day or two :P
 
I'm working on a zombie/mummy screenplay
 
lol @#1 thing on /r/funny
would post it here but could be considered offensive
 
@Loktar I was referring to me being in another room, and that being "the other side"
 
@FilipRoséen-refp but I'm not going to join the C++ room, because every time I see turing-complete templates I shudder and crawl back to my slow, mushy interpreted languages. :P
 
7:54 PM
What is the web-dev share of the "all programmers" pie chart?
 
@Loktar OH YEEEEAAAAHHH
 
:rips off shirt:
 
@SomeKittens hah nice
 
It was called 'jQuery' because jselect.com was taken
 
8:00 PM
So when I use something = "variable" the browser declares it silently in the global object? Is var something = "variable" the only way to declare a variable?
 
@StevensHaen in non-strict mode, yes
 
@SomeKittens Does something = "variable" attempt to use an undeclared variable, which forces the browser to declare it?
 
@StevensHaen no and no
 
@ssube I don't understand how it works
 
it's declared in the current scope, which is the closest surrounding function or on the global object (self)
with ES6, the let keyword is introduced which declares in the closest surrounding block (pair of curly braces, usually)
 
8:04 PM
@ssube Why does strict mode get upset about declaring a global variable in local scope? Is this making us prone to error?
 
@StevensHaen The opposite, it makes us less prone to errors.
 
@StevensHaen "declaring a global variable" how? using foo without var foo?
 
Now var myObject; .... myobject = 3 raises an error, rather than silently setting a global myobject to 3
 
@ssube correct
 
largely what @meagar said
 
8:06 PM
(function() {
"use strict";
foo = 1;
}())
VM6211:4 Uncaught ReferenceError: foo is not defined
 
helps protect against typos
 
sounds good to me
 
while experienced developers are granted magical powers by the design patterns they know, they still can't prevent typos.
 
@rlemon So, anouncing a global variable inside local scope (i.e. anything that's not the window) is bad practice, that's why it's banned in use strict?
 
Only static analysis can save you from a misspelling.
@StevensHaen global variables are bad practice, period.
 
8:08 PM
@StevensHaen What I think you're missing is, the behavior doesn't change in strict mode. When you use x = 3, you're still doing this.x = 3, it's just that in strict mode the value of this is undefined.
 
in almost every language and every paradigm, global data is dangerous.
 
With or without strict mode, x = 3 is still this.x = 3.
 
^ and ^^ and ^^^
 
It's just that in strict mode, this is explicitly set to a value meant to cause such mistakes to error immediately, rather than later
 
@ssube What if I want to be able to modify the value of a global variable in a function?
 
8:09 PM
@StevensHaen window.someVariable = newValue.
You need to use <global object>.property = value
 
@meagar I prefer self.someVariable
works in workers too
 
@ssube Yes, probably the better option
In practice I can't remember the last time I had to actually do this :p
 
"Not Allowed in Strict Mode Using a variable (property or object) without declaring it, is not allowed:" - W3 Schools
Doesn't this imply, that the var prefix is declaring the variable and not just indicating local scope?
 
a) self.someVariable is valid because self has already been declared and someVariable is simply a property on it
 
@StevensHaen In general, w3schools is not a good resource
 
8:13 PM
b) don't use w3schools, they lie
 
self.someVariable is the same as this.method() or var data = {foo: bar}; data.foo
 
posted on April 02, 2015 by samthorogood

Native support for Web Animations first shipped in Chrome 36, and was updated with playback control in Chrome 39. The Element.animate() method can be used to trigger imperative animations directly from JavaScript, and its returned object can be leveraged to control the playback of these animations. These methods are detailed in the current draft of the Web Animations W3C spec. There’s a shipp

 
self, this, and data have all been declared prior to being accessed
 
So, if I declare var something; in window it's accessible to all child elements, closure?
 
8:16 PM
child *scopes, via closure
but don't do that
globals are bad
 
@ssube tell that the globe company
 
phantom pings man.
I swear
I hear a ping. tab over, no pings.
!!afk need to step away from the pc
 
eval is evil
 
Globals also screw up GC
 
@gab06 eval is only evil when you use it wrong
 
8:23 PM
which is in most cases for most people
 
Banana indeed.
 
@Shmiddty I agree
 
I use eval to parse JSON payloads for my server.
(not really)
 
@Luggage that, or dynamic properties
 
@Shmiddty what did you move?
 
8:26 PM
Hmm?
 
like var foo = 'bar'; var obj = { bar: 1 }; console.log(eval('obj.' + foo)); // 1
 
weird you were pinged?
 
@Loktar yea
 
:p
 
weird I can see edits as well right?!
 
8:26 PM
Super weird
 
only if you're fast enough
 
@Loktar (or not on mobile)
 
@Loktar the little pencil icon is a dead giveaway
 
@rlemon I assumed you were on mobile
 
nahh
 
in my mind you are permanently on mobile.
 
only when pooping
 
@FlorianMargaine we ate ribs with that dude!
 
@FlorianMargaine this is an example of what some people do instead of obj[foo]?
 
didn't have a clue
 
8:27 PM
@Luggage exactly!
 
Crazy.
 
@ssube wasn't his accent a dead giveaway?!
@Luggage nah I'm kidding. Maybe people smart enough to think about that but not knowing square brackets notation. Which is not many.
 
@FlorianMargaine is that the auto tuned one?
 
no idea
 
it is
 
8:29 PM
I can't listen to it at work :(
 
I've used eval in 'real life'. For storing JS predicates as a string in the DB. For example I store "refundAmount > 10000" and use eval and/or with to evaluate it against some object
 
eval is evil. Function constructor is the way to go.
 
On this case it was to determine which fee to charge a client based on their contact.
 
@KendallFrey you can sandbox the shit out of function construction, too
 
this._get(i).$$tmpFunc = f;
 this._get(i).$$tmpFunc(i);
 this._get(i).$$tmpFunc = null;
amazing
> So this may look crazy — it certainly does to me! Why not just do: f.call(this._get(i))? If I remember correctly, and I just did some double-checking and I think this is the case, but IE 5 didn’t support .call()!
 
8:32 PM
var functionBody = ""; for (var f in self) { functionBody += f + " = undefined;"; }; functionBody += actualBody; return new Function(functionBody);
no access to anything global
 
Check that again
 
I think you can maybe bypass it if you new up enough stuff within the function and then .call things with some context, but it's hard
 
Not that hard
What, exactly, are you trying to block?
 
wait wait wait... I thought that not even the most careful companies cared about IE5
 
In my experience, IE6 is still cared about (just a little) but not IE5
I was down to a single user on IE6 (out of thousands) on my last project. Still so many on IE7 though.
or 8, i forget. they both suck
 
8:35 PM
@Zirak casual access to global variables from within the new function. When you're constructing predicates you generally want to control the scope, to hide (but not actually secure) anything else.
 
But you're corrupting the global scope while you're at it - if you declared any globals, you set them all to undefined
 
Anyone know if the new MS browser (spartan?) is going to be constantly-updating like chrome and friends?
 
@Luggage yes
 
@Zirak only within that new function
 
MS (finally) learned from that mistake
 
8:36 PM
Good. They just need to make that retroactive
 
@ssube The variables weren't declared there, they were assigned.
Besides, if you want a new scope, that's what web workers are for (or even sandboxed iframes)
 
oh yeah, forgot the var
 
And you can still access the globals by doing window.varName
 
sandboxes iframes have a lot of other implications that you may not need, if you just want to hide loose variables
@Zirak not if you var self = undefined, window = undefined within the function
 
@SomeKittens So crazy reading that thing and seeing Ben Nolan's name come up all the time, he's my mate haha.
 
8:38 PM
@ssube You can't do window = undefined
 
jQuery.fn.removeClassWithRegexp = function(regexp) {
    return this.each(function(i,el) {
        $.each(el.classList, function (i, klass) {
            if (regexp.test(klass)) $(el).removeClass(klass);
        });
    });
};
I am awesome
:S
 
jQuery.fn.removeClassWithRegexp = function(re) {
    this.each(function() {
        $(this.className.split(' ').filter(function(k) { return re.test(k); })).remove();
    });
};
different functionality, but I like it
 
jQuery.fn.removeClass = function () {
  // what are side effects?
  return $(document).remove();
};
And now 'remove children' is in my google search history
 
you had to google for that?
angular hipster... doesn't even know how to take care of children...
 
nah, angular hipsters have their children dynamically injected
 
8:47 PM
oh gawd
 
@SecondRikudo wow, I'm speechless, thank you very much for the bounty!
 
@CSᵠ Don't listen, he's just buying your vote!
 
lol :)
 
@FlorianMargaine I was wondering if it was a native JS method
 
@CSᵠ It's always fun trying to see how long it takes people to notice :P
 
8:47 PM
he had it before the election..
 
@SomeKittens well, it's both
 
@SomeKittens If I were to buy people's votes with 500 bounties, I'd run out of rep really quickly :D
 
someone bountied me the other day
web-tiki I think
 
nobody bounties me
I'M ALL ALONE IN THIS WORLD
 
I answered a question in chat that he took and used to answer a 500 rep bounty
 
8:48 PM
@SecondRikudo i was on a nice long walk with my girl, when i come back i see a +500 bounty, WOW
 
so he (without my knowledge) bountied me 250 of it
nice guy
 
@rlemon lolwowdamn...
still interesting
 
yea I think I'll start going for 20k
instead of bleeding off all of my >10K rep
> 16 Offered bounties for 2,100 reputation
I would be 2100 closer
 
@SecondRikudo i copy pasted the whole answer in a .doc file, 5 whole pages, 2 major revisions, over a week on and off to write...
 
I'm pretty close to 20k too...
 
8:51 PM
still feel i could have written another page on it..
 
maybe I should rep whore a couple days
I'll be bored after 2 minutes tho
 
i wanna touch the 10's first
but no hurries
 
repwhoring sucks
 
8:53 PM
@FlorianMargaine hehe I'm no where near it
 
I should go on main sometimes if I want to reach the 20k
 
would be at like ~13000 but alas am only 10.5K
 
and advertising the answer is kinda awkward ... :(
 
@rlemon @FlorianMargaine I don't mind helping you guys to 20k
 
!!s/10'/boob/
 
8:53 PM
@KendallFrey i wanna touch the boobs first (source)
 
@SecondRikudo nah it would be cheating
 
Do you have high quality posts I can bounty?
 
@SecondRikudo I don't need help, I need questions I want to answer
 
after you guys are done answering all the good questions and getting your 20ks, I call next turn
 
^
It's the lack of good questions
 
8:54 PM
@SterlingArcher Make your own
 
the lack of good questions has always been
 
@monners wrote a canonical today
 
I don't wanna rep-whore "fix mah jQuery" questions
 
maybe I should go answer Java questions...
 
I'd rather good questions that interest me
 
8:54 PM
0
A: JavaScript recursive loop to sum all integers from nested array

vihan1086function add (array) { var nums = JSON.stringify(array).match(/[^\D]+/g), i, sum = 0; for (i = 0; i < nums.length; i += 1) { sum += parseInt(nums[i], 10); } return sum; } That uses regex to parse a stringified array but it should work just fine

 
I'm not smart enough to ask good questions lol
 
or C++, gods forbid
 
ia, that's depressing...
 
I'll award him with a bounty in 3 days when I can get one
 
8:54 PM
If you know of any good questions I can ask that you know the answer to, I have about 1K to waste
 
    var nums = JSON.stringify(array).match(/[^\D]+/g),
hwat?!
 
mm, match dem digits gurl
 
[^\D] <-- hwat
 
or don't
 
At the rate I'm passively picking up rep, I'll be 20k in 8.2 years.
 
8:56 PM
I'm torn between downvoting for the obvious or upvoting for the genius... — Florian Margaine 1 min ago
 
@FlorianMargaine I'm the upvote on that comment
 
well now there are four. BUT I WAS THE FIRST!
 
What does for (;;) do?
 
endless loop
 
8:58 PM
@rlemon :P
 
@StevensHaen infinite loop
 
@StevensHaen TO INFINITY AND BEYOND!
 
!!afk chasing the chicken into the coop
 
#define ever (;;)
...
for ever { ... }
 
5th
 
8:59 PM
(;;) is the zoidberg operator, and if you use it in prod, you'll be living in a dumpster soon :D
2
 
@FlorianMargaine What good is an infinite loop?
 
@ssube if we're at the #define...
 

« first day (1634 days earlier)      last day (3313 days later) »