skysight-inc/HackerNews huggingface dataset:
> Is an Algebraic Data Type (ADT) in rust an enum or tuple?

It's the combination of both.

Tuples are Product Types. If you treat types as sets of values, then the type (A,B) is the cartesian product of types A and B. For all practical purposes, structs are just syntactic sugar for tuples. Enums are Sum Types. The values of Result<T, E> are fundamentally just all the values of T plus the values of E (with a tag to tell them apart). Put the two things together, and enum Coordinates{TwoD(f32, f32), ThreeD(f32, f32, f32)} is a set of values with cardinality #f32^2 + #f32^3. You can build types corresponding to arbitrary polynomials, hence the name.

"Union type" usually just means the same as "sum type", though it can also be used to mean C-style unions specifically.

(There's also functions as exponential types, with A -> B having cardinality #B^#A, but you're neck deep in type wankery when you start talking about those :o)

Almost every language supports product types in some way, either implicitly or explicitly, and nobody really bothers talking about those in isolation. It's when you add sum types to the mix that people start talking about ADTs, and it's when you add pattern matching that the whole thing comes into its own and you can just express functions as "things with this shape become things with that shape".
To be perfectly honest, this is still within a 1000km radius circle that encompasses Taiwan, South Korea and Japan. That covers the majority of next-generation fabs that aren't Intel.

It's great to legally diversify these fabs, but it does very little to mitigate geopolitical issues that are brewing in and around the east china sea.
Gotcha. I did preface this definition with the word 'candidate' and I acknowledge that there may be good alternate formulations. The spirit of this particular exchange is about whether or not 'justice' can be formulated as a universal.

I shared an argument above for why it can be viewed as a universal and judging by your comment above you are somewhat skeptical of this claim.

If we shift the discussion to allow conceptions of 'justice' that move away from the classical tradition and include modern ideas like 'climate' justice or 'social' justice, I will revert to agreeing with your skepticism.

I don't think anyone can plausibly claim that these more marxist-oriented modern definitions are universals.
It's frustrating that people make the argument that the lab leak theory is "politically convenient" and that it "played into various conspiracy theories" and then go on to list ridiculous things that no one here is arguing. A lot of people look at covid, which was first seen in wuhan, and think "hmm, it seems like there's a good chance it came from the lab in wuhan that studies coronaviruses." You don't have to involve politics at all for it to be easy to believe.
> You probably should report it to Mozilla https://bugzilla.mozilla.org/

Probably. But I've never had much luck getting any traction on previous reports even when I've made sure to produce great supporting detail to enable reproduction.

I suspect you need to know the right people to get traction on Mozilla bugs. Everyone else just seems to get lost in the swamp.
Javac isn't even an optimizing compiler. There's few things faster than it.
This absolutely cracks me up. Developers reacting like every user who has the perfectly functional UI/UX pulled out from under them. Shoe on the other foot as it were. Perhaps there's a lesson here for developers of software, their management, and/or companies who take part in this UI/UX churn for churns sake.

The problem here is that statistics, and feedback, doesn't inform about the negative. All the users out there who are happily using your software in its current state and are perfectly happy with it but can't be assed to take the time to fill out your survey. As the saying goes "you can't improve what you don't measure." This should have continued something like "so be sure to consider what you can't measure". You can't force everyone to take your survey.

Sure in part that puts the blame on the users who don't bother to fill out the survey. But that shouldn't also give the right to ignore them and what they might want. Perhaps a non-vote should be counted as a vote for no change instead of simply being ignored. It's pretty well known that the squeaky wheel gets the grease but that shouldn't mean the entire UI should be slathered in the grease the squeaky wheel wants but no one else asked for.
How is Ukraine getting explosives and divers to Nord stream without being caught? That's the issue. You'd need a fairly sophisticated spy network with experience in covert operations. I don't think Ukraine has that.
I wonder why larger TVs are allowed to use more energy?

If the intent is to promote lower power devices surely it's better for me to use an 'inefficent' 14" screen using 100w than a 100" screen using 110w?

The only counterpoint that I can think of is that this would effectively ban very large TVs. But once you're at the point of saying you can't have energy wasting things, it seems obvious that that would include very large inherently energy wasting things.
>with strict opinions

Not really sure what you're trying to prove here.
Dwayne Johnson Is Ready to Embrace the Heel Again in ‘Black Adam’
Holy shit. The lady at the end wasn't paid for 7 MONTHS! How the fuck is this legal?
Hasn't everybody configured two spaces to be replaced by a period and a space? Who is typing periods any more?!
Except substitute “down the street” with “30 km away on the other side of a river”, and notice that everybody who got sick initially was next to the market, none of them anywhere near the lab.

So the lab-leak hypothesis is: this virus created at the lab accidentally escaped to someone who subsequently only infected people on the other side of town.

It’s certainly a possibility (viral transmission is irregular with high variance, and people can easily travel that distance), and the lack of transparency by the government is alarming (though not particularly surprising to folks studying China), but most of the experts who have studied it still think it’s relatively unlikely.
Sorry, yes, that's kind of what I meant. Ultimately, I want to be able to seed an RNG with an alphanumeric string, and in other languages that means using a third-party library or writing one myself.
> But it doesn't matter too much because it'll never happen...

I'm not saying you're wrong or right, but it's worth remembering that it's hard to guess how it'll be in the future. Maybe Apple acquires Microsoft at one point (or vice-versa) and eventually ends up buying Linux (somehow, don't ask me how), and we'll end up with one OS for absolutely everything. Weirder stuff have happened.

There used to be multiple contenders for what would end up as "the internet", with many countries having their own versions. I'm sure at that point some people had similar sentiments running through their heads, something like "wow, wouldn't it be cool if all these various networks was just one instead? But that'll never happen..."

Similarly how we today look at messaging services not being interoperable with each other, but seems this is slowly (veeery slowly) changing.
You can probably just ignore them as a concern at this point. Nobody is going to want to use them in new products. They might keep going as a educational novelty but the magic is gone as far as using them in commercial/industrial products.
Litost: this Czech term means 'a state of agony and torment created by the sudden sight of one’s own misery'

ref: Milan Kundera, author of The Unbearable Lightness of Being, remarked that “As for the meaning of this word, I have looked in vain in other languages for an equivalent, though I find it difficult to imagine how anyone can understand the human soul without it.”

https://www.collinsdictionary.com/us/submission/3276/Litost

See also: https://en.wikipedia.org/wiki/The_Dictionary_of_Obscure_Sorr...

My two cents: It's not necessary to have a single word although it is nice for shorthand purposes. For example in litost above, the multiword description will do.
oh hi there, would you like to hire a few super expensive accountants to optimize taxes like the other big corporations?

(in case it isn't obvious, yes, I fully agree that evading government control/taxation is a hugely lucrative market).
Also known as QCIF format
Communication is a two way street for sure.

But I haven known plenty of devs who keep their heads down and bemoan their boss and wouldn't say anything to them anyway. Hard to know how a person feels in that case.
That sounds like a cyber safety issue more so than a problem with anonymity. Remember all those lessons about not sharing your real address or name online? Add another caveat that the two idiots fighting may, in fact, be the same person putting on a show. In fact, the crowd cheering them on is also half-composed of the same guy (the other half is organic popcorn-watching).
In general, mental illness should be kept jealously private and only discussed with one's therapist, but this is in regards to the patient protecting themselves. Kanye can do what he wants, but if he is glorifying BPD (I have no idea), then he is indulging in his symptoms and heading towards cautionary tale rather than being a positive role model for other BPD patients and an advocate or activist for mental health, such as Patty Duke, Carrie Fisher, Catherine Zeta Jones, Trevor Noah, and many other celebrities. Life is hard for the mentally ill, and though I'm sure a couple billion dollars can make a huge difference, most BPD patients will end up institutionalized, in prison, or dead repeating Kenye's mistakes.

I'm not saying monetizing one's own mental illness is necessarily wrong, and I think many have been successful throughout history doing so, especially in art, without causing harm. But living in the spotlight, whether intentionally or not, one should, like Spider-Man, recognize there is great responsibility, and take the positive and negative effect it has on others seriously. Again, I don't know what Kenye is doing, only getting glimpses from headlines I can't avoid.
Well, considering that 90% of all startups fail, that number isn't unrealistic
Hacker News, the place where you will get told that we are definitely going to invent spacecraft that will be able to traverse the galaxy by solving the light speed issue, the gravity issue, and the radiation issue (among others) but that when we meet extraterrestrial lifeforms, they won't know how to fucking count.

Sorry. That's the one. That's the one that broke me. Jeremy Bearimy
I'm surprised any video footage at all was released, given the political tensions around this event. This looks like the most comprehensive version of the video (possibly the earliest released, one of the earlier and less cut than others):

https://www.youtube.com/watch?v=2vbkFzQBo6w

That's very thick steel. Either a whole lot of explosives or some kind of shaped charge/explosively formed penetrator (widely used in oil drilling industry to blow holes in down-well pipe to allow oil flow) must have been used, with possible further damage caused by depressurization of the pipe.

As far as who did it and why? Russia seemed to be pushing Europe for a deal whereby if they went along with the annexation of the eastern provinces of Ukraine they'd open up gas supplies and end the looming energy crisis Europe faces, and a working Nordstream / Nordstream 2 pipeline was necessary for that strategy, so blowing up the pipeline derailed that strategy for months at least.

As to motive on the USA side, several officials in state and energy seem to view this as a 'tremendous opportunity' to shift European gas purchases away from Russian pipelines and towards US LNG tankers (price differential there), not sure how the Qatar gas output is affected.

Europe of course would have been better off pushing a lot harder for wind/solar/storage over the past two decades and getting off the Russian, American and Middle East fossil fuel teat that way, but to quote Jeremey Irons in Margin Call, "That is spilt milk under the bridge". So now what?
My car itself can control when it's charging.

If you use anything more fancy on the PV side you can also control it on the other side.

And for more than one flat, load control is already available. We're I life we have 90 cars in the parking garage and there is a load controller
> What about that data is harmful to you?

Arguments like these always reminds me of the story where some town had a population register that included religion, and then the Nazis invaded.

You don't know how or when the collected data will be misused, whether by the original owner, a malicious third-party breaching their systems, or the government (and even somewhat-stable governments can quickly turn sour, see Russia or the US's recent issues on abortion for an example).

Furthermore, at least in Europe, the GDPR mandates that all non-essential data collection must be strictly opt-in, so regardless of opinions, it's a law with which you have to technically comply (even though lacklustre enforcement allows offenders to get away), but doubly so if your entire selling pitch is based on privacy.
Nah, fuck it. We're allowed to commit to war too. Xi Jingping is a tyrannical insane dictator and his successor will be worse. He needs to be stood up to, and no one is in a better position to do that than the US.
The US media has not been quiet. Russia has the means to blow shit up.
Enough Empty Office Space for over 150k People in S.F
wow amazing explanation and so easy to understand. curious..what are some real life Use Cases?
(I'm the CEO & Founder of DuckDuckGo.)

It is simply not true that we have censored anything or made ourselves "the arbiters of truth." I realized I previously explained how our news rankings work very poorly on Twitter but I subsequently put out a clarification tweet[1] and then we made this help page with a much clearer (and detailed) explanation of how our news rankings work: https://help.duckduckgo.com/duckduckgo-help-pages/results/ne...

[1] "We are not ranking based on any political agenda or my (or anyone else's) personal political opinions. We are also not assessing any individual news stories." https://twitter.com/yegg/status/1515637392190935041
That's easily accommodated by providing a single, required, multi-line input.
Why doesn't reader mode work in that webpage?

Whatever happened to the (failing) promises of HTML + CSS ? where I was gonna be able to swap out this CSS for whatever I wanted?
Excuse me, I feel compelled to point out that it's FIG in France.
Why Study Algorithms?
Presentation mode has worked well for me for code presentation for a decade both in-person on a projector and for screen sharing, across hundreds of talks. If you believe otherwise, let’s hear why rather than some kind of assertion that it must be true because you said so.

For the others… well, it’s not called screen sharing mode or code pairing mode.
> Though, aren't there mercury risks from consuming fish in large quantities?

The mercury exposure can vary by a factor of 100 depending on what species you're eating, and sourced from where

In general, to decrease mercury exposure, stick with small fish that are short-lived and lower on the food chain, as well as shellfish.

Mercury reference for a high level idea (some of this is out of date or not specific enough by species/fishery and also doesn't cover many local fish): https://www.fda.gov/food/metals-and-your-food/mercury-levels...

edit: a good reference site is https://seafood.edf.org/ which breaks down by fishery and multiple contaminants. For example, if I searched "striped bass" I can see that the wildcaught ones are higher risk than farmed ones due to water contamination of both mercury and PCB on the east coast of the united states.
Office vacancy rate in San Francisco just hit a new high
How did Ukraine pull off the truck bomb on the Kerch Bridge then? They clearly have some capability.
1. Develop chip arguably competitive with western rivals*
2. Invade Taiwan and over TSMC
3. Profit??

* Backdoor included, of course
This works if you are at the end of your career, but otherwise one should look at building their career in case something happens to their current job.
Since when has marketing been honest?
Or…. I’m not adding your app to my phone. My phone number is xxx-xxx-xxxx. Thank you and have a good day.
You and I are in a similar train if not actually the same train. My last day at my current position is end of the month - next month I will take up the same position at a competitor who created the job position because they have a need, not because upper mgmt said they had to (as with my current).
I'm happy for you that you too found your final destination on the train towards nowhere. I wish you the best, oh familiar stranger. :)

Yours truely,
A dude on your train.
Mostly good stuff, but:

> You’ll notice that with backend-only data migrations – like the ones Box or Pinterest executed – there was no need for rollback plans, as the rollout moved forward only after the team had validated that everything worked fine.

Speaking from direct experience: That is outright bullshit. Ideally your testing will catch problems, but if you're migrating to a new database architecture, it's an architecture you don't know well, and by the way, your sys admin never even read the installation requirements. This is yet another reason dual-write is ideal, so that you can roll back late in the game when the new DB suddenly seizes up and goes catatonic (esp. Mongo/Cassandra/ElasticSearch). Be that Negative Ned and plan for the worst.
Yeah? I was excited about C++, when I learned it. Basically all the performance of C, and the standard library included a vector class? And linked lists? And trees? And strings? I don't have to manually manipulate char pointers anymore, and can just say foo + bar to concat strings? Sign me up.

(Does C++ have its warts? Absolutely. But it's a huge productivity boost over C.)
It does actually ask if you want to use your code to help train it. The problem is that even when people have said no, they're still seeing their code pop up in copilot's auto-complete.

I don't mind it using my code because in my opinion, we as a software industry are way behind on where we should be and copilot is helping a lot of developers finish their projects quicker.

That said, software licenses should 100% be respected. I would hate for FOSS projects to start being sued over code. It's not in the spirit of FOSS, but neither is stealing code. Copilot should be doing a better job excluding code and none of this would be a problem.
Some people produce their best work under pressure, even if that pressure is self-inflicted.

Turn the merge window beginning into a deadline, and only accept follow-on patches during the following 2 weeks review.
In that list prime numbers might not be a thing.
> Why am I telling you? It's that I've learned it better to communicate and hopefully work things out then just pack up and head to another place.

How do you know it was better, in this circumstance, if you don't know what the outcome of packing up would have been? It's impossible to know all the consequences of our actions.
Just read informed commentary instead of conspiracy theories?

1. The US is already selling gas to Europe and there was no sign that would change. Europe has already committed to disinvesting from Russian energy. The pipelines were dead already. The US and others had already captured the market. Increasing the usage of Russian energy again during a bloody war against a neighbouring country would be political suicide for any European country I can think of. Maybe this is not obvious to Americans, and maybe this explains the obsessions with American intervention here - Americans always think their country is behind everything good or bad in the world, which in my mind explains a bit of the “Russia attacked due to NATO” delusional narrative. If anything happened in the world, US must be behind it, military industrial complex blah blah blah.

2. Like other posters here have already mentioned the consensus hunch (and that’s all we have - a hunch) for now is this was a warning to internal competitors in Russian internal politics. This was a way to burn the ships and end any idea that Russia will come back to the West. We are in unrestricted warfare against Russia.

3. If you look into Russian propagandists online, they are 100% behind the idea that America did it to deindustrialise Europe, increase dependency, etc. I regularly follow the rule that whatever Russian propagandists say is higher in likelihood to be false, something which has been demonstrated again and again with - MH270 flight, invasion of Crimea, the killing of Boris Nemtsov, the Skripal poisoning, the invasion of Ukraine, now the usage of Iranian drones (Russia denies ever using them as they rain upon Kyiv). I could go on and on.

4. Like others have said, there are other operational pipelines. Thinking the problem with Russia selling Europe energy is “pipelines” is the definition of missing the forest for the trees. Assume we are at war with Russia and that they are a full blown revisionist militarist state in the Nazi tradition and everything will make more sense. Stop making stuff up and start dealing with reality - we are in a state of direct economic and information warfare with Russia, and in a proxy hot conflict where we hope to annihilate their armed forces. They are acting accordingly, and in order to prevent a “detente” later on after perhaps a change in leadership, the core rulers of Russia decided to blow up remaining economic bridges.

Effectively the world is at war against a new form of fascist/hypernationalist superpower and you guys are arguing about who blew up a pipeline that the fascists would use to feed energy to their now sworn enemies.

Stop guessing. It was the fascists.
Why not change the background to black? The issue isn't yellow, it's white.
Node.js 19.0.0
If you like to write novel code it may be that you really enjoy puzzles. One way to scratch that itch in existing systems is seeing if it can retain it's use cases with less code. See if you can make your net lines of code negative for all your bug and feature commits.
I'm planning to sit this one out. Qatar uses forced labor and more than 6500 migrant workers were killed preparing for this World Cup. There's just no joy in watching it whatsoever, only shame.
I'm guessing the project got cut, so the team went, so the guy went. You're right, he can have almost any job he wants with a phone call. Given his history, he'd survived quite happily in much more difficult, demanding environments, so I can't imagine he was targetted. It wasn't personal, it was a spreadsheet decision.
News outlets said it wouldn’t be possible for divers but 80m isn’t impossible for divers. The one thing that makes me think state actor is the timing of the bombs. Too close for activists to coordinate IMHO.
Erlang doesn't have enums.
Thank you for this clarification!
That's the problem, even with every possible option disabled there is currently no way, even through about:config, to keep Firefox from phoning home at these points in its execution lifecycle.

The telemetry settings they provided basically amount to, we'll phone home to Mozilla either more or less, depending on your settings.
> Taiwan's sovereign airspace

Well, only 13 countries recognize Taiwan as a sovereign country - such as the 10,000 people of the 21 square kilometer island Naura.

Also, Taiwan occupies Kinmen Island in the bay of Xiamen's harbor on the PRC mainland. The island is in the Xiamen harbor and is 10 km from the city of Xiamen. So any PRC planes flying around Xiamen are "violating Taiwan's sovereign airspace" (which almost no one recognizes as "sovereign" - one of the main parties on Taiwan acknowledges Taiwan and the mainland are all one country).