This is exactly what I need! I've been planning an awards ceremony for the developers of the most efficient software running on my systems (measured in CPU cycles, obviously). This will make selecting candidates so much easier.
949 karma · joined March 25, 2011
This is exactly what I need! I've been planning an awards ceremony for the developers of the most efficient software running on my systems (measured in CPU cycles, obviously). This will make selecting candidates so much easier.
There's a long way to go from having enough bandwidth to serve your personal blog or small-time web app out of your {apartment, house, office} to getting what you'd need for a large-scale web app (at a minimum, redundant 100 Mbps fiber connections with five-nines SLAs) routed there. That and getting a nominal 100 Mbps connection from your friendly neighborhood telco is a lot different from getting a 100 Mbps connection you're expecting to saturate 24/7. The telco won't put up with that for very long, because they overcommit their subscriber bandwidth in the (correct) expectation that most of their customers will not use all of it.
Your users should not find out about these things via HN (or any other news site).
At this point, I don't think I can trust Dropbox with anything remotely valuable or private, and I bet I'm not the only person who feels this way.
http://altreus.blogspot.com/2011/06/anatomy-of-types.html
Not terribly useful to anyone who's been around the block in Perl at least once, but it's a great explanation of the three Perl variable types. Saving it for the next time I need to teach someone Perl.
Modern Perl is really a very different language than what people tend to think of when they hear the word "Perl". It has a real OO layer (Moose), a mature set of web frameworks (Plack), and generally-accepted best practices that ensure code is just as readable and maintainable as Python or Ruby.
If all you know of Perl is hacky one-liners for munging logfiles, skim a copy of the book Modern Perl: http://onyxneon.com/books/modern_perl/index.html . You might just learn something.
If I understand that correctly, we're dealing with a case analogous to the coin-flipping scenario.
And since, as you admit, there are infinitely many scenarios where a bogosort never completes, we cannot place a finite upper bound on its running time for all cases, which is what complexity theory's big-O notation is all about. As I stated, the average-case complexity for bogosort is in O(n!), but the worst-case complexity isn't bound by any function.
Given a uniform distribution over k discrete values (in this case permutations of the list), the expected probability of the next permutation is 1/k. This is not the same as saying that if you take k samples from the distribution, you are guaranteed to receive exactly one of each value. For any finite number n of samples, no matter how large, the probability of getting a given value tends towards 1 as n grows, but it only approaches it asymptotically. While the probability of not seeing any one value from the domain grows vanishingly small as n gets much larger than the number of possible values, it never hits zero. So even with a stochastically random source of list permutations, we cannot place a finite upper bound on a time in which bogosort is guaranteed to terminate.
It gets even worse with pseudorandom number generators — these display cyclical behavior over time (any good one will take quite a while to show it, but they all will), and you might have picked a seed for your PRNG that generates a cycle that never includes the sorted permutation.
So no, bogosort is not guaranteed to terminate. In practice, it has a reasonable chance of terminating for most inputs, and it will do so with an expected (not guaranteed!) runtime in O(n!) for a list of length n.
Hopefully if people can understand how targeted advertising works and what its limitations are (both in what it's allowed to do and what it's capable of) they'll be less fearful of it.
Nice bit of trivia there. I remember the Apple Extended Keyboard being big, but not that big. IBM Model Ms are pretty much the biggest keyboard I can think of.
It does exactly what you ask for.
(Also, it really bugs me the way he slams his own field -- discrete math is not exactly "arcane".)
def multiply_by_field(fieldname, multiplier):
"""Returns function that multiplies field "fieldname" by multiplier."""
def multiplier(x):
return getattr(x, fieldname) * multiplier
return multiplier
triple = multiply_by_field('Count', 3)
quadruple = multiply_by_field('Count', 4)
halve_sum = multiply_by_field('Sum', 0.5)
Other languages (most prominently Haskell, though you can convince most Lisps to do it through the clever use of macros) have built-in support for doing this with whatever function you want, and it's called partial function application. It's a rather useful technique and it saddens me that it's not supported as such in more languages claiming to support functional programming.In either case, this will require a rewrite of every piece of code that needs it.
Speeding up/backgrounding the JIT compilation phase is a transparent optimization that I'm sure some smart people at Apple, Google, and Mozilla are already working on.
And yeah, this is big news in the space. Google is clearly making a move into online display advertising, having all but conquered direct-response. It'll be interesting to see how they do. Display advertising has a vastly different set of challenges associated with it -- brands care first and foremost about the safety of the pages they run on, which means Google will need to be a lot more selective about the publishers they partner with for display, and brand lift through display advertising is a lot harder to measure than direct-response conversions.
(Obligatory plug if you're also one of the exceptions (or interested in being one): SAY Media, my employer, is hiring engineers! Check us out at http://www.saymedia.com/.)
A friend pointed me at Turntable today and I hung out there all afternoon at work -- it's a great replacement for Pandora for coding music. The human factor keeps it unpredictable and you can jump between rooms to get a different genre or mood when you feel like it.
I'm hooked already, and I'm rather pleased to read that they've already ironed out most of the licensing issue.
Also, that's a mighty powerful rhetorical weapon (going all the way back to African-American slavery) to be dropping in a discussion about some ticked-off software developers.
Looks like C++ is still one of the performance kings among current programming languages. Can't say I enjoy using it though.
It also looks like Go and Scala have a long way to go on compiler optimization. Not surprising, since they're young languages compared to C++ and Java, and it's a decent amount of work to optimize the higher-order constructs they provide.