Better HN
topnewbestaskshowjobs
Log inSign up

bcoates

5,109 karma · joined Jun 27, 2012 (14y ago) · 1,639 submissions

ben blueskylabs com
Submissions

comment 13y ago · link · parent

I think going this way is going to turn out painful. The sort of immutable container logic that people associate with FP is against the nature of C++ and you'll be constantly bumping into other people's code, and parts of the library, that don't like it.

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

Linked pairs of pie charts are a remarkably uninformative way of showing time-series information.

comment 13y ago · link · parent

Near the bottom the article briefly mentions that the regulators were worried about "self-dealing" in the Facebook-Instagram deal, where someone was offered a personal side benefit for making the sale happen.

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

Does hydrogen have anything to offer over synthetic petroleum as a vehicle fuel?

comment 13y ago · link · parent

It assumes 2030 technology that doesn't exist yet. Check back in 18 years, then we can start the many-decade project of deployment. Pencil in 2080 or so.

comment 13y ago · link · parent

Drivers will want them charging during peak usage hours, and the grid will want them discharging, so grid integration can only do so much, unless you expect drivers to massively subsidize the power grid by buying batteries they don't want. Hydrogen is not viable and as far as I know has never been taken seriously as a fuel storage or transport material.

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

IE and Chrome scroll by a little less than a full screen so you get some overlap, as long as you keep your fixed footer very small, like one or half a line of content text, you should still be OK.

comment 13y ago · link · parent

I've used history.replaceState API add a position indicator on long infinite scroll pages into the page hash so you get

  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

If these social networks wished to discourage such behavior, they could create a "most popular comment" feature that pinned something you said publicly and in the last few months in your public profile, then quietly tweak their algorithms to prefer public lynch-mob dickishness or other bad behavior to this spot.

comment 13y ago · link · parent

Racter was more of a William S. Burroughs cut-up program, it mostly randomizes and regurgitates it's input. Policeman's Beard required carefully selected input and is on the border of being a hoax.

comment 13y ago · link · parent

That is the political process. The gun lobby can deliver votes, the anti-gun lobby can't.

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

I always hear people worrying about this, but it doesn't sound likely at all. Has it ever happened?

comment 13y ago · link · parent

Most wars are still primarily men + logistics + intelligence + rifles, the rest is just details.

comment 13y ago · link · parent

Attempted mass shootings that fail like that don't get nearly as much news attention...

http://en.wikipedia.org/wiki/2007_Colorado_YWAM_and_New_Life...

comment 13y ago · link · parent

Politicians talking about a topic is not the cause of political change, it's the result of one. There is currently a public consensus against your preferred policy position to the extent that it's disadvantageous for politicians to promote themselves with it. Changing that consensus won't lead to victory on its own, but it's a necessary precondition.

comment 13y ago · link · parent

It's sufficient to disable third party cookies and not browse cookied by major social networks to prevent this right?

Ignoring the part where you can be "tracked" by company, but that's just looking up public IP records.

comment 13y ago · link · parent

There's a little sign at the cash register of most stores in California to that effect, that you are entitled to buy at the lowest advertised price.

comment 13y ago · link · parent

You're already on a cloud system, so you have to have a plan in place for your instance to up and disappear without warning. If your instance has an unplanned outage of any kind, you kill it and spawn a new one. You may as well use libeatmydata and reap the performance benefit.

comment 13y ago · link · parent

I love my consumer SSD backed database, but don't get visions of 380,000 IOPS on a real workload quite yet. Like any radical performance increase on just one component it's more likely to just reveal a non-disk latency bottleneck somewhere else in your system.

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

Is the file of resources available anywhere? The link in the article is broken.

edit: fixed now

comment 13y ago · link · parent

Editing visual studio project files with text editing tools works just fine, they're pretty-printed XML.

comment 13y ago · link · parent

I've found plotting out call graphs and dependencies with GraphViz to be helpful in decoding and fixing spaghetti code, and as a big-picture documentation tool in general.

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

If typing into the search box isn't cheating:

1. Open folder

2. `type:text` in search box

3. Click 'ignore_me.txt' file to exclude, if you can't find it start typing 'ign...' until it shows up

4. Edit > Invert Selection or Alt,E,I

comment 13y ago · link · parent

I think awk gets a pass because it's a programming language with a handy syntax for running small scripts. Find is in an awkward position of being not quite that general but still very complicated.

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

Surely they won't be that dumb and will just default via Chapter 9 city bankruptcy? I'm mostly wondering who's dumb enough to trade good cash for bad debt on those terms.

comment 13y ago · link · parent

The drawing on the page is confusing. It depicts the "pieces" as contiguous solid chunks--but in order to reassemble the sphere into two, don't you have to pick sets which are more like general predicates on the points of R^3? Those don't look like puzzle pieces.

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

Massive subsistence farming in Ireland was not caused by the size of the population. If there were half as many people in Ireland in 1945, there would not be twice as much food to go around. The half-sized population would still have been packed into as little land as they could survive on. A crop failure would still mean starvation.

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

The Irish Famine was caused by a mixture of a routine crop failure and awful policies both leading up to and during the blight. Ireland's population was not extraordinarily large compared to its production capacity at the time.

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

Have the various spam-blockers of the world gotten more complacent? This seems like the sort of indiscriminate crawling that would get you both a lot of valid e-mail addresses and a permanent home in everyone's junk folder.

comment 13y ago · link · parent

Wow, that Wikipedia article is awful, and a fantastic demonstration of how hobbyhorse subjects on Wikipedia tend to get filled with crap.

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.

1
505152
55