skysight-inc/HackerNews huggingface dataset:
You might get some milage out of partitioning on k, make k hashtables, for n, hash n/k into the n%k table. then just look for adjacency. doesn't improve the worst case at all, k=1, or all n's fall in the same bucket, but in the average (maybe? no idea about the actual data) case it would help with collisions, or reducing the size of the sorted arrays. Also, it becomes embarrassingly parallel. A trivial next step is one thread per hashtable.

Of course, all that overhead might be a big waste of time.
Eating Riley Quinn doll for failing the test
Naked returns. Basically, you just write "return" and that returns the values declared as named return parameters.

If they are never mentioned in the body you probably have a return of the default nil value for the named return variables.

But then at least one return is not naked and returns some value, discarding the named one.

I think it's a bad use of named returns.
You've broken the HN guidelines repeatedly in this thread by engaging in nationalistic flamewar. Please don't do that again.

This is an international environment and the last thing we need is people sniping at each other's nations for either internecine or xenophobic reasons. When feeling activated, we all must take care to remain respectful. (Related: https://news.ycombinator.com/item?id=14669197.)

We detached this comment from https://news.ycombinator.com/item?id=14669031 and marked it off-topic.
Exhibit A: Uber
1. Both

2. Not sure what you're trying to say. The EFF is not a free lawyer service. It exists to defend and enhance civil liberties and freedom of speech and is thus very picky about the cases it takes, and rightly so. For more information see https://www.eff.org/pages/legal-assistance

Quoting google DMCA stats is totally irrelevant. What's your point?
Roundup contains mroe than glyphosate.

You probably shouldn't drink a quart[1] of glyphosate, but you definitely should not drink a quart of roundup.

[1] what the fuck is a quart?
Hey guys, so I pitched this idea a week ago at Startup Weekend Tokyo "Travel Edition" and people thought it was pretty cool. Built a prototype and demo'ed it, then decided "why not release this" and bought a domain name!

A little HTML/CSS, and ta-da. Hope you dig. If you think there are some cool ideas here and want to see more, let me know in the comments!
Hospitals charge high prices because they can. They are often local monopolies, and behave accordingly. And with an utter lack of price transparency, which makes the idea that patients could shop around a joke.
Nothing.

The named return value is default-initialised (zero-initialised) before the function body (you don't have to assign to it, you can just modify it in place), and if you don't explicitly return a different value it will be returned regardless of you using it or not.
I think that the devil is in the details. Imagine this situation.

Someone comes, takes your home and says "this is mine!".

Now you have to go to your government and prove that the person stole from you because it is yours. Some governments are efficient at providing this proof, some aren't.

Some countries in Africa have a huge problem with this. Where ppl go to other people's houses and sell them even though it is not theirs. And because it takes up to two years for someone to prove the ownership, sure the government will enforce the ownership eventually but two years is a long time. I've seen pictures of houses where the owner sprayed "This house is not for sale" to avoid this issue.

Now imagine a system where proving ownership is fast, nearly free and very hard to forge. The incentive to cheat the system is much smaller than before. Using a blockchain to handle proof of ownership is a great way to have a secure and nearly free.

Sometimes it is not about being able or not but how cheap / expensive it is and how slow / fast the process is.
Evernote to End Support for BlackBerry and Windows Phone
Agreed! That actually makes it much more feasible to insert into my current workflow!
But that's already possible today without WASM. E.g. there are react plugins that render to canvas, as being used here together with some WebGL: http://www.anagram.paris/ (try to drag). And yet, we don't see this often being used. Instead, we see more DOM being used on new places (e.g. electron applications). I think if WASM+Canvas would be the way forward, we'd have already seen it by now, since it was already possible in plain JS or with asmjs if you really hate JS that much.

In the end, HTML & CSS is fast enough for most business-style applications and frameworks like angular/vue/react are pretty good ways to make frontends.
I think you are talking about bare returns, which are somewhat orthogonal to named return values.

You can use non-bare returns with named return values, just mention the names in the return statement. This compiles to the same code as the bare return.

I'm a bit ambivalent about bare returns, but named return values are useful, especially in the presence of defer statements.
Carmack on Java: "I like the language"

Your move, language hipsters.
Perhaps...but whether there is or isn't a problem with the environment, that's a different discussion entirely.
Pre-packed salads are washed in dilute chlorine.

Household bleach is mostly sodium hypochlorite.
I've certainly thrown my fair share of insults around on Hacker News. Petty? Yes. Wrong? Yes. I'm a slave to my baser emotions from time to time, and I won't excuse that. The general technique for insulting someone on HN is to be subtle and imply that they're stupid, to provoke them into getting angry and saying something stupid, or to throw indirect insults by describing their comments as "garbage", "crap", or whatever. I hope one day that I'll grow out of it, it's an awful habit.

The saying, "It takes one to know one," seems appropriate here.

Coming out and saying that you "had to write a paragraph of crap to answer a BS premise" is a bit transparent, don't you think? It's a roundabout way of saying, "you're so stupid that I had some kind of moral duty to correct you, which is a waste of my time because I have better things to do." But... why would you call attention to the fact that you have better things to do than argue with me? Isn't that basically the same thing as admitting that you're bad at prioritizing your own time, that you feel compelled on some emotional level to debase yourself by talking with me?

Which brings me to an alternative strategy: if you think someone's wrong, ask questions. Maybe you'll learn something, maybe they'll learn something, and maybe it's just a misunderstanding.
Ah, I gotcha.
Well, euthanasia is one of the things where you really like that things are done properly.

Though unfortunately Nokia isn't going there.
The Best Expert in SEO and Digital Marketing Agency in Florida
Schoneke Doral SEO is a Digital Media Agency that specializes in helping businesses grows their clientele to generate millions in revenue through Search Engine Optimization.

Our Doral SEO Marketing Expert Agency will help your business grow exponentially by dominating your competition on the first page results of Google. We can help your business with all your Digital Needs including Internet marketing, Search Engine Optimization, Reputation Management and Mobile friendly interactive business Websites.

Want to learn from us, Follow/Check us for more details:

http://schonekeseomarketing.com/doral-seo

https://twitter.com/schonekeseomark

https://www.facebook.com/SchonekeSEO

https://www.linkedin.com/company/schoneke-seo-marketing
Let’s Encrypt Numbers to Know – limits, restrictions, features
I watched a great video on Tensorflow (link below). It mostly introduces very basic deep learning concepts, but there are a few key moments in the 2 hour+ video, where he explains what to do if something goes wrong. It's definitely not a "science", but with enough experience in deep learning, you can intuit what's going on inside the black box, and there are best practices on what to try next.

For example, he goes through a few examples where a neural net has too many weights, or too little data or improperly connected nodes. All three result in problems, but the problems exhibit themselves in slightly different ways and with expertise you can start identifying them.

https://www.youtube.com/watch?v=vq2nnJ4g6N0
Blue apron is tasty and fun. I hope they sicceed in some fashion. Seems like the kind of thing young couples would do for a year, and would be a great alternative to spending money and time at restaurants.

But they need to get the customer acquisition costs down enough that they make good profit in that first year. After that, people will either lose interest in cooking or get so interested that they do their own shopping and recipes.

To get a lot of long-term customers would require a cultural shift. They are probably a bit early, but it might happen.
I'm picking up reinformencent deep learning and documenting progress with jupyter notebook.

Improving my python on the way ( and knowing numpy and matplotlib) has been a great experience the last 2 days. Although the progress seems to be "slow" ( translating formulas, n armed bandits to code ...). My best tip: download cheatsheets for: numpy, pandas, matplotlib, python, ... has been good for getting to know the language and libraries for ML.

So this tutorial/information will be put in good hands at a very opportunistic time ;) Thanks!
You broke the HN guidelines egregiously in this thread by being uncivil and engaging in nationalistic flamewar. We ban accounts that do that, so please don't do it again.

More explanation here: https://news.ycombinator.com/item?id=14669173.
Some HM language can infer types at the toplevel so you may not have an explicit signature at all, although that's generally frowned upon:

add1 = map (+1)

OTOH they also split the signature and function "header" so that you don't need to remove the "noise" to get the bare signature e.g.

add1 :: (Num a) => [a] -> [a]
add1 = map (+1)
Thanks for making it clear if a sort is stable or unstable in the function name. One of my longer debug sessions was tracing a porting error from Java to C# where the default sort functions are stable vs unstable.
Anyone heard performance numbers on the encrypted memory? Any change in latency/bandwidth?

Would this help protect against malicious thumbdrives stealing keys out of memory? Seems like encryption would disable all DMA.
Cash Loans No Debit Card
Cash loans no debit card is a UK’s based loan available everywhere 24 hours a day and 7 days of a week. As a result, you need money urgently and haven’t enough time spend then you can apply for this monetary product at your comfort home or office. You have to finish a simple application procedure and submit the form online to the lender for verification. The lender will transfer your loan directly into your bank account in just 30 minutes. Availing cash assistance through online mode, you are free of doing the document process and lengthy paperwork. Hence, you are worth borrowing an amount ranging from £100 to £1000 with 30 days of repayment plan.
http://www.loansprofit.co.uk/
Show HN: Create fast polls with Realtime Visualization of the results
I'm currently learning to use Matplot by visualizing HN activity (very early stages) so this comes very handy. Thanks for sharing.
Blue Apron is a great company with a solid product that could easily make a good profit. The problem is that they can't sell themselves to VCs as a fun way for couples to cook and spend time with each other. They have to disrupt the dinner market, and convince VCs that they have sky-high evaluations.
Steve Case: 'Third Wave' of Internet Will Help Middle America Business
Nice work, I see you do not have to login to vote, how do you manage the security?
It can be used for interactive widgets as well.
I can see why one might blindly call qsort on already sorted data (when using user input), but why sorted data with one out of place element? Presumably that element has been appended to a sorted array, so you would place it properly in linear time using insertion and not call a sort function at all. Why does such a pattern arise in practice?
Certainly wasn't my intention. I'll be more careful in the future.

I guess I'm not sure how to debate whether one city produces more successful startups than another. I mean, I think it's safe to say that Y Combinator and SF have been more successful than, say, Union Square Ventures and NYC, so I'm not sure where the internecine is in my above comment, but I guess I'll just sidestep this topic altogether for now and think on it. Thanks for letting me know.
I was under the impression that some users felt this title was misleading; if so, changing it back will just provoke more objections.
Ask HN: “eventually consistent” SSH client for laggy mobile connection?
Working on high speed rail, connection is generally reliable but cuts in and out. If there was an SSH client that could allow you to continue working ( say in a text editor / vim ), and then eventually sync when the connection is back, without the poor experience of surfacing the disconnection and requiring input to reconnect...that would probably work well. Is there any such software for this?
Volcano Power Could Be ‘Most Exciting Thing Since the Moon Landing’
That's one big reason why naked returns are frowned upon.

It's much easier to read code where there is a clean "return nil, fmt.Errorf(...)".
This is clear case of survival bias. We had social networks way before facebook, I remember using one in 2002 and it took many years until a mass user exodus to facebook.

Without hindsight, nothing about facebook was novel. It had less to do with Zuckerberg's intellectual capacity and more to do with luck, capital and network effects.
Indeed.

EDIT: I moved this comment up to a top level thread:

https://news.ycombinator.com/item?id=14669273
After the British Empire lost the American colonies, they tried to compensate their loss by refocusing their efforts eastwards. However the British realized they could not profit by playing fairly, so they started smuggling narcotics into China and when that failed, they invaded them, giving origin to their presence in Hong Kong.

The Chinese have valid reasons to assimilate that territory.
I question whether or not animation would really help anything. Rather, I'd wager it would be like most animated PowerPoints.
It's all relative I guess.
Yeah, I make electronic music and I'm really interested in algorithmic techniques as an aid to the composer too.

I have python scripts that just generate many minutes worth of music in an instant, and then I comb through the result and cut out the interesting parts for further processing. It's a really productive technique and you hit on melodies and rhythms that normally a human wouldn't.
By 'internecine' I mean that sometimes people attack each other because their nations are close and sometimes ('xenophobia') because they are far. I'd give additional examples but I don't want to set anybody else off.

The main thing is just to err on the side of being respectful, remembering that other people feel as much love and loyalty for their side as we each do for ours.
What aspects of Asimov do you think are the most prescient?

(on a more pedantic note, his last name is Sun: Tzu is an honorific title)
Why do the topic create such polarized environment where any disagreement is seen as hostile and everything else must be in full favor? Can't we have a moderate disagreement in regard to political events?

Let me present a moderate disagreement. I dislike events like this because it can't be made universal. Let say we had a common rule that said: any industry has this bad gender segregation should have exclusive events for the minority gender. Given a 80/20 ratio, this would result in around 30% of all industries which employs about 40% of all people in my nation. A significant amount of events would turn either exclusive male or female, with the majority being exclusive male, and I personally doubt it would have a positive outcome on society. I am open to be convinced otherwise.
I'm pretty confounded as to why UBI has become so popular. Many people already get a ton of social services from the government. Don't see how getting $20k of UBI per year is better than getting free medical care from Medicaid and subsidized housing from HUD, both which likely add up to the same amount.

Don't see why UBI has to be in cash instead of services.
I think the best you can do with facts is to simply watch what is currently happening and compare it to what has happened in the past few years. Any prediction is going to be theory, albeit educated theory from some.

Mostly because there are sooo many factors at play and a lot of it is difficult to predict. Infrastructure needs built and it is possible subsidies of different sorts are needed. We still need a robust used electric car market, and it simply hasn't been long enough. We probably also need an easy way to upgrade gasoline cars to electric (I'd look to something that is adapatable across a few sizes/styles of cars or something relying on 3d printing).

That said, I do think the folks reporting replacement by 2018 or 2020 are a bit too hopeful. 1-3 years is all they are giving, and I highly doubt this turnout. Even where I am - electric cars are quite popular in Norway. 2032 seems more likely, especially if you limit the query to new cars being produced or make sure to have enough monetary intervention so that everyone can afford them.
Microsoft lost because they lost mobile to apple and google because they released better products, same thing for bing etc. Not because of anti-trust.
Wind is really variable, and often way out of sync with load. I just looked at PJM's dashboard, and peak wind in the last 24 hours was 4 gigawatts at 4 AM. Wind bottomed out at 0.65 GW at 8 PM. That's total output from wind farms from Illinois to New England. Averaging over a large area isn't that helpful.

Piping energy in from the wind corridor that runs up from the Texas panhandle to Canada has promise. The wind is steadier there. It's quite possible to run megavolt DC power lines now; China has 16,000Km of them. California has had a half-megavolt DC link from Oregon to Southern California since the 1970s.
A digital watermark is automatically inserted customer information into a purchased product to restrict it's usage only to the buyer of that product. To me that's exactly like Digital Rights (Restrictions) Management. Calling something that contains digital watermarks DRM-free is deceptive to the customer. But long story short, if it contains watermarks I don't buy it.
Yes, working directly on the server is definately fragile and fraught with all kinds of dangers. I try to avoid it as much as possible, but it is very handy having the option there as a last resort.
Meh, you see identity politics creep into a lot of the competition shows nowadays. You're right though that it is a good escape.
I feel the opposite way. I always use named return values because I feel the code is less cluttered and less magic. I just look at the first line of a function and I know what variables are used as return.

I think they are pretty explicit and simpler, because there are defined in a single point of our code. Anyway, we probably have different backgrounds :)

Although it wasn't your point, what I don't like is mixing bare and named return. I think it's better to stick to one style or the other.
120 Reasons being an entrepreneur is awesome
What's your point here? That your company is better than Blue Apron? If so, go get em!
Thanks! I'll check out naval@
My understanding is that the standard usage is to employ the second person singular instead of the first when expressing this.
It's cool to play with a pack of cards and run sorting algorithms on them. To see the worst case of quicksort, use the first element as the pivot and give it an already sorted list. It will take quadratic time to give back the same list.
#8tracks data leak exposed 18M user accounts
Pan-European field study shows neonicotinoid pesticides harm bees
The watermarking is the sole reason I don't buy ebooks from PragProg.
To illustrate the point about branch misprediction, I implemented quicksort with intentionally skewed pivot selection. You can see the results here: https://github.com/lorenzhs/quicksort-pivot-imbalance

For this demo I'm sorting a permutation of the range 1 to n, so obtaining perfect or arbitrarily skewed pivots is free, which isn't realistic, but that's not the point. My experiments show that quicksort is fastest on my machine when 15% of the elements are on one side and 85% on the other. This is a tradeoff between branch prediction (if it always guesses "right side", it's right 85% of the time) and recursion depth (which grows as the pivot becomes more and more imbalanced).

Of course, skewing the pivot is not what you want to do. You should rather look at sorting algorithms which don't suffer from branch mispredictions (as much), such as pdqsort, super-scalar sample sort [1,2] or block quicksort [3]

[1] excellent paper on a parallel in-place adaptation by some of my colleagues: https://arxiv.org/abs/1705.02257 - code will become available soon

[2] my less sophisticated implementation: https://github.com/lorenzhs/ssssort/, I also have a version using pdqsort as base case sorter, which is faster: https://github.com/lorenzhs/ssssort/blob/pdq/speed.pdf (in that plot, ssssort = super scalar sample sort with pdqsort as base case)

[3] https://arxiv.org/abs/1604.06697, implementation at https://github.com/weissan/BlockQuicksort - pdqsort uses the same technique
I don't think it's "fear of change" or "fear of people who are different" - not even "fear". I feel the sentiment felt is closer to "think poorly-of". Southern US racists certainly aren't "afraid" of black people: I believe they've been conditioned by negative racial stereotypes combined with their own sense of superiority ("blacks are lazy, no-good", "blacks are criminals", et cetera) so the idea of racial equality simply strikes them as silly - take that concept and apply it to today's debates: ("feminists are loud and unruly", "transgender people are freaks", "the other side are all fat women with purple hair who spend too much time complaining on their blogs instead of instigating real change"). I stress these are stereotypes, and certainly not representative, but doubling-down in response seems to reinforce certain negative stereotypes and make it harder to sell the idea of the "new normal".

I believe their concerns about the loss of "intellectual diversity" are genuinely felt - but frame it as someone who genuinely believes themselves and their opinions to be level-headed and that these new voices, who are telling them that their opinion are wrong, will of course put someone on the defensive, it's only natural to feel a creep of thoughtcrime policing.

I hate to use a cop-out cliché but I feel that "both sides" need to apply empathy when engaging in debate with their opposition: those that feel out of place and get defensive, or simply think these are overblown matters, are not deliberately out to actually oppress anyone - and those campaigning for more equitable treatment are not being opportunistic.
How GE, GM, Coca-Cola and Kodak Put Shareholders Ahead of Employees
You can give it to this poor guy, who can practice for my project ;)
Peering into neural networks
Have you tried Mosh? https://mosh.org/
> remembering that other people feel as much love and loyalty for their side as we each do for ours.

Oh, for sure. I try to maintain respect for all nations and their people. Are you certain you weren't targeting another comment?

I guess I could've done without the "Lol" in my comment above, and just cited Tencent without implying the commenter was "ignoring" them.

But there wasn't any internecine or xenophobia there that I could detect, because it was a discussion about Shenzhen vs. Beijing, which are within the same nation! =)

I understand if you can't give examples. Thanks again, I will try to be more respectful down the road.
Kubernetes 1.7: Security Hardening, Stateful Application Updates and Extensibility