skysight-inc/HackerNews huggingface dataset:
I agree that this is a more efficient way of generating primes in Haskell than the typical Haskell 101 approach. However, I disagree with the idea that the Haskell 101 approach does not deserve to be called an implementation of the "Sieve of Eratosthenes".

The distinction is only this: when we have found a prime p and are eliminating numbers accordingly, do we consider ourselves only to spend time directly enumerating the multiples of p and crossing them off? Or do we consider ourselves as running through the entire list and going "Ok, ok, cross, ok, ok, cross, ok, ok, cross" (for, for example, p = 3), thus spending time traversing through multiples and non-multiples alike? So to speak, do we jump from "cross" to "cross", or do we walk along through the "ok"s inbetween?

In the former case, each new candidate is worked on only in proportion to its number of prime factors; in the latter case, each new candidate is worked on in proportion to all smaller primes. The former is the more efficient way of generating primes; the latter is (essentially) the ubiquitous, naive approach.

But I don't think one can say the traditional understanding of the Sieve of Eratosthenes draws a strong distinction between these two! Traditional accounts would not explicate any difference between "Jump directly from 'cross' to 'cross' " and "Walk from 'cross' to 'cross', saying 'ok' to everything inbetween". It's not a distinction anyone was traditionally worried about. Eratosthenes certainly didn't.

So I think both of these are deserving of the name "Sieve of Eratosthenes". They're just different approaches to that sieve.

In either case, we say there are primes, to each prime we associate the set of its multiples, we merge these sets into the set of composites, and close the loop of our recursion by noting that the primes are to be the complement of these composites. The difference is, in some sense, arising just from how we represent and manipulate subsets of the naturals (as pertaining to the set of multiples of each prime, as well as their merger into the totality of composites): either as streams of increasing naturals [efficient], or as streams of "In"s and "Out"s [less efficient].
Are you comparing like with like? The article talks about students hospitalised with suicidal thinking; is your figure for people hospitalised for suicidal thinking or does it include people in the community that have less strong suicidal ideation?
Portions of the Patriot Act are up in June, where will our representatives stand? https://www.eff.org/deeplinks/2015/01/section-215-patriot-ac...
It does for those the site detects not visiting from the UK - http://www.advertising.bbcworldwide.com/home/advertisewithus...
> Why are kids killing themselves in utopia? Why are some of the worlds most intelligent, rich, and power adults burying their children?

Really? So you create a hyper-competitive environment where kids are constantly expected to perform and the image of perfection is demanded. In academics, athletics, work, and social life. From kids.

Then you wonder why they off themselves when something falls through? Really?

Maybe try not demanding so much from children and allow them to gradually learn how to handle failure?

Fuck these artificial treadmills being created all over America.

> My AP CS class covered topics that weren't even included in my undergraduate CS degree at top ranked UC

This is not something to be proud of. It's sad and depressing. High school is a time for kids to learn social skills, not advanced computer science concepts.
If you want to get involved to prevent things like this in the future, contact your representative a lot of states are currently considering banning the sales of rhino horn and ivory. You can read more about it here https://www.reddit.com/r/babyelephantgifs/comments/338f7t/co...
> Because they could be fined or otherwise penalized for violating noise ordinances,

Oooh, I'm so scared of fines from a local authority in a town I'm visiting for two days and never coming back to again after I return to my own country on the other side of the world.
One possible confusion: "libertarian" clearly here means "anarchist", which is different from the common US meaning. (Most of the world uses anarchist in its historic meaning, which predates the US right wing coopting the term.)

> "One young guy who made a big mistake had been expelled from the space. To keep him from returning, there was a poster with a big photo of him : “If you see him come back, throw him out.” It’s extremely violent. From planet France, we tell ourselves that we would never do that in organizations or associations. Bay Area hackers are unflexible about certain rules, such as sexual harassment, for example."

I hope I misunderstand this. His version of "French" culture sounds like savagery. I'll pass this to my French friends for their insights.
Shame on them!
Out of curiosity, if you were to implement the features of Pusher yourself, would it have added too much to your implementation? I guess you would need to set up your own Socket.IO server, and push data from that.

I've never implemented this, which I think is the reason I am underestimating the service that Pusher provides. It would be great if someone that did implement it would convince me that it would be a large hassle to do that internally.
This was also discussed last year: https://news.ycombinator.com/item?id=8063870
Bundestag Inquiry into BND and NSA
It's important to emphasize that the Servo developers don't consider the fact that Rust is memory-safe to be an excuse to skimp on proven approaches to application security. Servo will still utilize multi-process architecture and sandboxing in order to provide defense-in-depth.

Remember that the goal of Servo is not just to be as safe as modern engines, but to be far safer (while also being twice as fast!).
If you stopped before this line, you really should go back and read the rest:

> That’s the story, but the story is mostly myth.

I also really recommend this related post on Medium, about Valiant Hearts, a really great game from last year: https://medium.com/war-is-boring/valiant-hearts-is-a-fantast...
I knew I should have checked my facts before I posted. Still, it gave me a good chuckle when I saw it.
And an unconditional pardon doesn't solve things long term anyway. We need to stop things like the Espionage Act which makes leaking a defenceless crime.
Landlords ought to be illegal. They are a perfect example of economic parasites, whose only value is in "rent seeking."
I think many of the 'greatest scientific minds' got mediocre grades because they were so smart that school bored them. They did not find them challenging enough so that didn't have the motivation to participate in class.

The tech college dropouts like Bill Gates (Harvard) and Zuckerberg (Harvard) probably worked hard to get into their alma mater. I think still think good grades are a good indication of future success.
Im glad, but honestly want the project to be called io.js. I liked the name much better.

Note: this did come up in the TC meeting if anyone listened in. And they are keeping the branding alive and will decide what to do with it in the future.
But if the most economically valuable use of Santa Monica land is hotel / tourism / short-stay, then perhaps the whole place should be turned into hotels.

Not saying I agree with this but it's something that should be considered.
... And in related news, NSA internal leadership votes to continue bulk data collection anyway.

Call me overly cynical, but I suspect that the legislative branch lost meaningful influence on the executive in this area some time ago.
Ask HN: Best programming language to learn Algorithms?
What would be your recommendation about the most suitable programming language to learn Algorithms?

Actually tempted by Robert Sedgewick's C series.
What do you think?
whether you transact business as a corporation or a sole proprietorship, you should be taxed and treated the same. this is the silliest thing ive ever heard.

and frankly, all airbnb renters should be treated as a class(or a franchisee), in which case they are more like a corporation then a sole proprietor.
I wish people understood that concept when it comes to shooting clubs and hunting.
I recently saw an airbnb advertising in my city in france.

The more I hear about uber and airbnb and those websites who try to replace existing services that doesn't use internet, the more it looks like some libertarian business model.

I'm not against it, but once insurances and the law adapt to it, I wonder if it will really be attractive anymore.
One of the most valuable startup skills is to know which kind of debt has a low interest rate and which kind of technical debt has a high interest rate. Certain things - lack of tests, poor build system, poor deploy system, very poorly structured code - have a very high interest rate. Every time you create bugs, you waste time tracking it down and fixing it. Every time you check something in that breaks the dev environment for the rest of the team, you create bugs. On the other hand, messy code that is isolated to one system, or an architecture that has a bit of copy and paste, are usually not too big of a deal. Going on some deep dive to create some "generalized framework solution" is almost always an error.
In benchmarks from last fall, Servo was twice as fast as modern engines for layout tasks even in single-threaded mode (and four to five times faster when using four cores). Who knows, this may regress as they implement more of the web platform, but Rust and Servo are also getting faster all the time. It will be fascinating to watch it progress over the next few years.
Thanks for the suggestion. Will look into it : )
Hashrate won't track energy usage because new hardware is more efficient.
HN has a no gratuitous negativity suggestion / guideline. Like most rules on HN, it's not a strictly enforced, guard tower snipers, sort of line in the sand.

It's a strong hint to the community to cut back on negativity.

Emphasis on this: "Avoid gratuitous negativity" - the gratuitous part.
I have friends who live in Palo Alto. One works for a company that starts with the letter A the other works for a company that starts with the letter F. The two of them rent a little townhouse for something like $3000 a month. I live in a 4 bedroom home in downtown Minneapolis that I mortgage for less than $800 / mo. It will be paid off in 5 years. While I don't make what they make, I'm within reaching distance and I don't have to break my neck to get it.

The financial arithmetic of living in Silicon valley alone doesn't attract me. But the work-yourself-to-death culture is enough to warrant the place a wide berth. My brother died suddenly a few years ago. He was here one moment. Gone the next. So be here, now. You'll never get another chance.
Just to clarify why, if the result is ever one (the loop's exit condition), then it would be about to get stuck repeating 1,4,2 forever if it didn't exit. If you can prove the loop does not exit (i.e., never reaches one) for some n, then you just proved that, for that n, it would never reach the 1,4,2 repetition pattern even without the stop condition.

It's a clever way to re-state the problem to look more computer-science-y.
Yes, use things like good photography and video, maybe some icons and make something awesome. It's the ingredients that make a good cake right?
We're more efficient than other animals at the killing of other animals. That does not make it not natural. We, like every other species on Earth, are simply that: A species on Earth. We're just particularly better and more efficient than most animals at Earth for destructive behavior. No other species on Earth can turn an 8 mile plot of land into a barren wasteland devoid of life in a moment with the detonation of a nuclear weapon.

>Furthermore, species in nature tend to be in certain states of equilibrium because every predator is prey for something else.

This is not entirely true, I'll add a new term for your vocabulary: Apex predator [0] There is a reason it is called a "food chain" and not a "food pyramid".

Predators die off because of many reasons. Some are human caused and others aren't. Let's bring a bit of math into this: Lotka-Volterra predator-prey equation [1]

I forget the exact term for population dynamics but "food source goes down, predator population dies off, predator population dying off means more food source survives, more food source means fewer predators die from starvation and the cycle continues". It's possible to reach a point of no return if too much of the prey dies off. This happens, I would like to refer to my wolves example from earlier.

[0] Have a look at the "extant" section in particular. http://en.wikipedia.org/wiki/List_of_apex_predators

[1] http://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equation
I agree, but my theory is that any mass surveillance program will necessarily employ a quantity of highly educated and intelligent people. People capable of interpreting the 4th Amendment for themselves and responding ethically, as the existing whistleblowers have done.
I think I get all points of the debate but the key question for me is...why are there so many airbnb rentals. Clearly there's some sort of demand, clearly the hotel econsystem doesn't handle it well enough. That's the root issue that needs investigation. Tighter regulations of airbnb are more of a hotfix than a long term solution imo

My uninformed gut instinct without doing any research is that the hotel market is probably over regulated and the prices are artificially high or there are simply not enough available rooms (lobby mini-monopolies or whatever you want to call it) and that's the reason why people flock to lower priced/other available options.

I guess a study on residential to short term rent demand would be helpful.
Yes, Pexels is awesome. Such high quality of photography and video.
SM also has strong rent rules, a smart building owner would rather AirBNB their available space as they can charge more for it and aren't locked in for X number of years if the tenant doesn't move.

A good friend lives in a nice building in SM, the owner wont fix one of the elevators because he is trying to push the seniors out that pay less then 50% of the current market value, so he can raise rent.
Learning algorithms should be language-independent.

Use whatever language you're most comfortable with, or start with C.
A thousand times this.

So many times have I tried to push things forward (internal system upgrades, new security policies, etc) that did not have any immediate impact but then something happens and we have to scramble together.

Being able to show this to a non-technical person and have them at least somewhat understand that there is a problem that needs to be addressed is invaluable.
Thanks, yes picked that one up. It is a 'Tools' section which I'm still working on. Cheers : )
Airbnb is really just the middleman. There will always be a demand for folks to rent out extra space they have and likewise always be a tenant who is willing to occupy it.

Imagine if Airbnb was completely decentralized -- a native, open-source application akin to Bitcoin. With no central server to shut down, office to raid, or company to sue, how would city governments prevent people from renting out their unused housing space? They could catch a few and make examples out of them (similar to RIAA with music torrenting) but they will overwhelming fail to prevent the hotel incumbents from becoming obsolete.
Doesn't look like any of the main characters are that arrogant though(unless Hanneman turns out to be an evil guy?)
Better assume they are backdoored and every communication and stored information is accessible by govt and its organizations. That way we would be conscious about our activities on devices and elsewhere and try our best to protect ourselves until the system changes (which could be never).
> This is not something to be proud of. It's sad and depressing. High school is a time for kids to learn social skills, not advanced computer science concepts.

Unless they want to. I'm not entirely sure that most do.
Yes, the term maker is quiet broad these days. There's no reason I can't expand it to the different types of makers I guess. Thanks for the feedback.
It's not just America.
Not that I think this is conscious, per se, but I think part of it might be driven by the need for their school to be a "top school." It's not enough just to take AP courses and get As, the overall ranking of the school you do it at ends up affecting your admission chances. Staff might have similar concerns around funding.

That probably puts a lot of pressure on all the students to keep up the standard, probably past a level that makes sense for any diverse student body.
> Just because upper-class enclaves exist as goals to lure the beguiled doesn't mean they're actually utopias.

Very well put.
Qualcomm Zeroth is advancing deep learning in devices
Food Demands Survey: 80% support mandatory labels on foods containing DNA [pdf]
> (the fourth amendment and the like were meant to put an end to the equivalent of that era.)

Do you know off hand the name of those era's equivalents? Just some search terms to get me going would be appreciated. I'd like to learn more about the historical precedent.
heh. Is there any part of that that's concretely not true? Humans all over the world have come up with it independently -- I dunno, unless Muslims and Mormons shared notes.

I could even go further and claim it to be an almost pan-mammalian truth.

Men and women are different. Especially when it comes to sex.
Many people have recognized this fact. Hemingway for example.

"Happiness in intelligent people is the rarest thing I know."
-- Hemingway

In a world of corruption such as this, the smarter you are, the harder it is to remain unconscious of that fact and thus not be miserable.

Figuring out what to do about it, which means also having realized that it is not impossible to fix, is the only cure (other than lobotomizing yourself).

For those in pre-solution-realization phase, read "Atlas Shrugged" for the start of an effective cure.
Suicide is likely contagious, so any local grouping (e.g. kids in the same high school) is significant.
This is what I'm talking about with offering the alternatives. You can't hide the distasteful "make the pain go away, but not fix the underlying problem" option. You have to give people enough rope to hang themselves, which is thankfully also the same thing as giving them the opportunity to surprise you with their leadership. When you have a heavy-handed PM over you, you have to give them all the information, force the decision on them. Don't make the decisions for them that option A or option B is best. If they want to lead, they have to take responsibility for this stuff. It's up to you to present the options appropriately. "A) I hide the bug, maybe takes an hour, B) I fix it, probably takes a week". You don't know, you might be surprised, he might tell you "do both, A right now then get right on B." Or he might only be interested in A. Either way, if you don't want responsibility for the failures, you have to abdicate responsibility for the successes.
I think companies should remain focused on their core product. If you find yourself in a buggy whip industry the best thing to do, IMO, is to reduce expenses as much as possible and return as much profit as possible to the shareholders. When it's not worth bothering with any more the company should be dissolved.

As an investor I'm perfectly capable of taking my dividend and investing in other businesses - I'd rather not have the officers of a company in which I've invested my money taking Hail Mary shots to preserve their jobs.
Yeah, population had just surpassed 3 billion when I was born; now it's 7.2 billion. In my own lifetime. That's a lot of people. Lucky I like being around a lot of people.
That wasn't the only reason for the fork. Focusing on that seems unproductive.
'C' is the best for anyone with minimalist mindset
are these people in highschool? get it together over there already!
A single Socket.IO server is easy.

A scalable cluster of Socket.IO servers isn't.
Any non-controlling non-preferred equity in a privately held company is worth only what the controlling interests give it via good-will. Controlling interests can always liquidate a company to themselves for a nominal price or award themselves preferred stock or pay themselves absurdly inflated salaries or rent office furniture from themselves or their spouses or anything else that allows them to move money from one pocket to the other while taking a cut on the transaction. And that's before you get to Private Equity/Venture Capital whose business consists largely of extracting as much value from a company for themselves as is possible.

That's not to say everyone is ruthlessly sociopathic. But only that the odds of turning equity into cash are lower than the odds of a startup having a successful exit and to suggest that it is quite possible for people to optimize their slice of the pie when the pie is filled with serious money.

Finally, on a $4 billion exit 0.7% versus 1% versus 2% isn't going to have a dramatic effect on your lifestyle. Same is true at $40 million.

Good luck.
If you have been following the story much, they have handled this situation with great care. Not like high schooler's at all.
Voat – a C# Reddit clone with no censorship
>That's fine, but pretending that differing priorities are the same as a lack of self-control is dismissive, and annoying.

It is the same. You know that DRM is not a good thing. Your tolerance towards it is obviously better than mine (or you haven't yet invested and been bitten), but I have yet to meet anyone other than content company execs who says DRM is an objectively good thing.

If even 1 in 10 customers said "If a piece of content contains DRM, I will not buy it unless it is on sale", there would be no DRM. You don't even have to refuse to buy it, you just have to consider it defective goods with the associated drop in value that implies.

You're one of the vast majority who cannot, or will not, resist the urge to buy, buy, buy, even when you know that a little patience would kill a system that is actively hostile to you, and your justification is that you rank "would I enjoy it?" over "is buying it actively pushing an agenda that will harm me?" on importance.

You're a junkie, and like most junkies your habit is harming not just yourself but everyone around you, and only the dealer is better off.
I've seen entire products - established, successful products - sunk by a single decision to let the engineers build a gold-plated replacement for some component that had a messy architecture and eye-watering code on the inside but otherwise wasn't broken and didn't need fixing.

This is a spot where I'm definitely in line with the Scrum position: If it's really causing problems, then the developers should have no problem making a reasonable business case for fixing them. If working on it's really causing that much pain, then the developers will figure out a way to quietly fix it in a way that doesn't (and needn't) vex the product owner. If neither of those is the case then you best let sleeping bears lie.

(I'm an engineer too.)
in a parallel universe where i actually pay real money on tech clothing, it would be on this.
Making big ideas small
The 8 Spot: Interview with Bill Kayser, Founding Engineer at New Relic
Semi-tangential note: React comes with the helpful `React.addons.update`, which implements "immutable data structures" in an extremely simple way.

I'm working on a medium-sized React application where all application state changes go through this function—there's one big state object with all substate, and we don't do any mutation inside of it. We haven't needed to benchmark anything yet, nor do we have any extreme performance requirements.

Since all our state updates work like this, we can use `PureRenderMixin` on all components, which gives us the kind of shallow equality behavior you describe.
Strong Parameters Are a Weak Schema
Is "thunk" a technical term?