« first day (1718 days earlier)      last day (3224 days later) » 

9:03 AM
Just noticed: The stackoverflow logo is backed to original.
 
NOOOOOOOO
 
YAYYYYYYYYY
 
So that means so-meta can return to questions about downvotes?
 
I liked StackRainbow :(
 
@JanDvorak s/^Y/G/
 
9:07 AM
@ivarni I laughed so hard!! Now, do I have a special place in hell?
 
@Gideon I wouldn't know, ask someone who believes in those kind of things :)
 
@uselesschien Why you removed your "there's __ hell" comment?
 
@uselesschien I agree.
 
Fun-fact, I've actually been to Hell. It's a small town outside Trondheim in Norway. We went there for a blues-festival. Got a t-shirt somewhere.
 
@Gideon ssshhh
 
9:12 AM
32hr 45min flight to get to Hell :(
 
@uselesschien But your a unpatriotic antitheist......
 
you're*
also, everything you just said is stupid.
 
> A completely emoji-based programming language
 
@phenomnomnominal OK?
 
@BenFortune looks like brainfuck with unicode chars
 
9:15 AM
@phenomnomnominal But hey, it's really close to the airport when you land
 
@ivarni new life goal is to move there
 
@FlorianMargaine That's pretty much it :P
 
glob patterns in browserify-shim ??
i have an entire folder of plugins exporting the same thing...
 
9:30 AM
> Use each of the numbers 1, 3, 4, and 6 exactly once with any
of the four basic math operations (addition, subtraction,
multiplication, and division) to total 24. Each number must be
used once and only once, and you may define the order of
operations; for example, 3 * (4 + 6) + 1 = 31 is valid, however
incorrect, since it doesn’t total 24.
 
tbh that sounds like a job for a brute-force script
 
@AwalGarg solved it.
Want the answer?
 
not yet
 
Ok, here is the answer in base64 encoding for when you want it "KDYvKDEtKDMvNCkpKQ=="
 
thanks
 
9:36 AM
@BenjaminGruenbaum How did you do it?
By hand, right?
 
@SomeGuy base64 decode it and you'll see how.
 
Oh, I already did
 
Oh, you mean how I approached it? These questions always have the same trick.
 
Yeah
 
The first time I solved a similar styled question it was during an interview and I just sort of figured it out.
 
9:37 AM
What's the trick?
 
No particular mental process.
 
o/
 
\o/
 
@BenjaminGruenbaum hey man, how was the conference? is the recording available already?
 
9:45 AM
@GNi33 it was awesome, no recording yet, should be about two weeks more (they said around a month)
 
great. you did get to meet some incredible people there I guess?
 
A ques. on probability. From my textbook. Smart people help.
> A card is selected at random from cards numbered 00, 01, 02,...,99. An event is said to have occurred if the product of digits of the card number is 16. If card is selected 5 times with replacement each time, then the probability that the event occurs exactly three times is..
 
@phenomnomnominal hey pal, how's it going in NZ?
 
@uselesschien Think about all the digits that have a product of 16 first
 
@GNi33 pretty chilled out!
 
9:48 AM
what are you up to lately?
 
You need to figure out how many cards would qualify for that
 
@GNi33 mainly just work and shit!
cruising here and there to go to shows, that's about it!
 
28, 82, 44. Those are all I can think of
When you pick once, P(event) = 3/100
 
and P(!event) = 97/100
 
Now we have to figure out the combinations you can form
Like EEENN where E is the event, and N is getting any other card
You can get ENENE as well
 
9:51 AM
except order doesn't matter here right?
 
P(e) = 3/100, P(!e) = 97/100
 
First, the probability of getting exactly 3 out of 5 is: (3/100)^3 * (97/100)^2
 
?
@SomeGuy yes
 
That's the probability of getting, say EEENN
What about EENEN?
It's the same probability, but it's a different event
To account for all of them, you multiply the probability of one (what we figured out earlier) by the number of times it can happen
Which is 5 choose 3
 
Employ combinations
 
9:54 AM
Beware of me being stupid and making mistakes, btw :p
 
I don't agree that you need to get all the combinations. Just not how I read the question
 
@GNi33 yes, got to meet some really awesome people :) How were your past few weeks?
 
@phenomnomnominal There are so many ways you could get exactly 3 out of 5
You need to account for them all
 
There are 5C3 ways, right?
 
EEENN and NNEEE have the same result, but they are distinct outcomes that could happen
Yeah
 
9:55 AM
@phenomnomnominal you need to count all the combinations, not actually get them.
 
The number of combinations is 10?
 
yeah, but the probability of each event occuring is constant right?
 
Also, it's with replacement.
@phenomnomnominal yeah, but we're not doing dependent probability, no cards have been picked yet.
 
too long since my old brain has had to do this stuff :)
 
We can pick the same card twice, so it's not a "choose"
It can be done with inclusion exclusion, not terribly hard.
 
9:58 AM
I learned about inclusion-exclusion only yesterday!
 
Let's start with: how many cards are there in the deck whose digit sum is 16?
 
3 cards
Oh, sum?
You meant product, right?
 
product
There are 3
 
Oh, it was product, doesn't really matter
 
Yeah, haha
 
10:00 AM
Still 3 cards, 2*8, 4*4 and 8*2
What is the probability of one of getting one of these cards when we draw a card?
 
3/100
 
@uselesschien ^
Right
Now, what is the probability of all 5 cards being one of these three?
(Remember, it's with replacement so after we choose a card and write down what we got we return it to the deck and shuffle)
 
10 mins ago, by Some Guy
First, the probability of getting exactly 3 out of 5 is: (3/100)^3 * (97/100)^2
 
No, he's talking about getting all 5 cards
What's the probability of getting EEEEE?
 
10:04 AM
7
 
@BenjaminGruenbaum my brute force script didn't find any solution. how did you do it?
 
@AwalGarg Brute-force is difficult because of how deep you can get with your parentheses
It's probably possible, though
 
@SomeGuy division by a number smaller than one. It's always the trick with these questions.
 
Might be a fun challenge
 
@SomeGuy only need to get 4 levels deep, can also prune very quickly
 
10:06 AM
I don't think @uselesschien is around anymore
 
You can also do it in RPN, would be simpler.
@SomeGuy I don't care, or do you want the answer for yourself?
 
Want to tell me how you can do the probability problem with inclusion-exclusion?
Yeah, I want it
(3/100)^5 for what you asked
 
Payoneer are rubbish!
$30 a year, just because.....
 
@SomeGuy Correct, now what is the probability of getting 4 of them right?
 
probability?
give me something..
 
10:07 AM
(3/100)^4 * (97/100)
Exactly 4, that is
 
Back.
@SomeGuy oh, misread
 
@SomeGuy why?
You have to pick one place to be N and 4 places to be E, the order matters :)
So it's either NEEEE ENEEE EENEE EEENE or EEEEN
 
Oh, right, multiplied by 5c4
 
Correct
So it's (3/100)^4 * (97/100) * (5c4)
@SomeGuy Now, what is the probability of getting exactly three?
 
(3/100)^3 * (97/100)^2 * (5c3)
Is this inclusion exclusion?
 
10:11 AM
@BenjaminGruenbaum sounds great :) has been nice, although I caught a cold about 2 weeks ago that refuses to go away
 
@GNi33 fervex
 
The way he taught us was thinking about sets and having to add and subtract the intersections alternately. That was the intuitive way, anyway. Next lecture, he'll dive deeper
 
Correct, now what if we wanted to calculate the probability of getting at least 3?
@SomeGuy no, not yet, ^
 
why are we discussing maths? just curious - making me feel 18 again :¬D
 
Oh, you wanted to answer at least
I was wondering how you'd use inclusion exclusion because the question asked for the case when you wanted exactly 3
Include 5, 4, 3, exclude 2, 1, 0
 
10:14 AM
@SomeGuy well, let's say doing "at least" is hard.
 
Okay
 
We know that "exactly 3 = at least 3 - at least 4 + at least 5" (inclusion exclusion) - right?
 
Right
Wait, I don't see why you add at least 5 at the end
at least 3 - at least 4 = exactly 3, right?
 
Now, we know exactly 4, right? And that exactly 4 = at least 4 - at least 5 (inclusion exclusion) so we know "at least 4" too, and can calculate "at least 3".
@SomeGuy ok, allow me to explain. Inclusion exclusion is all about double counting.
 
10:17 AM
hola
 
at least 3 = exactly 3 or exactly 4 or exactly 5
 
Oh, shit, hi @OctavianDamiean!
 
Oh hi @OctavianDamiean how have you been!?
 
I just hopped on to drop this in here as I think it is hilarious and sad medium.com/@boopathi/it-s-the-future-7a4207e028c2
but I guess that's what you get when you're working with such a volatile medium as we do
 
It's best explained with a picture, lemme find one @SomeGuy
 
10:19 AM
@OctavianDamiean!! HI :)
 
Right, got that
 
We have A, B and C, we are removing the intersections (B cap C, A cap B and A cap C), we have also removed A cap b cap c - right?
How many times did we remove it?
 
@OctavianDamiean How are your cats doing?
 
good good, we kind of adopted two more cats so we're up to 7
 
10:20 AM
@BenjaminGruenbaum 3 times
 
oh shit, @FlorianMargaine congratulations man!
 
I'm now living in Germany, but we can't have any cats :(
 
@OctavianDamiean thanks
 
@SomeGuy that's not something we should have done - right? So we need to add it back!
 
Yeah, I got that
 
10:21 AM
@BadgerCat oh nice to hear the former and sad to hear the latter
 
When we removed all the choices of 4 items, choices of 5 items were included.
 
I don't see how it applies for the at least 3 case, though
 
So we need to add those back, we want to remove them but not too many times.
 
at least 3 = exactly 3, exactly 4, exactly 5
 
@OctavianDamiean o/
 
10:21 AM
@FlorianMargaine so, how is it to be a daddy now, other than exhausting I'd imagine
 
at least 4 = exactly 4, exactly 5
 
@GNi33 bro!
 
how are you, man?
 
@OctavianDamiean exhausting :P and it changes your way to look at life
 
So exactly 3 = at least 3 - at least 4
Right?
@FlorianMargaine Must be the sleep deprivation
 
10:22 AM
@GNi33 fairly good, currently in the process of learning how to relax
 
@BenjaminGruenbaum OH
 
apparently there is this thing called burn out and it is a bitch
 
Wait, no. I thought I got it, but I didn't :P
 
fuck, hope you're fine, I borderlined that shit too, changed a whole lot for me
 
yea, I basically have to learn how to live
again
 
10:23 AM
@SomeGuy only in my example I used at least 4 and not exactly 4, but you're right in this case we didn't have to use inclusion-exclusion I just wanted to demonstrate it.
 
kind of
 
@OctavianDamiean burnout sucks.
 
@OctavianDamiean I don't know you but you seem popular here so hi! :P
 
he's our lord and saviour
 
bows
 
10:25 AM
@AwalGarg been a regular in here for a long time, I like unicorns and stuff and @Zirak is in fact my evil twin
 
or he's the other Austrian guy that has been around a lot, pick the one that fits for you
 
'cept he's smarter than me
 
11 mins ago, by Benjamin Gruenbaum
We know that "exactly 3 = at least 3 - at least 4 + at least 5" (inclusion exclusion) - right?
 
speaking of unicorns, I dreamed I was a unicorn the other day ... that was weird
 
I don't get why we're adding at least 5 back here
 
10:26 AM
are you still doing that downhill mountainbike thing?
 
@OctavianDamiean Zirak's twin? You are my lord and saviour as well henceforth.
 
on and off yea
 
you should probably do that a lot more now to get back on track, sport really helps you to clear your mind
 
started playing basketball but in reality that means I keep trying to hit that round thing with the other round thing and keep failing
 
I should start playing Calcio Storico, that looks like heaps of fun
 
10:28 AM
sounds like an Italian dish
 
I have absolutely no idea what it is
 
in which case I'd be interested as well
 
it seems to be a mix of Rugby and UFC fighting. bizarre
 
holy shit
 
that article made my day. thanks.
definitely sad that he went back to jquery though :P
 
10:33 AM
@OctavianDamiean maybe we should play a game of Terraria or something like that again some time
I need something to do when the gf is on her rally trip :D
 
@GNi33 go out and do all the things you want to do but normally cant
 
will do, will do
 
trust, got married 3 months ago and im already at the stage where i love it when she goes away to parents for the weekend
 
hehe
 
@GNi33 you have a new GF?
she pretty? :3
 
10:37 AM
no, still the same one ;)
 
ah
got reunited
 
but she pretty, yeah
yeah, pretty quickly
 
she was pretty much just freaking out because she didn't know what to do with her future. needed some time alone to get it all sorted out and it worked out again after that
 
@BenjaminGruenbaum I submitted it to HN :)
 
10:39 AM
@GNi33 in the words of the great Sheldon Cooper "Bitches be crazy"
 
but now I'm well aware that things can go to crap all the time and pretty quickly, that's just how it is
 
@AwalGarg submitted what?
 
@GNi33 thats what being in a realtionship is a bout, which is why you have to make her feel a million dollars, and vice versa
 
Ask for votes in the php room they'll help ya
 
@DrogoNevets exactly
 
10:40 AM
especser. what does php have to do with it?
hey no it has no backend
it is only client
 
@GNi33 you done the 5 love language quiz yet - its scarily good, and helped us out alot when we hit a rough patch
 
thanks
 
she likes to have her freedom, and I have absolutely no problem letting her have it. I like my freedom too
 
mine actively kicks me out of the house as often as she can she "Needs her 'me' time"

but its knowing things like that, that will make or break relationships IMHO
 
10:43 AM
now that I think about it i could have deliberately written a backend and in php only to irritate people :D
 
@DrogoNevets yeah. My gf will just hop in a car and drive from Ireland to Mongolia in a few weeks, so I'll have a lot of me time then :D
 
Failed to add a class with obj.className = obj.className + " error"; , is there a workaround?
 
classList.add
 
throws an error in my console
 
who's been the italian guys in here? I need some insight on Calcio Storico now
 
10:45 AM
which is
 
obj.classList.add('error')
Cannot read property 'add' of undefined
when the object is clearly there
 
@GNi33 mongul rally?
 
is the object a DOM node?
 
({}).toString.call(obj)
 
10:46 AM
@DrogoNevets yeah, it's so awesome. I'd go if I had the time
 
@GNi33 i was a support rider for a team a couple of years back (not strictly allowed but we didnt tell the organisers)
you should make time, it was amazing, and for such a good cause too
 
Remeber to adjust your clocks tonight btw, telegraph.co.uk/news/science/science-news/11706014/…
 
@DrogoNevets Just took it :)
 
@BadgerCat what were your top 2? i got words of affirmation and touch last time i did it
 
DOM node's .className returns undefined in Chrome
 
10:54 AM
acts of service and quality time
 
fair enough, dont forget, they change over time!
 
we can help better if you show us the output of the code I gave you
 
I don't know how to utilize your snippet
 
Now I just have to make my bf take it
 
just run it in the console?
 
10:55 AM
He hates these love things
 
@AwalGarg all I get is "[object Object]"
 
then it is not a dom node
 
Lol flagged, really?
 
@AwalGarg It's a <textarea>
 
@BadgerCat if he loves you.,....
 
10:58 AM
then it should show "[object HTMLTextAreaElement]"
 
its takes what, 5mins tops
 
@AwalGarg Yes, but it doesn't
 
and as i say, it helped me and my now wife realise how we needed to be loved wasnt the same as each others
 
@copy ^ if you love me, take the quiz
 
then it is not a dom node
 
10:59 AM
@DrogoNevets great! well, I won't make it for the rally. I'll meet up with them in Bali after they finished though ;)
 
I want to display these tabs as buttons, any clues ? jsfiddle.net/o2po93L4
 
@AwalGarg how do I add a class to it in this case?
 
mylefttyre.org/en <-- if you're interested about their team
 
@GNi33 awesome sauce!
 
11:00 AM
since it is not a dom node, adding a class to it requires defining what a class means for that object.
 
reminds me that I still have to finish their blog, dammit
 
then write a function according to that definition, and use it.
 
@GNi33 from a weird angle, the pic at the bottom looks like a farting turtle
 
the logo? haha
 
The wheel with a backpack
 
11:04 AM
that's not a backpack though
ah f..
always
 
@rlemon you're needed ^^^
 
@phenomnomnominal rlemon is afk: mowing lawn.
 
That's what happens when you own a house
 
Pretty sure he's just playing Last of Us
 
> Despite being able to tie his own shoelaces and hold down a skilled job, he made the astonishing (and 100% serious) observation "it really annoys me that they give us an extra day in February when the weather's rubbish - why don't they give us an extra day in the summer instead?".
 
11:09 AM
why this horizontal align not working, i want it in middle or center you know,
http://jsfiddle.net/o2po93L4/5/
 
@PleaseTeach read up on what vertical-align does and you'll know
the gist is: vertically aligning contents of a div when the height is variable, is a total bitch in CSS
oh wait...
 
@PleaseTeach or just use this: howtocenterincss.com
 
#flexbox
 
unless you use flexbox (doesn't work in IE) or tables (technically ugly)
 
horizontal align? you don't even try to align anything horizontally in that fiddle
 
11:13 AM
@PleaseTeach jsfiddle.net/o2po93L4/7 there you go
 
display: table :P
 
well, technically... :P
 
thank you guys
 
@JanDvorak I believe IE11 supports flexbox, and IE10 has the legacy one
 
is IE11 still IE?
 
11:15 AM
Yeah, last one before Edge
 
As if edge would be any different...
 
and mdn calls Edge as IE12 thankfully
 
Because it is :-D
 
Yes, exactly
 
@Main Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
11:22 AM
Lol, I got randomly voted for suggesting eval :D stackoverflow.com/a/31136862/1348195
 
I am more curious how he wrote all that code but does not know about eval.
 
@AwalGarg He probably didn't
 
Sure, Edge is different. It's always on the edge. :P
 
@BenFortune :((
Because eval makes code terrible slow. Never use it unless you have to. The correct way is new Function in this case. — Sebastian Nette 2 mins ago
 
LOL, there's a crowdfunding campaign for the Greek bailout
 
11:29 AM
@BenjaminGruenbaum: Is your question related to the discussion about RegExp.escape on the mailing list?
 
@nhahtdh Yes, and I also asked it explicitly in the list. Hi by the way.
@SebastianNette no it doesn't. The reason people say "eval makes code slow" is because they're cargo-culting things they heard years ago. If code is only run once then the performance of new Function and eval would be exactly the same - the difference is in scoping rules and is irrelevant in this quesiton anyway. — Benjamin Gruenbaum 2 mins ago
wth is wrong with this guy?
 
Is any of future versions of JavaScript (ESx) targeting simplification/removing quirks/etc of the language? (e.g. some bad properties are mentioned in "JavaScript the good parts")
 
That would be nice @MartyIX but, for that, you can use linters.
 
@MartyIX no, we have strict mode though (Since ES5), and like @RoelvanUden pointed out we have linters and tooling.
I expect my JS to be very different once value objects land in.
 
There were some rumors about "strong mode" by Google
 
11:31 AM
@BenjaminGruenbaum AFAIK, Adobe Flex (?) uses \x instead of \u, but since it actually doesn't implement \u, it's not really a compliant implementation
 
@BenjaminGruenbaum oh that sounds scary
 
@nhahtdh Adobe's AS isn't a valid ES. They diverged at one point (ES4)
 
I know about linters. However, it kind of scares me that only new features are being added to the language.
(Yet, I understand the rationale behind it.)
 
@MartyIX you can't break the web, and things are added slowly and carefully.
 
That's one of the problems with JS
 
11:33 AM
Yeah, that's why "use strict" was added.
 
too much stupid crap that the web depends on
Any language has its share of stupid crap, but JS has more than usual
 
One day a renegade browser engine will say "Stop, it's a mess, I'm done.". haha
 
good morning
 
in the future, there will be such a thing as 'use strict 2.0'
 
probably 'use esXX'
'use es6' would be pretty cool
 
11:36 AM
"use babel";
 
'use es7' too
@BenFortune haha awesome
 
JavaScript is the painting that was started by one man, and has been worked on by fifty men since.
 
well, I read some articles about "use strict" and they say it's hard to add all features to "strict" and "non-strict" version
 
@KendallFrey Like yo momma
2
 
11:36 AM
@Cereal haha +1
 
Do you think he's being cynical? I honestly can't tell
 
btw @BenjaminGruenbaum shouldn't Function be slower than eval for one time use? It has to create a new function object and all...
 
It's completely irrelevant, the difference doesn't matter (and it matters even less in that question).
 
yeah, but just technically
 
Saying "new Function is the real deal", I can't understand if he's being sarcastic or he genuinely doesn't understand performance at all.
What he probably wants to say is "new Function is important if you run code a ton of times and you want to utilize the JIT in a dynamic compliation way", or something like that.
So I'm not sure if he's mocking me or genuinely just cargo culting.
 
11:43 AM
@AwalGarg: Load bar when I press "Update" would be nice.
 
his fiddle doesn't make any sense. he is not evaling code, he is just introducing a new function in the scope via eval.
and using that function instead.
in strict mode his code won't even work
@Cerbrus yeah maybe :P
 
11:59 AM
@BenjaminGruenbaum Probably old knowledge that is no longer applicable + flawed test
 

« first day (1718 days earlier)      last day (3224 days later) »