skysight-inc/HackerNews huggingface dataset:
You're right! That is a super cool idea. It would let you spot a user re-using passwords and warn them not to.

However, there might be some complexities. This is basically poor-password-handling as a well-intentioned service. It means anyone breaching any of the services the hub knows about would let you see a great many username/password pairings being checked. It would take make passwords as safe as the weakest link across all the services being checked. The odds of N services all being absolutely safe all at once aren't as good as those of a single service. This is why people shouldn't re-use passwords, right?

I can see your heart is in the right place. You're looking to protect users from themselves! That's a wonderful thing, and I'm so glad that there are people like you who care. But the above outcome might not be maximally desirable, you know?
> Jobs-like "reality distortion field"

There's salesmanship and then there's lying. It might feel like a thin line but I think it's important not to conflate the two. Criminal behavior is not just "reality distortion".
>As a society, we've decided that being able to continue the population is more important than the fortunes of any particular startup.

Err no. It wasn't long ago that a family could survive well on a single income with the mother at home, cars paid, schooling sorted and food on the table. Not even remotely feasible on a single income now, unless you're talking executive pay.

Society has by and large chosen to abandon the family when it comes to supporting reproduction. Hell, we're told that we aren't reproducing at rates enough to replace us and that the only solution is bringing in cheap immigrants (got to keep those wages down) rather than making having more kids more accessible to the people already here.

Society has chosen rabid capitalism at virtually every cost possible.
Be careful with your thinking here. If it really is bad soft skills that is keeping you from getting/holding a job, then you'll have a tough go at your own business. Running a business requires a lot more soft skills than getting a job, because you live and die by your sales, no matter how good your product is.

So just make sure that you have at least an idea of how you will get some sales that involve minimal interaction with other people.
It actually isn't a biological reality that the woman is away from work for longer. What's actually happening is that the man isn't expected to be away as long as the woman, so he doesn't take as much leave. It's a form of discrimination to make it the woman's problem because she's the one laid up in the hospital.

Just because women are bearing the physical burden of the pregnancy, it doesn't mean it's solely their burden. We're making the choice that it should be their burden. We could just as easily provide subsidies and insurance to companies to cover family leave. If we value childbirth as a society, then we should put our money where our mouth is and actually pay for it somehow.
That guy is nuts. It scares me that with his money he has a lot of influence.
Extremly unlikely with such a small tunnel that goes fairly deep under the earth.
I imagine that Google, famous for their participation in an illegal wage fixing cartel and with its literal army of high-paid attorneys, isn’t too afraid of the legal consequences of discriminating against one woman. Well, so long as the NYTimes doesn’t write about it at least.
And now the same people responsible are extremely upset that someone's trying to reverse the damage.
>because he wasn't able to hear what they were yelling to him

He was advancing toward them with a metal pipe, while their weapons were drawn. I don't think there was much that needed to be communicated in such a scenario. Most likely suicide by cop.
Wow. That is by far the most realistic and rational hypothesis for this phenomenon I've heard. It's simple, elegant, and seems testable. Thanks!

I think this may also offer some explanation for the appeal of the utterly absurd, like flat Earth or galactic emperor Xenu. Its supernormally ridiculous, which invokes a sense of fascination.

In any case if this is true I think this effect is being weaponized today to an unprecedented degree.
I've only ever been an IC. It's interesting you assumed I was a manager. I've learned the tricks to get almost total freedom at work and wanted to share. Quid pro quo is the name of the game in business. You have to give something to get something and trust is everything.

Cynicism will hold you back.
I am reading a lot of comments like this.

Guys, so what? You think middle America gives a shit your high tech biz is getting hit?

The fact that everyone is building all of this out of China is a terrible sign. The fact that China has grown incredibly quickly by cheating is also terrible. They are number two not because they truly invented, fairly competed, or did anything useful for humanity. They stole all sorts of trade secrets, they continue to do that, didn’t license anything, pushed all of our companies out etc..

I didn’t vote for Trump, but listen to yourselves.

I might vote for Trump on the next one because I really do agree with him on this.

EDIT: downvote me it’s ok, it does not change the fact that you are out of touch and not really looking to hear the other side at all.

EDIT, EDIT: Keep down voting me guys, calling me a racist but it does not change the fact that you aren’t looking to have a dialogue about this.
Telegram ​​bot for flight ​price ​tracking
async/await

I see async/await as the only way to write asynchronous code that's readable
In the past maintainers of the major JS runtimes (v8, etc) have stated they avoid documenting performance and optimization tips, because people build code around them and as a result the engine maintainers can't make fundamental changes without regressing performance of those apps. With how widely some JS libraries get distributed, you can imagine how this becomes a problem. It's a nasty situation.

If the difference between a game running at 30fps and 60fps is using weird optimizations to compensate for quirks in v8 and spidermonkey, you better believe I'm going to optimize for them. But then script runtime changes later make my performance tank when other (originally slower) pieces of code speed up.
To follow on from this, "syntactic sugar" is a permitted short-hand that can be losslessly transformed into another, often more verbose construction. This is why it must, definitionally, add no new features.

For example, list comprehensions in Python: `[x^2 for x in L if x < 10]` is EXACTLY the same as `map(lambda x:x^2, filter(lambda x: x<10, L))`. The list comprehension is just easier on the eyes.
Crystal for Ruby programmers: https://rosetta.alhur.es/compare/Ruby/Crystal/#
I love Python too (a lot), but I disagree with some of these.

> I love that they become generators when you use () instead of [].

I kind of like this, and I kind of hate it. My second-favorite language is Haskell, where everything is lazy, so to me it almost seems like everything should be generators anyway (except when a value is expected).

> % for string interpolation was so good they had to bring it back.

I hate % for string interpolation. It's ugly. Why do my variables need "variables" in the strings? It's indirect interpolation. I far prefer f-format strings, because `print(f"Correct: {correct}/{total}")` reads much better.

> Tripple quotes using """ and ''' are hard to beat.

Unconvinced. I feel like the syntax for multiline strings could be a bit simplified.

Also, it's a pain to combine multiline strings with indentation. I don't want all the extra whitespace at the fronts of the lines, but I also don't want to process the text immediately afterwards... sigh.

But I totally agree with the other points. Overall, the syntactic sugar is phenomenal! Just these points I disagree about.
Ask HN: “Expert Level” JavaScript questions?
I'm just curious what kind of in depth, JavaScript specific questions you've seen before or asked candidates. I'm working up the courage to apply for senior roles, but I'm terrified of looking stupid not knowing about XYZ technical thing that 99% of devs don't know.
Agreed. Null conditional operators are definitely handy in languages that have nulls. C# has this in the form of ?.
In case you're asking about the older product, yes I still get a phone book on my porch every 6 months to a year with updated residential and business phone numbers, including ads for the businesses.

The pages aren't yellow, though.
I was an H1-B for many years. Not true.
I always thought it was "data dump".
Are the police so poorly trained and terrified that they are unable to subdue a deaf man carrying a pipe without lethal force? Why is walking towards a cop with a melee weapon grounds for a death sentence?
OK but why should a company hire someone if they are almost "immediately" going to be put on paid leave?

edit: Yes, downvotes will change my mind. You're all doing a wonderful job and are definitely morally superior to me and I'm unworthy of your keystrokes.
Finding Where's Waldo Using Mask R-CNN
Do companies you work at not hire employees for the long term?
That’s an interesting read on what Shkreli did vs Holmes.

At least Holmes “victims” AFAIK were mostly rich folks losing other people’s money they’re gambling with and should have known better.

Shkreli fleeced normal folks just looking to get their day meds.
I explicitly wrote that I did not mean that, thinking that someone would inevitably misunderstand.
Poll Everywhere is hiring a Ruby web engineer in San Francisco or remote
This is incredibly dystopian and would be massive government and corporate overreach.

I would hope a reasonable person would never advocate for such intrusion.
Going into Nevada on 80 there's no ag checkpoint. But returning to CA there is. California has a many $B ag industry to protect. Depending on the current threat they ask about specific things like mud on mountain bikes, fruit, etc.

Never had them ask for ID though. I have seem significant policy activity occasionally, presumably because they were looking for someone in particular.
This is a pulse oximeter.
dupe

https://news.ycombinator.com/item?id=17316858
I sometimes wonder whether SDE employment is inversely proportional to how popular a person is... it’s not like employer is looking for a rock star to sit and fix issues all day long for years. The person will lose interest in two weeks and quit.
> central plains red states, so we can all ruefully shake our heads and remind them that this is what happens when morons elect one of their peers.

say what you will about trump and 'central plains morons', but last time I checked, NYC isn't in kansas so 'their peers' is a bit of a stretch..
Intercepting TLS on a device running rebranded CentOS 5 (11 year old distro that stopped getting security updates over a year ago) does not seem like a safe idea.
> `[x^2 for x in l if x < 10]` is EXACTLY the same as `map(lambda x:x^2, filter(lambda x: x<10, l))`

Except the former resolves to an actual list value, whereas the latter is a generator. (You would've been right if you'd used the generator syntax () instead of the list comprehension syntax []. Just thought I'd point it out since this whole thread is about syntax.)
I was under the impression that grand jury questioning was not to be disclosed? Am I wrong about this?
In the tech industry, if it's worn as a uniform, it's probably a dead give-away that the person should be avoided (especially if there's any other supporting evidence related to negative behavior). It's a Jobsian mimic. There was one Steve Jobs, he was extraordinary in some ways, and he wasn't very nice. There isn't going to be another, he was the product of a unique circumstance. The next great person/s will be their own composition made up of the time and place.

Her fake voice is a lot more indicative than the black turtleneck though.
JavaScript lets you do:

a.map(x => x + 1)

which is pretty nice. And Rust lets you do:

a.map(|x| x + 1)

C++ syntax is just awful, and especially for functional stuff.
There's no need to bring mercantilism into "this". If you go to France, for example, most people there buy nicer clothes but less often than consumers do in the US so there is a large industry of artisans whose jobs don't depend on the global competitive landscape. Unlike in the US, these artisans make products that almost everyone has access to instead of catering to the rich/super rich. It's not a question of efficiency but desire to support local industries with livable wages - an efficiency of regional wealth distribution if you will. In this sense, France is competing for the money that the industry generates with other nation states but it's not a zero-sum game where France's gain is China's loss.

Unfortunately, American consumers are unwilling to pay the higher prices such a culture requires so instead economic nationalists try to push the mercantilist bullshit in the name of protecting domestic industries and national security.
range() in Python

[foo, bar, ...baz] ES6 Destructuring
Why is your brand new account asking for so many details about this specific case?
Ruby's optional parenthesis for function calls. Makes beautiful DSLs like RSpec -

describe UsersController do
before do
allow(controller).to receive(:current_user).and_return(nil)
end

describe "GET #new" do
subject { get :new }

it "returns success" do
expect(subject).to be_success
end
end
end
Many companies already do discriminate against people in committed relationships by making people work long hours in stressful conditions. At my last job several of the employees started having some serious relationship problems because of how demanding the company was. It's subtle enough to not be recognizable but it's there.
Animal welfare: where we donate, and why it matters
...are you a Google Drive dev? How can you possibly make this statement?
That's disgustingly unethical.
>I actually wrote a sed utility to collapse arbitrary whitespace

Can be done with tr, without writing a utility (if by "collapse" you mean what I think you do):

This file t:

$ cat t

the quick brown fox
jumped

over

the lazy dog

containing many combinations of spaces, tabs and newlines (whitespace) can be changed to this file t2:

$ cat t2

the

quick

brown

fox

jumped

over

the

lazy

dog

by this tr command:

tr -cs "[a-zA-Z]" "\012" < t > t2

That also makes the output more amenable to further processing, including common tasks like finding the frequencies of the words in the input, as mentioned in
the "More shell, less egg" post mentioned in this post:

The Bentley-Knuth problem and solutions:

https://jugad2.blogspot.com/2012/07/the-bentley-knuth-proble...
The technical interviewing process. It's one of those things where it treats everyone if they're lying about their experience.
Holmes fleeced normal folks too by knowingly giving them inaccurate test results, which in some cases could lead to death.
A lot of things in Ruby like

if !disabled //instead of
unless disable
You can get WhatsApp and Signal on a BlackBerry?
I used to feel that way too.
When you write out nested for loops the work is at the other end!
For what it's worth, it is meant to resemble mathematical set builder notation. I think that familiarity turned me around on it (pun intended).

From that perspective it feels more natural.

[0]:https://en.m.wikipedia.org/wiki/Set-builder_notation
I wonder if this discrimination is exacerbated in silicon valley where job tenures are so short and perks are so good. If on average, you keep employees for two years and offer 6-12 month parental leave, then an employee who uses it gets paid for two years while actively working for 12-18 months. That's 30-100% higher cost to you the employer per month of active output from the employee. The shorter the tenures and the longer the leave, the higher this extra cost.

As a society, it seems like a no brainer to want to allow new parents to spend lots of time with their kids, but it does incur a way higher cost to the employer, many of whom can't afford to pay employees 30-100% more. The most immediate answer seems to be to make society pay and not the employer. Something like a government funded regional cost-of-living adjusted stipend, or a capped wage matching?
It's clear to Google.
That's true for only python 3.
Sweet. The measure is profit then.
Yes, because China being lower on the developmental scale than the US is a bad thing.

Also, copying isn't cheating. Copying/imitating is the free market at work.
All caches have equal hit rates in the limit when the size of the cache approaches infinity. For finite caches, ARC often wins. In practical experience I've found that a weighted ARC dramatically outperformed LRU for DNS RR caching, in terms of both hit rate and raw CPU time spent per access. This is because it was easy to code an ARC cache that had lock-free access to frequently referenced items; once an item had been promoted to T2 no locks were needed for most accesses. With LRU it's necessary to have exclusive access to the entire cache in order to evict something and add something else.

Of course there are more schemes than just LRU and ARC, and one can try to employ lock-free schemes more than I'm willing to do. This is just my experience.
> Except the former resolves to an actual list value, whereas the latter is a generator.

The latter is an actual list value if you're still using Python 2:

pi@raspberrypi ~ $ python
Python 2.7.3 (default, Nov 24 2017, 21:13:24)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> map(lambda x: x^2, filter(lambda x: x < 10, [1,2,3]))
[3, 0, 1]
>>>
pi@raspberrypi ~ $ python3
Python 3.2.3 (default, Mar 25 2017, 13:24:50)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> map(lambda x: x^2, filter(lambda x: x < 10, [1,2,3]))
<map object at 0x76a72570>
My favorite from python are decorators, especially the built-in ones like @property. They can improve readability immensely, so the don't feel extraneous.
Only if they can up their production to match what the US was selling them. The US is a very large food exporter although the EU looks like it does more in aggregate[1]. There big problem will be if the prices rise, does it cause unrest in their populace. People will grumble if their IPhone gets more expensive or jobs are lost. Riots start when food starts getting scarce

[1]https://www.worldatlas.com/articles/the-american-food-giant-...
I tried that for a while in lieu of membership. Their employees certainly gave me a hard time over this: stink eye, calling the manager, chiding me for doing this loudly and openly, etc.

Thus, while it is possible, their devout employees don't like it and go out of their way to make one feel like a leper for not being a member.
"Wahh why can't I disappear from a company for a year to pursue my personal life goals without any consequences"
Primitive Technology: Yam, cultivate and cook
This is there piece of C# I'm most envious of missing out on in Java.
trickiest/deepest questions ive ever gotten are:

variable hoisting

how to extend a class/prototype

es6 features

typescript/flow

tdd

tooling/webpack
It all boils down to "I'm above your argument but I can't defend myself, and I'm anonymous, so I'll let you know I think you're wrong with a single click".
It is probably mean-spirited of me, but the first thing that passed through my mind after reading this article is "like Theranos, except in Africa". Hopefully, I'm wrong, and this will be an amazing game-changing medical device that saves many lives.
My team has hired more than one person that immediately went on leave. We literally paid them for months before they started. We did this knowingly, and I cite this with other candidates as a concrete example of how well we treat our employees.

Guess what, in our industry the people that are planning to have kids are also very likely to be senior and experienced. They're hard to recruit. Consider leave as part of the cost of hiring good people.

If you're not doing things like this, you're not actually competing for top talent.
If you knew you had to take time off in two months to recover from a scheduled medical operation, would you rather spend the next two months earning a salary or surviving on your savings?
It often is leaked, despite the rules.
Soybeans dont grow overnight. The us provides a outsized portion of soybeans for China, there is no short term alternative supplier. Most likely a interim buyer like Singapore or Australia will purchase the soybeans and sell them to china for a markup that's cheaper the the tariff.
You missed https://code.xyz ! We just announced our $2M fundraise from Stripe (totalling $4M to date) [1]. :)

[1] https://stdlib.com/blog/stripe-code-xyz/
If it's informative and empowers your thinking:

WebGL is more or less just a set of standardized (JavaScript) bindings to OpenGL ES... which is actually ran as DirectX I'm sure in some places...

Everything required to draw high-performance hardware accelerated text already exists in most browsers before even getting to these bindings, which would furthermore require accessing a redundant glyph renderer.

That is to say, WebGL wouldn't provide you much gain. Though, I'm sure some very amusing post-processing could then be done to your code.

Perhaps the future of programming is in the web with lens flare.
The jurors are not allowed to talk about the proceedings but unless the judge institutes a gag order or the contents of the testimony are otherwise protected (i.e., the case involves a child whose identity must be kept sealed, person testifying has security clearance and the topic is classified, etc.), witnesses can do whatever they please.
Bribing foreign government officials is not to be disclosed either, but here we are.
Do you have any references/information showing that it harms the majority of US electronics manufacturers? Just wondering how you came to that conclusion
This kind of worthless comment is not welcome here on HN. Blindly attacking a country with no evidence backing it up is the worse than Nazi. Go vote for your racist Nazi president Trump. From your comment, I sense insecurity and fear. You fear that a developing country would exceed you and threaten your monopoly of power.
30 on the dot this year
I realize the ongoing support of this founder looks pretty bad. But in all my interactions and work with Tim Draper, I've found him to be an ethical and good person. He is nuts in an amazing way, and of all the investors I have met in the valley, I can't think of any other one I'd entrust with his influence.
Decorators in any language.
Do you mean like functions named `is_empty?` and `set_value!`? If I've been told right, this comes from Scheme. I first experienced it in Racket, and I absolutely love it. It's seriously one of the greatest conventions.
This is where everyone starts cheating in the prisoners'dilemma. On trying to win, we're all going to lose. Trade war is the surest path to global economic depression of 1930s magnitude. Let's hope it ends better than that...
Speed and scale.

Also differential in rate of roll-out. "The future's already here, it's just not evenly distributed." ~W. Gibson

Old people are already being attacked by automated systems they cannot understand. It will happen to you sooner or later. It may have already happened and you didn't notice.
Copying isn’t cheating but they have spies in the top tech firms in this country. Everywhere in the world that’s cheating. Stealing confidential proprietary anything anywhere in the modern world will send you to jail, whose sending China to jail?

Donald Trump and your mad about it.
ok, this is actually very usefull for a couple of very cluttered browsers I use. Solved a problem for me