« first day (1938 days earlier)      last day (3017 days later) » 

3:00 PM
@Meredith yes, but statistically less as it turns out
 
We call those people "mutants"
 
we're more often born without parts
 
Fuck I wish I could grow a beard
 
Hey double dick dude isn't a mutant
 
clearly the people born without parts contributed them to other people
 
3:00 PM
rlemin, just recalled something, do you know something about KAA server ? That can be used with BBB
 
You can have mine when I shave it off
 
Instead I'm stuck with patchy girl hair.
 
@KarelG nope
 
@rlemon you're statistically right.
 
My nan can grow a better one than me.
 
3:00 PM
Use Calculus.
 
it's a middleware server that works well with BBB (according to the site). thought to try that out
 
my scruffy face and big forehead
 
@BenFortune beard / Ben == NaN
 
My beard wins this day
 
@ssube :(
 
3:01 PM
I might be able to fill it in by the time I hit 40?
sad part is it's already going grey, and it hasn't even filled in :(
 
do you have a dog shirt or somehell ?
 
You could just get a decent moustache going, and ditch the beard
 
weird motive
 
@rlemon If jalapenos put hair on your chest when you eat them, and your stomach is inside your chest, then putting jalapenos in your cheeks should put hair on your face.
 
Your stomach is not inside of your chest...
 
3:03 PM
@rlemon be thankful your top is still there
 
I had to stop eating jalapenos cuz I was getting too much chest hair
 
@ndugger do you not have chest hair in front of your stomach? I certainly do
 
meredith, pls... the mental imagery...
@ssube that's stomach hair
 
#PugLyfe
 
@ndugger stomach like the specific organ, not belly
 
3:04 PM
My mom has that shirt
 
best $30 ever spent
 
Is there a nice way to split an array into parts of x length
or do I have to write a method to do that
 
I'm almost certain there's one in underscore
Should be called chunk or somehting like that
 
Array.prototype.chunk = function ( n ) {
    if ( !this.length ) {
        return [];
    }
    return [ this.slice( 0, n ) ].concat( this.slice(n).chunk(n) );
};
O(N^2)
 
you could do that really cool with a generator
or very simply with a loop
 
3:09 PM
@rlemon haha, so my guess was right
 
Has anyone looked at the productions in ES2015? Why does StatementList only include return and expression statements? tc39.github.io/ecma262/…
 
i'm using jasmine to spy on a backbone render method, i want to get a reference to the object passed into the render method, and not just use jasmine.objectcontaining
 
and, for the love of god, i can't seem to find anything that even says if thats do-able
has anybody got any bright / genius ideas
 
@littlepootis you're not even trying
just hiding links doesn't work anymore
 
3:12 PM
@ŠimeVidas statements are part of an expression, aren't they?
 
@ssube no
expression statements are only one of a dozen of statement types
 
is this a valid question for SO ?
 
heh, a person has probably tricked scammers pretending to be "from MS tech support" to get access to your system.
but TIL such scam is widely used in USA
with a lot victims sadly
 
@Mathematics probably not. Asking what pattern is most appropriate is probably better for programmers.SE
 
It's very common here too.
 
3:16 PM
I think they were just giving an example there.
 
@ssube true, I made it better now
what do you think
 
@KingMob yes, Statement production exists; but it's not "connected" to ScriptBody which is where it all starts
 
@Mathematics asking about best practices is still better for programmers. SO is (more) about bugs, and codereview is about improving working code.
 
@Mathematics you shouldn't find a pattern to match your targets. That's got misunderstood often. patterns can be used during the design phase, but you already have designed something. ( PS: there is no GoF pattern that fits your requests though )
 
@ŠimeVidas Wait, I found the bit you mean. That's just a draft though. Looks correct in the link I gave.
 
3:21 PM
@KingMob Both versions look the same to me. (My version also has the Statement production)
 
@ŠimeVidas ES2015 has StatementList defined differently from that draft.
 
@KarelG what? Well-designed code very often ends up fitting a design pattern.
The GoF book is horribly out-of-date and never showed best practices
 
@KingMob I can't find a definition (other than the one in 5.1.5 ecma-international.org/ecma-262/6.0/#sec-grammar-notation)
 
There are a whole slew of other patterns they don't cover, but most clean code now fits into one of them.
 
i have some private methods on an object foo, that get passed to another object bar, via a method 'render'. I have a spy on this render method. How the hell can i get a hold of the foo object so I can test it's methods
 
3:24 PM
@ŠimeVidas Scroll down a bit from where my link took you.
 
www.theJSroomRocks.com/jk
 
@SteveG you can't directly test private methods. You shouldn't. Test the object's contract.
Use code coverage tools to make sure you're hitting the private methods as well.
 
@KingMob Nice! Thanks.
 
hey
 
@orvi Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
3:25 PM
@ŠimeVidas No probs.
 
I have a question
 
@KarelG I mistakenly said I need to know a pattern, I am actually struggling to put requirements down to code
 
I do not understand something related to javascript.
 
@orvi I have 2
 
console.log("5"-1) it should give me an error instead of it gives me 4 .
 
3:28 PM
Why should that give you an error
 
can anyone explain me the reason ?
because here I take it as string .
 
It coerces the string to a number because you did a minus operation.
 
unary conversion applies to the 5, converts is as a number, and does the sbtraction
wait does unary mean +?
 
RegExp pattern to match a pattern
 
unary operator means, +1, or -5, etc, a single input
e.g. -a
 
3:29 PM
temp-connection-${uuid}-${uuid2}
where one of the uuid is known ?
 
But when I take '+' it does not take it as string
 
@orvi that's because it's doing concatenation with a +
- doesn't concat, so it converts and subtracts
 
FFS jsfiddle.net/dadd68cq/2 the fuck is wrong, why does this scrolllspy not trigger at the end of the document
6
 
so why other programming language don't act like that ?
 
Because they aren't javascript?
JS has different specs
 
3:33 PM
Just because languages may look similar, don't assume they work the same.
 
If every language had the same specs, there wouldn't be different languages
 
is this worded any better ?
 
@SterlingArcher halp
I think maybe an offset issue?
 
@rlemon several issues, put it as a question on SO ;)
 
is there any other language which follows unary conversion ??
 
3:35 PM
hmmm
@orvi you can google that
 
@orvi C# when you use console.Writeline --- Ignore it
 
okay . :) Thanks anyway :)
 
@rlemon looks like the scrollspy triggers when the previous div has left the page?
The last div does not reach the top
So maybe add to the bottom so there's enough at the bottom to trigger
 
can you fix the css so it triggers?
 
I can try
OH MY FUCKING GOD I HATE YOU
 
3:37 PM
:D that was way better than I expected
omg my sides
 
@ssube lol yea that was great advice
 
You sick son of a bitch how could you
I TRUSTED YOU
 
:D
ohh I need to take a walk
I'm literally crying I'm laughing so hard
!!afk vape and laughs
 
what I didn't get here ?
 
triggered
 
3:39 PM
I... I just can't.
 
But can you even?
 
I don't even see the freaking source to do that
@rlemon how in the hell did you do it?
 
Scroll way down in the js
 
Sneaky
 
That is probably my best setup yet
 
3:41 PM
5/7 the best
I'm so angry
 
Lol
 
how?
how does it work
 
@rlemon thought it would be more then that
 
I need a volunteer to test my game
 
3:47 PM
Ill test!
Im bored at work
 
Kewl
Create an account, login, and join my game
(Only ben please, ya'll can play after I make sure it's working)
 
I dont have an option to join game
 
@BenCraig find me on the map
Get on my tile
 
> WebSocket connection to 'ws://sourceundead.com/socket.io/?EIO=3&transport=websocket&sid=f-' failed: Error during WebSocket handshake: Unexpected response code: 400
 
3:49 PM
Yeah I need to fix that
 
I have no actions
nothing works
your game sucks bro
 
@BenCraig ok, I'm going to move North
You should see a blinker
 
ya, it flashed red
 
Where was the blinker
 
top tile
top center
 
3:50 PM
Ok, I'm going to move west
 
top left
 
Where was it
 
I saw nothing
 
YESSSS
@rlemon you're not in our range of hearing
 
how do I move
 
3:51 PM
When a player moves in your range, it sends you a direction of the noise
 
you click
 
click a tile (not the center)
 
crl
would be funnier if we could write var o={4: {6:0}}; o.4.6
 
I'm going to bind wasd to move as well though
 
server down
 
3:51 PM
lemon disconnected D:
 
it would be nice if I could see my own tile location without having to try to read the log
 
> Sorry bro, the server ain't runnin'.
 
and how did you know who I was huh?!
 
@BenCraig yeah I'll add that
Hmm, I think it I know why it broke
 
3:52 PM
well there were only 3 people in the game
 
because your turds are green?
 
I think the session was destroyed before it could delete you from Redis
oops
Ok, i'll add in a "Your location" next. But thanks for testing :)
Nifty?
 
np - ping me anytime you need someone
Its pretty neat
I was pretty confused the first time it flashed, because it was before you told me to expect it
 
okay grandpa
 
the wasp's nipples
 
3:56 PM
@BenCraig yeah I probably should have explained first lol
 
@SterlingArcher Florida little man strikes again!
 
cc @Meredith
 
@rlemon Someone needs to turn Florida Man into a comic.
 
pretty sure tghey have
yup cc @Meredith @SterlingArcher
 
@SterlingArcher How many times are you going to mis-spell sorry on your page?
 
4:08 PM
As many as I want!
 
@rlemon Oh my god, that's amazing.
 
user1596138
@SterlingArcher sorry
 
@SterlingArcher that is a very Canadian error page
 
4:24 PM
@SterlingArcher I made you a new error page jsfiddle.net/dz80dyjo/2/show
4
 
cc @Loktar ^
 
for some reason if I do this:

npm i –g karma-cli

I get this:

npm ERR! addLocal Could not install /Users/me/foo/–g

I'm like, are you serious
 
permissions needed for global install?
 
lol
I don't know why I posted lol... I was reading imgur and thinking about Hell Pig and it's BBQ consequences and I posted lol assuming yall knew but I didn't even give context
Can I go home now... I think I broke a chromosome
 
4:30 PM
I hope you have headphones
because that 404 page has music
 
@rlemon What song is that?
 
america, fuck yea
 
honestly, I should have been able to guess that
 
@Meredith snek
 
4:36 PM
@SterlingArcher sneks
Noodle Snek is beautiful
 
--global works
 
!!afk tacos? probably not tacos
 
:D
 
4:45 PM
@SterlingArcher rlemon is afk: tacos? probably not tacos
 
5:04 PM
is it just me or is np becoming scary with messages like:
npm WARN prefer global coffee-script@1.8.0 should be installed with -g
when you run ni on a clean repo
 
@KendallFrey OMG
 
@copy bring me the laundry
 
@BadgerCat Uhhh, that's your job!
Pleasedon'tbeatme
 
@Trasiva I'm folding it! He just had to bring it
 
Careful, she'll revoke your snapchat access
 
5:15 PM
@SterlingArcher I don't have access.
@BadgerCat Ohhh, well if that's the case, crack da whip!
 
@BadgerCat you dropped from my best friends list on Snap. We gotta fix that
 
@SterlingArcher yeah :)
 
YEAH!
but first vape
!!afk @rlemon is an ass
<3
 
user1596138
@SterlingArcher wtf
 
@ton.yeung there's a native Map now.
Yeah
@ton.yeung it's iterated in insertion order.
That's Array#map and not Map
sure
 
crl
5:26 PM
function min(...a){
	let i=0;
	for (let j=1; j<a.length; j++){
		if (a[j] < a[i]) i=j;
	}
	return [a[i], i];
}
the min as it should be
 
@BadgerCat snapchat ?
 
@Abhishrek yeah
 
add darkyen
 
@crl that's argmin.
 
crl
5:33 PM
yes, however I need both index and values, and getting the value afterward is ugly since I pass computed values
 
someone's having a bad day
 
@crl If the caller gets the index he can also get the value
 
crl
let [dX, iX] = min(abs(e.clientX-r.left),abs(e.clientX-r.right)) // where r is a boundingRect
if (dx<..){
   let col = ... + iX
}
 
@SterlingArcher they're evolving
 
@rlemon SterlingArcher is afk: @rlemon is an ass
 
5:35 PM
@rlemon Only one person died too.
 
!!refresh
not anymore!
 
@SterlingArcher Ohhhhh, the lemon got yo ass!
 
yea, afk's are stored in memory only
refresh kills them, same with nudge
 
crl
my boss also doesn't like my 1 or 2 letter vars :(
 
@rlemon What if you nudge a nudge with a nudge?
@crl You shouldn't use those anyways. Use meaningful vars so that someone coming behind you knows what's going on.
 
5:39 PM
let d = [r.left, r.right];
let index = min(map(x => abs(e.clientX - x), d));
let dX = d[index];
 
Ahh.push(it);
I'd allow
 
Meh, yours might be better
 
@rlemon Well yea, that'd be fine.
 
crl
thanks anyway
 
I used to have a rule for my troops. When I did the code review with you, every variable that didn't make sense, or block of code that was just obscure enough to have a question, boom, 50 push ups.
 
5:42 PM
poor troops
 
meh, they just waited till he went to bed and pissed in his shampoo
@SterlingArcher youtube.com/watch?v=LqlagXEBirA cringe commercial
probably on purpose
 
crl
I always think ternaries are prioritaries 6 + 1?2:3 but no..
 
@rlemon Wait, what'd I miss there?
 
user1596138
@crl hmm
 
user1596138
@crl Is it always 2
 
crl
5:46 PM
yes just for the example, 1 is a var in code
 
@crl You named a variable 1?
 
user1596138
I know what he meant lol
 
crl
@Trasiva sometimes I wish :)
 
it is in other industries
 
@rlemon That's complete and utter bullshit. Yet another reason I'm glad I don't use crApple.
 
5:52 PM
tl;dr apple has a hardware trigger that makes it so you can only get your iphone serviced by them or else it bricks it -- like totally fucking bricks it
 
@rlemon That would be surprising, but... it's Apple
 
how can I add an event listener to the parent container to check if the child element is a checkbox and they are type INPUT. (instead of attaching the eventHandler to every single element) fiddle is here: jsfiddle.net/nu5m2kee/5
 
I've seen this question before
like 4 hours ago
:P
 
@rlemon Yeah, I had to go for a job interview. :(
sorry
 
$(parent).on(event, selector, fn);
replace as you need
this is jQuery event delegation using .on
there is a lot of good resources to learn how to use it
 
user1596138
5:56 PM
@rlemon Respect their authoritah
 
@KendallFrey It shit like this that amazes me that Apple has managed to maintain their relevancy in the world.
 
"status symbol"
 
@rlemon Yeah, your right. I'm just brain dead, been staring at this code for too long :)
 
take a nap
 
user1596138
I bet Apple didn't deliberately check for third party fixes lol...
 
5:57 PM
@jhawins if you read the article they have put forth a system where they are the only people able to repair the home button
 
@rlemon that's so bullshit
 
user1596138
I read the entire article. And it's speculative
 
so if your home button has been repaired by a third party and you take the new OS your phone bricks
it isn't
there is a shit load of people complaining about it
google apple + error 53
 
user1596138
I bet it's a software bug related to security in the home button. They are looking for something that they expect to see in software, they don't, so they error out in the name of security.
 
@rlemon That is a very good idea, good sir.
 
5:58 PM
apple says they will fix the phone, for a feee
@jhawins that is exactly it, but it isn't a bug
it is apples design, which is what is shitty about it
 
user1596138
They'll release an update that fixes it and apologize, just watch.
 
they could have made it a pin, or better yet, removed the repair cost
 
user1596138
These articles are too fast.
 
@jhawins doubtful, this is key to their apple ID crap
 
user1596138
Someone is getting fired over this lol. But I bet they didn't intend to brick phones, it's bad for business dude.
 
5:59 PM
Apple opted to go this route instead of putting in the correct means for a user to verify that the 'modifications' mode on their phone were approved by them.
 
if you read the article, the phone is only bricked until you send it to apple
 

« first day (1938 days earlier)      last day (3017 days later) »