skysight-inc/HackerNews huggingface dataset:
You do it like this (using async):

async.eachSeries(
players,
function(player, playercb) {
var valid = false;
async.whilst(
function() { return !valid; },
function(wcb) {
Ask("What's your name", function(name) {
if( IsValidName(name) ) {
player.name = name;
valid = true;
}
wcb();
});
},
playercb);
},
function() { /* done */ }
);

More lines than the foreach loop, but on the other hand, if this was an operation you wanted to do in parallel instead of sequentially, that'd be impossible with the simple loop construct.
It would be like that if you were looking at it decades ago when key sizes were small and cryptographers didn't have much faith in the one-way-ness of hash functions, or from the perspective of that branch of information theory which seems to permit the existence of arbitrarily powerful computers. A lot of guidance coughman pagescough is still written that way.

In the real world, our computers are limited by physics. It seems that in crypto, the least controversial assumption we can make is that given enough secret bits (i.e., entropy) we can be safe from brute force attacks.
In one line, using Go and goe [1]. :)

$ goe 'net/http' 'ListenAndServe(":8080", FileServer(Dir("/usr/share/doc/")))'

[1] https://github.com/shurcooL/goe
I'd contend that it wasn't designed to any significant degree. As the parent poster is trying to tell you, it just is. The system we have is just the result of the emergent behaviour of humans interacting, it's more down to chance than design, even if some elements seem predictable.

We haven't yet found a way to fairly spread privilege in our societies, so we're stuck with the least worst system, but I would note that globalisation has actually raised living standards in many countries from India to China, in spite of, or perhaps because of its deleterious effects. People always want to hoard wealth (almost everyone does this, even those at the bottom), and it's hard to change that. It remains to be seen whether we can effectively temper human desires and spread that wealth and not end up in dystopia, but please don't try to blame things on a secret elite directing a carefully created system - it's a mirage and is not helpful. There are many contending forces vying for prominence in our societies, and in many ways corporations are more powerful than people or politicians (NB a corporation is not a CEO, it is a composite body).

The guillotine you mention was actually far worse for the ordinary people of France than for the aristocracy (many of whom simply fled) - terror and denunciation was used as a weapon on moderate politicians and everyday citizens, and even eventually the chief proponent of its use.
This strategy of slow trickling information is working out pretty well. Good job, team.
This sounds a bit like "Pirate Cinema" (the book) come true.
For people who don't understand what's going on, you might use a browser extension that blocks external JavaScript. In my case, Ghostery was blocking the Optimizely script so I was seeing the normal page.

Mailgun changed their Optimizely config to switch all images to kittens and text to kitten-related copy. Well played.
And how Hollywood thinks about this:

http://www.youtube.com/watch?v=8f0iDL3pAhE

(The scene where Cohagen gets exposed to the martian atmosphere and dies).
Going round in circles: the New York subway map redesigned
> "How is it spiteful to the 7 people who own Windows phones?"

That is a snide comment that reveals much.

> 'This is Google saying "because of their behaviors, we don't want to allow them to consume our services."'

That right there. That is spiteful. It's not Microsoft that they are restricting, it's Google users; the very people that use YouTube. It's certainly not the behaviour of the company that Google projects itself to be. I totally agree that Google owe Microsoft nothing, but this has the potential to do much harm to their image. A good check is to switch the protagonists around and ask yourself how you would react then. I'm not suggesting for one minute that were Microsoft to do the same it would be OK (or that indeed it is or was OK). I'm suggesting that there appears to be a double standard being applied to Microsoft from more that a few parties. Google cannot have their cake and eat it, as the saying goes...

Edit: Cleaned up my shameful grammar and spelling...
Having had the pleasure to work with node.js for the past months, I upvoted this submission on title alone.
On the debugging issue, I agree that used to be terrible. See the awesome new Asynchronous Debugging feature in VS 2013: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Asynchr...
Ask HN: What DB and In Which Setup Can handle Millions Inserts Per Minute?
We have come to a point where for few of our customers' systems, at peak times, events are generated at that crazy rate. That is, millions of new events per minute (between 1M and 2M).

The records/docs size are 1.5Kb on average.

Is there a database that can handles such radical writing speed out there (16K - 32K Inserts per second)?

There are several candidates out there, Cassandra, Hive, Hadoop, HBase, Riak and perhaps few others, but I am willing to know from someone's else experience and not just quoting from each db-system's website self testimonials.

If you have handled such load at your work, your advise is highly appreciated.
A friend of mine does sonification research and crosses it with musical composition... very approachable NPR story on it: http://www.npr.org/2013/02/10/171639280/want-to-create-a-spa...
Really cool!

One thing - the google map always sets California as the state, even when I look at hospitals in other states.
Could Electric Cars Threaten the Grid?
Point taken, yet this particular problem with players asked one after the other is simpler than the case when players are each spawned their own Ask. Here's a simple solution to your problem:

function getAllNames(players, callback){
function getPlayer(i, players, callback){
Ask("What's your name", function(name){
if(isValidName(name)){
players[i++].name = name;
}
if(i == players.length){
callback(players);
} else {
getPlayer(i, players, callback);
}
});
}
getPlayer(0, players, callback)
}
Obama's Push to Digitize Health Care Boosts Startups
The "rules" are for third-party users. Google controls the service and the access to it.
A simple rule that degrades the experience that the official app doesn't follow.

It's apparently not a very pleasant rule if the largest API consumer doesn't follow it.

It's not 'open' if some users get the good API and some users get the bad API.

And it makes you sound ridiculous to put so much emphasis on 'one simple rule'. It's very easy for rules to be both simple and unfair at the same time. How about '$500 entry fee for short people'.
Fearing Obsolescence, a Company Charts Its Reinvention
Oh, come now. The definition of the verb is "use (something) to bad effect or for a bad purpose; misuse". That implies willfulness. Accidents and bugs are not abuse; were they, we wouldn't have separate words for them.

Or, put another way: I hear you inadvertently spilled water on your wife at the dinner table last night; tell me, for how long have you been abusing her?
Am I misunderstanding something here - surely the information Snowden revealed is that the NSA is dumping EVERY electronic communication in a huge data dump all the time. Then they are saying "sometimes" they search for the wrong things in that archive?
Isn't the issue that they are archiving everything we do in the first place?
just out of curiosity, are there official youtube apps on blackberry, new and old, Bada and the new comers like Jolla,FirefoxOS etc?
That uses wget, curl, lynx...
4.2.2.[1-4] is not openDNS, it's Level3's anycasted DNS (and is not officially open to the public)
>Because they can update their own apps whenever they want to

No they can't. Not on the phones, where it matters.
Maybe programmers rotating every 2 years is what drives companies to have more and more stable frameworks.
> there's an unsupportably growing number who are quite capable of supporting themselves but demand others do instead.

i dont believe this to be true (tho i'd like to see any reliable sources).

I find it more likely that a small number of people control so much "productivity" that the majority must either be "coerced" into cooperating in order to get some of the crumbs, or that they lack the basic resources to dig themselves out of the poverty hole. Its true that they aren't productive enough to support themselves, but i would imagine they would if they had the chance.
But I doubt it because the reason hospitals are able to afford Medicare prices

It's not just Medicare. It's insurance in general, and the arms race to try to get paid the same amount (adjusted for inflation) for the same procedure, over time.

So, suppose you get a really nasty cut that needs stitches, and you go to a clinic, and get that done. And suppose that the clinic adds up all the costs -- medical supplies, nurse time, doctor time, facilities (which includes everything from rent to keeping the lights on), time to process the bill through your insurance company, everything, and decide that $100 covers it, so they send a bill for $100 for "suturing" (the stitches to close up your cut). Your insurance company pays, everybody's happy.

Fast forward a few years. Little bit of inflation has happened, so maybe now the clinic needs to make $102. But the insurance company has used the leverage of its network system to get the clinic to accept a lower rate -- they can threaten to stop sending patients to the clinic if the clinic won't agree. And now the "suturing" billing code only pays $90.

So some clever person at the clinic comes up with an idea: instead of billing "suturing" for $102 and getting $90, they can bill for "antiseptic gel" at $20 and get paid $12, and bill for "suturing" at $100 and get paid $90, which means the clinic gets the $102, but now on a total bill of $120.

Fast forward a few more years. Now inflation has resulted in the clinic needing to make $105, but the insurance pays even less now. So now it's billed as "suturing" at $100 (paying $80), plus "antiseptic gel" at $20 (paying $8), plus "cotton swabs" (to soak up the blood) at $30 (paying $17). The clinic gets the $105 to cover its costs, but now the initial bill comes in at $150.

It does not take a terribly long time for this arms race to turn treatment of a simple cut into a gigantic laundry list of services, materials, personnel and facilities, at a total initial bill that might run into the thousands of dollars, just to get, say, $110 out of the insurance company.

And that is basically what has been happening in the US. When you see one of those "shocking" hospital bills for something that seems simple, what you're seeing is the result of the arms race between the medical billing arm of the hospital and the insurance company, which will have dozens or possibly hundreds of items on the bill, all at prices well above what the hospital expects to get, but calculated so that the eventual insurance payment will cover the actual cost.
There is a religious subset of the libertarian crowd that is all about those four issues. School choice means religious and/or home schooling (which tends to also be religion centered).

School choice can also mean vouchers for semi-public technical or accelerated schools.
And Windows detected DR-DOS and crashed your computer to kill DR-DOS and MS paid a paltry $150M to Caldera later but they got to upkeep their monopoly in the PC market. Now they get a small serving of this medicine and it's far less sinister and they whine. Oh they irony.
I do not see how this solves the server software side of things. Most high performance server software (1) has precisely one process/thread per core and (2) takes complete control of its memory management. These behaviors have substantial performance benefits. A GC thread of any type will bleed performance, and that is ignoring the loss of performance from poor memory and cache efficiency that is inherent with GCs. High performance server code is one of those areas that highlights where GCs are inappropriate. I've written quite a few server engines in GC languages; you expect to see about half the performance of C/C++ as a rule of thumb.

Most modern server software performance is significantly bound by memory bandwidth and latency. Introducing inefficiencies in this area tends to result in material degradation of software throughput. In fact, this is the only substantial advantage of C/C++; it can be efficient with memory access, caching, and utilization in a way that no GC language can be, and these are major contributing factors to performance.
Yes, all of the FISA rulings are secret by default, but redacting a ruling to remove classified information is not the same as fighting a FOIA request.
is "how to avoid huge ships" a real book? all reviews on it are great
How Shapeways Squeezes Every Last Bit Out of a 3D Printing Run
Short link without affiliate code, in case anyone cares.

http://www.amazon.com/gp/feature.html/?docId=1001250201
People driving cars and people riding bikes are sometimes careless, take shortcuts, and break the rules. We do a lot to deter that behavior (citations, education, public awareness campaigns) but there is always going to be some degree of that no matter how hard we try to avoid it.

What we can do, however, is better design our streets so that this behavior from both people in cars, or bikes, or pedestrians doesn't end in serious injury or death as often as it does today.
Yes: https://en.wikipedia.org/wiki/How_to_Avoid_Huge_Ships
The misappropriated word: Troll
Macy's solves the problem of coupon codes in a way that's good for everyone. They have a coupon code box. They also have a link to a page that shows you all available Macy's coupon's. If one applies to your cart, you can use it. If there isn't a coupon for your cart, you might find out something else is on sale and buy that too. If you don't care about coupons, you can check out and ignore the box.

The customer wins. Macy's wins.
With built-in caching to boot!
You don't have to cast void * back and forth to anything.

void *p = /* ... */;
char *q = p;

Despite what the C++ weenies will say this is valid C! Please do not commit this cardinal sin:

char *p = (char*)malloc(n);

No no no! No need to cast that! Please just write:

char *p = malloc(n);

And if somebody tells you that won't compile without an explicit cast, please kindly remind them what language you are writing.

[Actually I agree with you that C++ templates are really nice, chiefly for the reason that they allow you to avoid function pointers. In C++ you can pass your "callback" to a template and it gets inlined right with the body of the function.]
If you're not supposed to hold your breath, what happens? It makes as much sense to me as not holding your breath under water (not using scuba gear, snorkel). Otherwise, good to know you can transfer to safety from a sabotaged space wreck with a psychotic robot, no special gear required.
Similarly, if PHP 5.4 (or greater) is installed:

php -S 127.0.0.1:8080
It looks like it'd work fine without them, it just uses them if they're available (presumably they're more efficient/reliable than using straight bash)
There are lots of work to do still on the CLR.

- Improve the GC algorithms, most JVMs have better GC algorithms

- Improve the code quality of the JIT and NGEN compilers, specially the set of applied optimizations

- Expose auto-vectorization and vector instructions (similar to Mono.SIMD)

- Expose something like C++ AMP on .NET.

Some of this was slightly improved on 4.5, but they could do more.
In theory, yes. But in practice we've been struggling for a month now to have Paymill's support enable USD support for one of our customers. After two weeks of silence, they came up with some excuse that the forms had some info missing. After sending those in for a second and a third time we've been told that at that point it'd be only a matter of 24 hours to have their fulfilling bank green light the USD account. That was ten days ago and since then, our emails keep being unanswered. At this point I even doubt, Paymill offers any real USD support at all. Being the startup that they are, the support for us has been ridiculously bad.
> Implying that I haven't been firing off letters to my elected representatives is an erroneous assumption on your part.

I didn't assume that, I asked.

> Keeping this issue alive and at the forefront of the collective mindset is doing something.

Not really. Everyone here knows about the issue and has an opinion about it already. I would really hope that, like you, most of us have acted on it (I called mine rather than writing), but it's a pretty small group, all things considered, and basically an echo chamber for issues like this. To really do something, people need to "get out of the building", to borrow a phrase.
The HTML5 requirement stops YouTube apps from having any control over the experience. They barely even deserve the name 'YouTube app' any more. They're closer to 'YouTube embed containers'.

Google isn't forcing Microsoft to write better code. They're trying to force Microsoft to write no code at all, and instead execute whatever javascript comes from the Google servers, sight unseen.

Google is refusing to provide a real API that deals in discrete chunks of data, where the consumer chooses how to interpret them. Even though Microsoft is willing to display ads or presumably do anything else Google asks for that its own apps do.
Seems fair. It's not because of "tweets" but because of evidence of intentional recklessness that resulted in the death of an innocent.

As a society, we tend to lack accountability when a car is involved. If he, for instance, killed someone by swinging an axe around a playground for fun, there'd be no question about murder charges.
> You won't have life if you don't work - or coerce it from others.

There are some exceptions. You don't have to work a single day in your life if:

- you inherited wealth.

- you are homeless and sustain yourself with whatever you can get without paying.

- you commit crimes and are put in prison.

- you are a woman and merry well.

- you build something as a hobby and it makes big.

> That doesn't give much room for the productive to support the unproductive.

That would be true if people were source of wealth. But source of wealth for many years now are the machines, and this wealth increased disproportionately to increase in population. If on average we are coming out of poverty at slower rate than the growth of wealth our machines produce then something is wrong.

> The "right and humane" step is choosing to give to others freely

Almost no one gives anybody anything freely. Do you think your employer would give you anything for your work if he didn't have to?

The ones that have more have it often because they exchanged something worth less for something worth more. The ones that have less have it often because they exchange something worth more for something worth less.

Why they do it? Because exchange often is not free. Lot's of people have no choice but to exchange good that is very valuable for them and irreplaceable (such as hours of their life) for something as plain, abundant and worthless in our modern world as food.
I read the article, and I knew it was Chinese in origin.
The point of the article seems to be that it is an admirable experiment to be able to give up alcohol for 40 days. If that is indeed an achievement for the author, that seems to suggest that he is physically or socially addicted to alcohol to _some degree_, which can be described as unhealthy. For me giving up meat or wheat would be much worse, because they are a part of my diet. I also enjoy drinking, but alcohol is not part of my diet, and I would be surprised and worried if I had any difficulties staying away from alcohol for 40 days.
Based on what I saw from researching this piece, many of the drivers in the accidents are professional truck drivers, who typically have a lot more experience and more stringent driver's education requirements. It seems that in a lot of these collisions they simply don't see the cyclist (note that many are during right turns, when a cyclist would fit in the blind spot of a truck). This happens to me constantly, both on my bike and driving a car (not being able to easily see a person on bike approaching from the back right part of my car). I think protected bike lanes would help mitigate that risk in that situation, as an example. And yes, it'd be nice if we didn't require so many streets and vehicles in our dense cities. Vehicles require a lot of space and it'd be a great public benefit if we could use that space for people and figure out a different, efficient way of move people and goods around a city.
What's the right answer here? Should they start by typing or reading the docs?
BASH = Bourne Again SHell

You could do the same in zsh, or another compatible shell, using netcat, so while semantics may be on your side, the server does run in a BASH shell.

I was under the impression that wget, curl, etc, are external binaries and not built in to the BASH shell.
It seems way to easily these days for teenage's to ruin there lives with social networks.
If you like flyover states (I don't, but I'll grant that you might), Denver with even just one kid and a car--because the RTD isn't very good, and honestly for me at least that's a huge gamebreaker because I am happy to never own a car again--is going to be a pretty shitty life.
I did point it out politely. Of course we all make mistakes. Whatever are you talking about?
> People would be upset if C# didn't have for loops; why aren't they upset the type inference is nearly useless?

Because the existing type inference is good enough for the average enterprise programmer.

You know, those guys with good enough CS grades, that just do what they are told and don't even know HN exists.
i understand the sentiments, but i must point out how wrong it is to think that "subsistance" living is possible.

Lets just talk food - the work required to produce enough food to feed 1 person is astronomical and completely inefficient if everyone did it for themselves. In order to reach some efficiency (i mean, you aren't gonna just eat raw wheat right?!), there must be specialisation. Which means that if you were to really live alone, you'd have to aquire all the skills and all the equipment in order to produce food.

You can substitute food for anything else, and the story is the same.

The world as it is now, is pretty m uch the result of specialization over the millenia, your job (if you have one, or your business) is in fact some form of specialization, and it is this specialization that allows each and every one to eat, because they contributed back something they specalized in.
We're talking about openness of an API, not open business ownership or whatever the hell you're describing there. An open API gives consumers an equal footing in terms of the API. It doesn't affect any other part of the business.

Don't be willfully dense.
A la Carte Is the Worst Idea Anyone Has Ever Had
Agreed; the headline has been intentionally worded to be more inflammatory than is warranted. What use is a free press, I wonder, when all they print is propaganda, and when the populace swallows it hook, line and sinker?
The point was that you choose how to perceive your life. You cannot control the world. You can control your happiness.
▶ RAIDED BY SWAT THIS IS HAPPENING OFTEN
It is a convention that when you say "written in bash" it means "using bash language and standard *nix binaries". Bash alone can't do anything, nearly every keyword in it is actually a binary, including "echo", "true" and "false" or "[" used in if statements, which you can usually find in /bin or /usr/bin. You couln't write simplest bash scripts without using any binaries.

Netcat (nc) is built in to nearly every system that has bash. Wget and Curl on the other hand, are not.