mag487
Re:CSS is unnecessary given a layout language
on Friday July 04, 2014 @12:38AM (#7987364)
That code is doing a lot more than just layout and styling.
Re:Ask HN: What's your speciality, and what's your "FizzBuzz" equivalent?
on Thursday January 02, 2014 @02:47PM (#7001771)
It may be a useful sanity check to simulate the experiment multiple times to see the result:
def choose_coin
rand < 0.001 ? 1 : 0.5
end
def flip_coin(coin)
rand < coin ? :heads : :tails
end
def all_10_heads?(coin)
10.times { return false if flip_coin(coin) == :tails }
true
end
next_flip = { :heads => 0, :tails => 0 }
1000000.times do
coin = choose_coin
next unless all_10_heads? coin
next_flip[flip_coin(coin)] += 1
end
puts next_flip[:heads].to_f / (next_flip[:heads] + next_flip[:tails])
Re:Contractors See Weeks of Work on Health Site
on Monday October 21, 2013 @12:51AM (#6583415)
It's hard to imagine that even those could total more than a small fraction of the purported 500 MLOC. The JDK is only a few million lines of code.
Re:Contractors See Weeks of Work on Health Site
on Monday October 21, 2013 @12:47AM (#6583397)
I'm having a really hard time believing that figure.
Re:Make No Promises
on Saturday August 24, 2013 @02:39AM (#6267908)
Why would having multiple cores make the event loop cycle faster? Maybe I misunderstood and he was using "Moore's law" to refer to exponential increase in processor speed rather than transistor density (which is what I understand Moore's law to be talking about). But commercial processors aren't really getting much faster anymore.
Re:Make No Promises
on Saturday August 24, 2013 @02:33AM (#6267897)
Yes, but that doesn't give you a great way to deal with attaching and canceling multiple callbacks simultaneously. If you want to perform several independent asynchronous actions after some other operation finishes, you have to collect them into a single giant callback in one location. And as you mention, the function has to keep track of some piece of mutable state in order to decide whether it's cancelled or not before firing off those operations. So why not give the function a mutable array of asynchronous operations to perform to begin with, which you can then add to at any time? And at that point, you already have a something very close to a promise.
Re:Make No Promises
on Saturday August 24, 2013 @02:07AM (#6267835)
That's a really good point. I hadn't been completely sold on the value of promises over callbacks before, but this seems like a very unambiguous advantage. I can't think of an obvious, clean way to do this with callbacks that doesn't go a long way toward simply re-implementing promises.
I imagine an advocate of core.async would argue that they have a good analog for canceled promises, though, namely closing channels. On the other hand, closed channels will still yield nil when read from; the procedures trying to read from a closed channel would need to check for that.
Re:Make No Promises
on Saturday August 24, 2013 @01:00AM (#6267695)
How's that? JS is single-threaded.
Re:The Man Who Invented Modern Probability
on Thursday August 22, 2013 @06:11PM (#6260439)
I haven't really studied algorithmic information theory, but I'd assume that Kolmogorov complexity isn't defined for uncomputable/undefinable numbers. Or maybe it's defined as "infinite," but either way, my guess is that such numbers are simply ignored. (Interestingly, the function which takes a computable number and outputs its Kolmogorov complexity is itself uncomputable!)
Re:The Man Who Invented Modern Probability
on Thursday August 22, 2013 @05:49PM (#6260320)
There's only a countable number of formulas of ZFC. Therefore, there's only a countable number ways of writing out a formula of ZFC that uniquely specifies a real number. Therefore, only countably many real numbers exist that have such definitions. And all countable sets of reals have zero Lebesgue measure.
Re:The Man Who Invented Modern Probability
on Thursday August 22, 2013 @05:18PM (#6260157)
The key phrases there are "almost surely" and "most irrational numbers." There are irrational numbers like pi which can be defined algorithmically, but taken together as a set they have zero Lebesgue measure. (In fact, they're countable.)
Re:Google Fiber Plans & Pricing
on Friday July 27, 2012 @10:05PM (#4304445)
I wouldn't include their pricing structure as part of their marketing, though it doubtless attracts many users. (So do their algorithms, but those aren't included in their marketing, either.) And insofar as they have a reputation for giving away their services for free, that's a part of their heroic image.
Re:Google Fiber Plans & Pricing
on Thursday July 26, 2012 @11:04PM (#4299816)
It's an awesome motto that's served them extremely well. Google's ability to frame themselves as the "good guys" is the only real marketing advantage they have.
Re:Peter Thiel on "Founder as Victim, Founder as God"
on Thursday June 07, 2012 @09:33AM (#4078915)
I don't see how he's being scapegoated. What failure is he being held personally responsible for?
Re:Facebook Advertising is Fool's Gold
on Tuesday May 29, 2012 @11:28AM (#4037902)
Not trying to defend the viability of FB ads here, but this analysis seems a little shallow. Falling within a certain demographic may not "make" you click an ad, but the same could be said of performing a search on Google. If circumstance Y makes one want to buy a product, then as long as falling within demographic X is correlated with being in Y, targeting X could be a good idea. It is (obviously) the reason why toy commercials air during children's shows and not during basketball games.
Re:On Counter Offers
on Thursday May 17, 2012 @11:49PM (#3990276)
I agree with the author that getting a ridiculously generous counter offer is a red flag about the company's management, and this alone constitutes a reason to reject the proposal. However, his moral indignation at the thought of being paid more to defer work on an activity he cares more about is misplaced. It's silly to frame the negotiation as the company intentionally trying to "buy off his dreams." Most people have a variety of "dreams," many of which can be better achieved by having more money. As far as the company knows, doubling the author's salary could let him achieve the alternate dreams of getting out of debt or buying the house he's always wanted.