skysight-inc/HackerNews huggingface dataset:
Suppose you have a type hierarchy where a Tabby is a type of Cat that is a type of Animal.

Now, say you have a function that takes a Cat as an argument and returns a Cat. What types can you use instead of the Cats and still remain type safe? Well, you could pass in a Tabby or return a Tabby and everything would be fine. This is a subtype rule that the compiler can check.

What about something a little trickier? Say you have a map function that maps from a list of Cats to another list of Cats. The map function takes two arguments: a list of Cats and an arbitrary function that takes a Cat and returns a Cat. For each item in the input list, the function is called on it and the returned Cat is added to the output list.

Now, can we replace the Cat to Cat input function with a function that has different types and still have the types make sense?

Let's try a function that takes a Tabby as an argument and returns a Cat (usually denoted Tabby->Cat). This won't work as we could have something that isn't a Tabby in the input list. What about a function Animal->Cat? This would work OK as every Cat in the input list is also an Animal.

Similarly, what if we try a Cat->Tabby function? This would work too as a Tabby is always a Cat. What about Cat->Animal? No, as it might produce a Dog and we only want Cats.

Notice the difference between the arguments and return types? For arguments we can replace a Cat with an Animal but, for returns, we can only go the other way. We say that we are contravariant in the argument type but covariant in the return type.

There are other forms. We say we are invariant if we can't change the type from the original stated type. We say we are bivariant if we can replace Cat with either Animal or Tabby.

So, what did Typescript do wrong? As I understand it, Typescript was (is?) bivariant in both argument and return types. This means that the type system would, say, accept a Tabby->Cat function for a Cat->Cat function argument and then fail at runtime.

Is this a heinous crime? A matter of opinion I guess. It's definitely wrong from a type system perspective but plenty of type systems let this sort of thing pass and are successful.

BTW this subtyping complexity isn't just for function arguments. It's also an issue with collection types e.g. what can yuo replace a list of Cats with? But this comment is way too long already.
Murder in Denmark is never a life-in-prison sort of scenario. The average served sentence for a "life term" is 16 years and in modern times only one murderer has served much more than 16 years. That guy, Palle Sorensen, murdered four police officers and still got parole after 32 years!
Coudn't find the download link inside the members area. How do you install it?
They don't have monopolies so your counter is irrelevant.
Some shows are not listed in JustWatch, not sure why.
Apple probably owns the design because most other manufactures hopefully see that you shouldn't be looking at a notch every time you are viewing a video. I've been an iPhone user since day 1 but the screen shape on this phone just makes so little sense.

It wouldn't be the worst if Apple made it that iOS scaled everything so media wasn't blocked by the notch but instead if I get the iPhone X I have to wait for app developers to fix the issue. Seems like a poor decision.
I tend to agree. It's a way to signal that one is above the everyman and everywoman who don't indulge in the cants and argots that abound in the industry.

On average, when people can, they do try to sound more sophisticated than necessary to express a message, including in this message.
> It is urgent that we follow the Paris agreement and switch rapidly away from fossil fuels

I think everyone, even skeptics deep down agree that climate change is real. However, giving billions, if not trillions of dollars to an international climate fund run by who the hell knows is definitely not the correct approach. Businesses and people need short term incentives to switch, not just mandates. Until scientists further develop not only cheaper, but more convenient and efficient energy solutions, fossil fuels will continue to be used.
Characterizing everyone with a different opinion than you as "radical leftists" or "SJWs" only demonstrates your own ignorance and close-mindedness.

What we're talking about here is a perfectly ordinary application of antitrust law, which has been a well-supported framework of law for over a century. This is not some radical new idea proposed by a fringe group.

And while it is off-topic, HN "dominated by SJWs"? Good grief, you cannot be serious. Just to give one example, the HN commenters overwhelmingly supported James Damore and thought Google was in the wrong for firing him. Regardless of the merits of that opinion, it is not what you would see in a community "dominated by SJWs".
>Even if they are wrong, why would we take the chance

Because the economic consequences of fossil fuel regulation could be massively deadly or at least disruptive as well, that is why people and companies spend millions of dollars lying about it.

The balance of power of nations and corporations would be totally upended.
She was in the cafeteria - it's not a high security environment.
> My life is made considerably more dangerous by the US's constant aggression.

It seems you're from the UK, in which case you might want to consider the extent of the UK's involvement in that "constant aggression" that you're talking about.
"Eyeballing this question, my off-the-cuff answer—based mostly on the impressions related to me by every friend of mine who has ever dealt with medicine on a research level—is that I wouldn’t necessarily expect any medical researcher ever to have done a formal experiment on the first thought that popped into my mind for treating this extremely common depressive syndrome. Nor would I strongly expect the intervention, if initial tests found it to be effective, to have received enough attention that I could Google it.

"But this is just my personal take on the adequacy of 21st-century medical research."

I am guessing that the subtitle of his new book is, 300,000 words on why I have more smarts than everyone else?
We will add India and Hotstar very soon !
You perfectly described the 2009 USA Today comic on the Copenhagen Climate Change conference.
shouldn't there be a mechanism that allowed legitimate sellers to report and block knock-off sellers on ebay/amazon?

Amazon and eBay are American companies so they the problem here it seems to me. How are they getting away with it? Arent they technically participating in the copyright/patent violations by providing the counterfeiters a platform to sell their knock offs?

Knock offs on alibaba are another issue but then again average American is not shopping there. ... yet.
Why am I getting downvoted for this? Evolution isn't spontaneous generation. Evolution disproved any notions of spontaneous generation a century or more ago. All life on Earth evolved via a causal process, not random arrangement of atoms.
And there are many, many such feedback loops, and not all of them linked to methane. For example, as the climate warms there are more and more wildfires, and those emits tons of carbon as well. Another example is the decrease in CO2 absoption by water as its temperature increases. There are tons of them that have not been modelled (if they even have been envisaged / discovered); mostly because they are very hard to estimate when it comes to their impact.

As for your suggestion, I doubt this is even possible; we released millions of year worth of concentrated solar energy in the span of a century (edit: slightly misleading statement, see below). Scrubbing so much carbon from the atmosphere would take huge amounts of energy, and that energy needs to be clean or you're just adding to the issue. And all this needs to be done in a capitalistic system without any direct profit motive - good luck with that.

The most "realistic" examples of geoengineering I have read about usually have downsides that end up killing most of us as well (such as a solar shield at L1 to decrease warming - the impact on plant life and as a result, food, would be pretty bad). Meanwhile we're still pretending less than 2C is possible, and even pretending that 2C is survivable as-is without profound changes to our way of lives.

That being said, they mention that human CO2 emission have plateau-ed; I'm far from sure that this the case as a lot of it comes from self reporting and those numbers are likely heavily under reported (especially - but not only - from China). It should also be mentioned a lot of this could come from El Nino; but then again climate change is expected to impact that cycle and we may get stronger and/or longer El Nino periods - it may be partly consequence as well.
I agree with your specific point, but it's important to remain open to exceptions to the general point.
> annoyingly out of place

Agree. I can't take an article seriously when the author is too lazy to type out Facebook.
This looks amazing (speaking as an old Delphi programmer).

My three questions:

- I have a client whose app sits idle but then gets hit by maybe 300 concurrent users, all reading and writing within a few seconds of each other - do you have anything in place to deal with that kind of spike in usage?

- It looks like it's designed to be always online - any plans to make it offline-and-sync capable?

- Any documentation or hints on automated testing?
Outsystems has been there a while - I remember looking at it five years ago. It's kind of expensive - "starting at $2100/month".
Hey! Billionaires of the world - there are now 1400 of you [1]. How much would it cost to, say,

A) buy the entire amazon rainforest, so that it doesn't get chopped down anymore? (Yes, it's not just that easy, needs monitoring and patrol, etc.)

B) Solve nuclear fusion,

C) build massive arrays of solar panels (or fusion reactors) in order to desalinate water and eventually reforest the deserts of africa?

Once I'm a billionaire myself I hope to help with at least one of those three things. Until then, we must ask them nicely to act, rather than just watch their capital asexually reproduce.

[1] https://boingboing.net/2017/10/27/new-gilded-age.html
Environment Sanity CLI – Solidarity
No need to annotate the chords. If you start from a midi file, you just encode the piece as a binary matrix (time range x frequency range). It gets trickier if different instruments are not separated because you would want to specify different instruments as separate channels (so your matrix becomes time range x frequency range x number of channels), but even this could be automated with ML (e.g. using image segmentation methods).

The most time-consuming part is finding enough training compositions with labels (such as composer, genre, mood, style, etc), and data cleanup.
Without sounding like I'm judging here, but can you explain why starting your own company, "isn't practical for most of us"?

Seems to me the overwhelming majority of people are free to make the choice to start their own company. Or, am I missing something...?
>My impression is that premeditated murders rarely occur in Denmark

Who said it was premeditated?

If it was premeditated then a private submarine while others know you went on trip with the victim would be the very worst place to commit it.
Was that a Jurassic Park quote you finished on with?
I think Google is fully aware of what people mean when they say that AMP is given priority in search results. Insider terminology is an excuse to not confront the issue.

This is why we can't have the discussion with Google; they are knowingly deflecting.
How about we grow corn (or other fast growing biomass like kelp) and bury it?
Even for cases like this? Premeditated, sexual assault, possible torture, dismemberment?
they're hosted on hetzner.de

also... that kind of failure on HN? show-case - failed :(
Why do I suspect that this reasoning is circular?
Ooohhh and what I'm thinking of is actually freenode. My mistake :)
This is how humans work, and the same is said about science. Both advance one grave at a time.
Perhaps there needs to be a new open standard for authenticating physical products.

Put a unique key on each item- added cost, I know- that validates against a public key for the company and product. At each sale of the product or passing of possession from a supplier to a vendor, the keys would register a transfer. Anyone in the supply chain could use the company's public APIs to say "I have this item, does that make sense? Or did someone already sell this one?".

Companies could sue anyone selling unverified goods. Border police could easily identify fakes. Customers could confirm authenticity. Sellers could prove they are or are not selling fakes.
>Isn't hn about technology?

No. Perhaps you haven't read the guidelines...

On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity.
Amazon works this way:

If a product is not on Amazon, you create a listing, add images, descriptions, etc.

Then everyone that has the same product has to add their under your listing.

That means that if you put hours and hours into creating the best Amazon page, a counterfeiter can simply add his version under your listing and gain all your images, descriptions, reviews.
Why the troll comment? There are good and bad points to both ecosystems. For instance the Fingerprint reader on my Pixel is faster and more accurate than the TouchID on my iPhone 7. That doesn't make me go, iPhone sucks. The implementation on Facial Recognition may not be as great on the android phones that support it, but that doesn't mean you should bash a whole ecosystem and community of people.
> You have to be a bad actor

It's just a matter of time – their bad acting grows and it has become more visible already.
Row Stores vs. Column Stores: Why Not Use Both?
Earth. It's the same technology set, more or less, but aimed at cooling it down rather than heating up Mars.

I suppose the best option would be carbon capture, if it isn't too expensive, but I rather suspect it would be.
"Horrific monster" springs to mind.
> I have never seen a military parade on the 4th.

My experience has been there is usually a presence from the local base if there is one but they are not the focus of the parade. Right in there with there between the Revolutionary War reenactors and the Boy Scouts.

Edit: Though one could argue that war reenactors are glorifying war and the Boy Scouts is essentially training camp to get boys interested in the military at a young age.
> CoffeeScript and ES6 don't have type systems either

All languages have type systems. Including ES5, ES6 and CoffeeScript. They might be weak and dynamic but they are type systems none the less.

> I think his point was that the type theorists weren't fans of JS

I'm fairly sure that's the case (no data though)

> or he's making a different point.

My point was (a bit toungue in cheek) that seeing how many alternatives that keep popping up for avoiding JS (the language), it seems that a lot of people who like programming languages to the point where they can create one, do not like JS.
Ah the slippery slope, so basically you have no real argument then. We should punish them because they might do something wrong in the future, got it.
I feel really helpless, one person alone is essentially powerless, only governments and corporations are big enough to make a difference but they don't because they don't "believe" it or have no incentives to do anything. (And no, boycotts are pointless). So essentially we are screwed and the people who will come after us will either have to come up with a technology to get CO2 out of the atmosphere back to 290-300 ppm or will have to live with a much more hostile environment than today.

I'm extremely pessimistic right now.
Ah the CMS wars of the 2000s. In a David/Goliath kind of thing, we managed to beat them many times when they were one of the offerings. I don't remember why we won usually but probably because we were local and price.
Surely not all browser version numbers are required for a site to optmize rendering. Surely some versions could be collapsed? Too much info is just given away.

I applaud Firefox and Mozilla. More can be done though.
Comic for reference: https://i.imgur.com/qbtnwmA.jpg
>As for natural and artificial, my point is that regardless of the nature of the relationship, it's artificial to hand someone a pile of data but then arbitrarily restrict what they can do with that data. That's true whether you're talking about copyright, DRM, or personal data.

Your ownership of a website is just as artificial as a government restricting what you can do with it. That's why I say the terms natural and artifical have no place here.

>People use websites, and draw value from them, and give data to them

Serfs use tenures and draw value from them and give loyalty to them.

The problem in your sentence is that I believe it should be rephrased like this: "People use websites, and draw value from them, and give data to their owners" which makes the feudal analogy a lot clearer and represents your own views better, for example the "I" in this sentence: "I do own my data, including my data about the people who visited my website."

>They don't swear fealty to them.

By fealty you mean what? Swearing service to a lord in exchange for a plot of land? But you expect visitors to your website to swear some of their data to you in exchange for the info on your site.

>It's an intentionally provocative term with little bearing on concrete details

You and I disagree on that then.
Loosely but Dr. Ian Malcolm definitely came to mind :)
First it was facebook, then it was reddit, now it's the price of a few cryptocurrencies. I delete the apps due to time wastage, and a week later I have something else to check.

I miss none of the things I used to refresh tirelessly and gave up on, seems to suggest that none of those things made my life any better.
> Also you need to consider that in G-7 nations mains electricity use is actually declining. And in G-20 it has only gone up by 0.1% in the last year. [2]

Unfortunately, slowing the growth of emissions does not actually save us, for two reasons:

1. We are still emitting. A linear growth curve for CO2 is better then a parabolic one, but will kill many of us all the same.

2. Even if we start decreasing our emissions in the coming years, we will almost certainly hit 500 PPM of CO2 by 2060.

3. Which will be ~3C of warming, not accounting for the methane gun hypothesis.

We need to take drastic action to reduce our energy usage - now. Alas, our institutions are unable to do so - by design.
Beyond Bootcamp: Interview Week Prep Guide
Hi folks!

I've written a book I'm giving away for free to developers who are preparing for an interview. I'm sharing it with you today.

Heads up: this is not a technical book. In the book, you will go through a series of exercises that will prepare you mentally and emotionally, and help you uncover your strengths and personal objectives. Then, you'll connect those to the company you are interviewing with.

The project was launched on ProductHunt today:
https://www.producthunt.com/search?q=beyond%20bootcamp&all=true

I'm using the search URL because apparently upvoting from a direct link doesn't help the project spread.

I'd be happy to answer questions, and I look forward to feedback and positive stories about your successful interviews in the future.
Anvil looks like the Wix of python sites.

personally, I'm going to stick to flask and django.

this is nice and all... but you still have to learn python to get it going. My preference is to learn Python/Flask via books, tutorials, and as part of a big community (websites/forums, IRC, etc).

But... I really don't see the benefit of this, even after watching some videos.

the drag and drop stuff? that's just html and css (child's play)

python? that's still python.

I'd much rather just open a blank Ubuntu 16.04 server on DigitalOcean and pull my repository from github. I.e. work like a real developer :)

I wouldn't mess with Anvil, personally. I'd prefer to do code by hand, with a framework that has been around for a while.
Star Trek Discovery makes a huge science error
Its unfortunate that using Firefox is a decent identifying feature by itself these days. Hoping for a change in that trend.
The first one is the more natural one, and so the opposite gets to be "contra", I think.
>quality should be an internal thing that customers should seek out and test

What's the point of seeking out and testing for quality products if you never know if you're going to get that product or a shoddy counterfeit? If you identify that company A makes high quality polos, how do you ensure that the polos you order online are actually from company A.
Ask HN: How do i join a professional organization?
Where can i find a list of professional organization? I would like to be part of such organizations but just couldn't find the starting point.
The 80/20 rule comes from the pareto distribution, which applies to things like hard drive error rates and the sizes of meteorites: https://en.wikipedia.org/wiki/Pareto_distribution#Applicatio...
My favorite is crushing and spreading olivine rocks:
http://www.innovationconcepts.eu/res/literatuurSchuiling/oli...

It's a natural process and we just have to mine as many rocks as we dig up oil. We just need to catch up for the last few hundred years where we only dug up oil and no rocks. It still seems like the least expensive option.
Yeah, it's unlikely that a guy with a hard drive full of videos of women's beheadings was planning anything when he invited a woman onto his private boat and then beheaded her.
Great link from the EFF describing tor and https [0] click on the grey 'tor' and 'https' links to see what information is collected where and what can be viewed.

surprised this article does not mention tor? or has tor been abandoned as a tool for privacy?

[0] https://www.eff.org/pages/tor-and-https
I mean, the facts I offer are accurate. In modern times not a single person has served life without parole. It could happen, but it would be entirely new, so I couldn't predict either for or against its likelihood.
How do you host an AMP page on your own site?
If surviving as a species isn't enough of an incentive I'm not sure that the government can promise much.
> The balance of power of nations and corporations would be totally upended.

Most of these "skeptics" (accepting a very loose meaning of the word) are in the US, and given the US's massive geographical resources, of desert, planes and coastline, and its expertise in technology development, I can't see why it as a nation would object, in terms of a zero sum transfer of power between nations. The really dramatic shift would be away from the Middle East, in particular Saudi Arabia, Iraq and Iran, and I struggle to see why the US should do anything except cheer that.
This scares me, a lot. After watching enough videos online I've had to start using the Apple Store, paying shipping, to avoid any potential fire hazards. Most consumers probably never know. :( It's crazy that they sell the fakes on the official Apple product pages.
Ok, so I can run 3.6 code on the server and return the output?

As Py2 is EOL in about two years it feels risky for anything to be built on it.
dumping the comets and moons onto the surface is to help with that. But I've done some napkin math and it looks like we need ~40 billion commets to bring it halfway to earth mass...welp
If you're an Apple user, you don't really get a choice over whether to adopt this new stuff. You'll either buy it now, or you'll have to buy it anyway the next time you upgrade because there won't be any other options. Or you switch to Android.

Often this is fine because the new stuff is unambiguously great. Sometimes it's miserable. That's life as an Apple customer.