5,109 karma · joined Jun 27, 2012 (14y ago) · 1,639 submissions
comment 13y ago · link · parent
C++ style prefers
for_each(xs.begin(), xs.end(), f);
to xs = std::transform(xs,f);
Because the first does not copy the container and its elements, which in C++ is a meaningful operation which may not be allowed for xs's elements, or may be remarkably expensive.I thought the annoying verbosity when using the whole container with <algorithm> was fixed in C++11 like it was for for loops, but I can't find documentation to that effect. Boost's range algorithms library is still useful here:
http://www.boost.org/doc/libs/1_52_0/libs/range/doc/html/ind...
comment 13y ago · link · parent
It's a serious problem in corporate governance in the US, but it's not in the interests of any individual involved, including the victim, to uncover any particular instance of it, because the deal is done and a prosecution would only damage the company they presumably still own.
comment 13y ago · link · parent
Centralized battery works just fine but it's currently cost-prohibitive. I'm not sure why the paper's authors think that will change by 2030.
comment 13y ago · link · parent
http://somesite/foo#scroll=20121104120000
It has some rough edges, multiple jerky transitions on uncached load, for some reason replaceState is an expensive operation on Chrome, but it was a better experience than the alternative for that page (pagination or forgetful autoscroll)comment 13y ago · link · parent
comment 13y ago · link · parent
Support for gun control is extremely shallow, a lot of people are for it if asked a yes/no question but the activist population of people who would change their vote, volunteer time, or donate money is tiny.
comment 13y ago · link · parent
http://en.wikipedia.org/wiki/2007_Colorado_YWAM_and_New_Life...
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
Be aware that the performance characteristics of flash are very unlike spinning disks, and vary widely between models. You will see things like weird stalls, wide latency variance, and write performance being all over the place during sustained operations and depending on disk fullness. I chose Intel 520s because they performed better on MySqlPerformanceBlog benchmarks than the then-current Samsung offering [1] and because of OCZ's awful rep [2]. I hit about 5K write IOPS spread across two SSDs before my load becomes CPU-bound, which is nowhere near benchmark numbers but pretty sweet for a sub-$1k disk investment.
It's also my understanding that non-server flash drives like recommended by the article do not obey fsync and are suspect from a ACID standpoint. RAID mirroring does not fix this--if integrity across sudden power loss is critical you might not be able to use these at all and will have to find a more expensive server SSD.
[1] http://www.mysqlperformanceblog.com/2012/04/25/testing-samsu...
[2] http://www.behardware.com/articles/881-7/components-returns-...
p.s. the RAM benefits the article mentions are real and potentially huge. My query and insert performance has gone from having heavy RAM scalability issues to it hardly mattering at all. This is all on MariaDB on a non-virtualized server; I'm looking forward to better SSD-tuned databases in the future doing even better.
comment 13y ago · link · parent
GraphViz is a tool that converts a text format to images, not a pointy-clicky WYSIWYG thing, so I'm not sure how much of a defense of visual programming that is.
comment 13y ago · link · parent
The solution to filenames with newlines in them is one garbage-safe script involving 'rm' and a stern email to whoever created the file. Containing complexity instead of letting it leak into every single script is a good thing.
comment 13y ago · link · parent
It's like depicting the irrational numbers by coloring everything on a number line between pi and e blue.
Is it possible to do the cut-up-and-reassembly trick with a finite number of sets where the membership is computable? If so the "Banach-Tarski Algorithm" for the special case of duplicating the sphere might be helpful for understanding.
comment 13y ago · link · parent
There was no surplus to fall back on, not because the population was so large that it overwhelmed reserves, but because the surplus wealth of Ireland was being systematically extracted so no such reserves could be built.
comment 13y ago · link · parent
Crop failures haven't stopped happening, populations have risen quite a bit since the 19th century, but mass starvation still happens or doesn't happen entirely due to policy not a literal shortage of food.
comment 13y ago · link · parent
Contra that shitty graph at the top of the article, population diverged from the historical trend of exponential growth in the 1950s. Worldwide birth rates have peaked. The largest cohort of babies the world has ever seen was in the 80s. The population is now growing solely due to increased lifespans.
Much to the disappointment of everyone waiting gleefully for mankind to suffer for its many sins, the Malthusian crisis has not happened, and will not ever happen.