skysight-inc/HackerNews huggingface dataset:
You can keep the Circle and Rectangle as class (record here) and only see them as Shape when you want to do the double dispatch of the visitor.

interface Shape {
record Circle(int x, int w, int r) {}
record Rectangle(int x, int y, int w, int h) {}

<T> T apply(Function<Circle, T> _circle, Function<Rectangle, T> _rectangle);

static <T> Shape shape(Circle circle) {
return new Shape() {
@Override
public <T> T apply(Function<Circle, T> _circle, Function<Rectangle, T> _rectangle) {
return _circle.apply(circle);
}
};
}
static <T> Shape shape(Rectangle rectangle) {
return new Shape() {
@Override
public <T> T apply(Function<Circle, T> _circle, Function<Rectangle, T> _rectangle) {
return _rectangle.apply(rectangle);
}
};
}

static double area(Shape shape) {
return shape.apply(
circle -> Math.PI * circle.r * circle.r,
rectangle -> 1. * rectangle.w * rectangle.h
);
}

static void main(String[] args) {
var aCircle = new Circle(2, 1, 4);
var aRectangle = new Rectangle(1, 3, 10, 7);

System.out.println(area(shape(aCircle)));
System.out.println(area(shape(aRectangle)));
}
}
Some people say that there isn't much open literature on GPS anti-spoofing, but there are many patents filed by the likes of Lockheed-Martin, Boeing, BAE, etc.

I find the multiple antenna answers interesting.

For instance, one of the easier attack scenarios against an airplane is to have a directional antenna on the ground. Because airplanes broadcast their GPS position via ADS-B, you could also know that you'd succeeded.

In a case like that, however, the radio signal from the ground would be stronger than the signal from the sky and it would be obvious what was going on, unless the attacker managed to get the power level just right.

With multiple receivers you also will see very different results with spoofing than with a real signal. For instance if you had a receiver at the front of the airplane and one at the back of the airplane, the time delay for all the fake satellites would be the same (they all come from the same place) whereas the time delays (e.g. position) would be noticeably different from real sats.
Aside, @personlurking[0] on HN (you won't see this but thanks) mentioned FlixOlé[1] the other day and I've been hooked on Spanish cinema for a few days now. $4/mo (14 day trial) and there are no subtitles, so for the HN crowd it's only good for Spanish learners forced to finally wean off subtitles.

While Netflix has stellar Spanish shows/movies from El silencio del pantano (movie) to El desorden que dejas (show), it's a fun break from Netflix with a large catalog of eras (1950-2000) that Netflix doesn't have at all.

I wouldn't normally watch a movie from 1957, but there's something easier about doing that when it's a culture you weren't born into. I think this is the spice of learning another language, especially for us native English speakers since we have no real impetus beyond leisure to engulf ourselves in other languages/cultures. IME this is something people take for granted who learn English as a 2nd language and wonder why English speakers are monolingual.

This comment doesn't fit here (just triggered by Spanish and Dracula and a couple statements in TFA) but it's something I was thinking about over the last couple days that I wanted to jettison into the ether.

[0] https://news.ycombinator.com/item?id=25977953

[1] https://ver.flixole.com/
In my opinion, the second is just not true.

If a reliable feature is evolutionary advantageous, then new systems will come about to take advantage of that (and may out-compete old systems, indeed, to the point of extinction), I agree.

But, if a reliable feature isn't evolutionary advantageous, it can be ignored or even removed.

Negative features may need to be managed, rather than taken advantage of. Examples: ionizing radiation, landfill.
Open Source Civilization
Interesting! Can you say a bit more about what you don't like about the font style, layout and color scheme?
Ofcom revokes Chinese broadcaster CGTN's UK licence
That's refuted in the article. We were not finished developing them in February. It took all the time it took, to find vaccines that actually worked. With science. Not throwing darts. Several companies have still not worked out their vaccines.

It's like saying "We had steel mills; we had cars back in February!" All it takes is designing and building them.
Directory of Pragmatic Programmer Books on Medium
This kind of weapon has a backup INS

https://en.wikipedia.org/wiki/Joint_Direct_Attack_Munition

The INS doesn't need to be terribly high performance because it only needs to work for the time it takes a bomb to fall from the sky.
Well, these things can go either way.

Almost by definition, a manly activity is one where you won't meet many women.
Wow, talk about a barrier to entry. Google already has Curie from North America to South America and Equiano from Portugal to South Africa. They're also working on Hopper from North America to UK and Spain:

https://cloud.google.com/blog/products/infrastructure/announ...

I presume that the other trillion-dollar companies are getting in on the action too.
Melania Trump is a racist who propagated and never apologized for the "Birther" conspiracy theory that President Obama was born in Kenya.

Is HN a place where users need to "Be Kind" to racists, and those who defend racists?

Does enabling racism amount for high quality discussion on HN?
You may be interested in this study: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=586405

The authors used changes in the terror alert level (which caused increases in police presence) as a natural experiment, and found that crime dropped significantly in the area when the terror level increased.

I think the explanation here is probably quite simple: an increase in the number of police officers in an area means that calls are responded to more quickly and for any given crime the criminal has a higher chance of being arrested. As we'd expect, a high likelihood of negative consequences deters crime.
In nutshell you got it. The cost is basically just bend over and smile (not trying to be glib... it is HUGE).
What if every satellite suddenly disappeared? | TED Talk
"Always get consent" (except here, here, and here)

This if not a simpler rule than to act if the outcome is judged to improve the situation. My rule is that a 90 percent chance is better than an 80 percent chance. It has no exceptions, no caveats.

I could convince you 90 percent of the time to "consent" to brain cancer surgery. If I can fix your brain without you even being aware of the problem 95 percent of the time, I would choose the later not the former, even if you happened to be the 5 percent. It's the same reasoning why we REQUIRE vaccines even though a small percentage of people can die from the vaccine itself. There are no exceptions in my system, it's simply the laws of probability applied precisely rather than some semantic argument you twist and turn at every exception to every case.
I'm somewhat annoyed at the accelerometer/gyroscopes that are available to the public, it is like they are all gimped to prevent you from building a weapons guidance system.

For instance, the Wiimote doesn't have the dynamic range to handle the highest accelerations you can generate waving your arms, which makes it hard to use that kind of thing for athletic training.
Getting to 1000 Paying Members
So no source then?
In mammals, the dependance on a certain body temperature.

The fact that it is regulated to a margin of 0.3% shows quite how important it is. Increase or decrease the body temperature by 5% (on an absolute scale, so Kelvin), and you will be a dead human...
Is this live streaming some/all of your coding sessions? Or something else?

I'm really interested in this to be honest, but have personally held off on doing it because I've no experience with OBS or live streaming, so I hope you don't mind the question =)...
I feel this for sure. I was in the "grinder" for a while, and this year I'm making my move into becoming an indie hacker myself.

If you're looking for a little inspiration, here are a couple links:

- Pieter Levels' announcement post on 12 startups in 12 months: https://levels.io/12-startups-12-months/

- My own blog, where I'm documenting my own journey in building a startup in a month: https://startupinamonth.net/

I hope you break out soon!
Building Product Intelligence Platform with Cloudflare Workers
I agree that the new drug candidates had promising results. Yet as a new technology, there was still a risk. For example, the first Pfizer drug candidate BNT162b1 gave fever to 75% of the participants in some cases [0]. Some countries decided not to buy from them at first for that reason.

[0] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7583697/figure/...
It's only cool until you think about the physics of it.
Thrust needs to be applied towards the center as mass if you want to move forwards. Apply the thrust off-center and you start spinning.
The scenario in the book is a great way to start spinning really fast without going anywhere. You'd need to huddle around the missile to align your own center of mass with it (the thrust vectoring can adjust for minor errors), but that's not very cinematic.
School of SRE
An Introduction to the Bicircular Restricted 4 Body Problem
According to https://www.courtlistener.com/docket/29095511/13/parler-llc-... it took several months of moderation problems before AWS dropped Parler as a client.
How about: join a succession of startups some of which work (get bought out) and some of which fail (founder refuses to sell out). At least this guy was somewhat in charge of their own fate.
23andMe set to go public via a Virgin Group SPAC merger
Hi Mike! I have nothing to do with distribution, but the book is also available from Amazon [0], B&N [1], Bookshop [2], and Penguin [3], maybe one of these has better shipping to Europe?

[0] https://www.amazon.com/Computer-Graphics-Scratch-Gabriel-Gam...

[1] https://www.barnesandnoble.com/w/computer-graphics-from-scra...

[2] https://bookshop.org/books/computer-graphics-from-scratch/97...

[3] https://www.penguinrandomhouse.com/books/645952/computer-gra...
Tagged unions never went away, it's just that, as you mention, C++ style OOP became very popular and they worked the other way around: instead of having a single function that matches the tag to figure out what to do with the data, you ship data-specific functions straight inside the object (virtual methods).

In theory you can have both of course, and C++ now has support for variants (because we know C++ tries to be come a superset of all programming languages in existence). It's still a bit clunky to use though, especially because of the lack of "match" support in the language.

But I think a problem is that it's easy to mess up tagged union in low level, non-managed languages. Rust's enum work great, but that's thanks to the very strong type system and borrow checker which makes them effectively impossible to mess up in safe code.

In C or C++ it can become messy and hard to debug. In C you don't really have a choice, so you do it anyway but in C++ virtual methods and inheritance are usually a bit easier to manage.
Do you not find that some people in the service industry do a better job than others, and make your day more pleasant as a result?

> really poorly

Your words, not mine. Obviously if you're consistently terrible at your job you can get fired. But what's the incentive to go above and beyond, vs "good enough"? And how are tips for a server different from an annual performance based bonus for a white collar worker? I don't hear people raging about that one.
And I have the 'SE 2', which they just refer to as 'SE' in their marketing despite the fact they already had a different product with the same name.
Relevant: https://blog.pinboard.in/2017/06/pinboard_acquires_delicious...
Giving you the benefit of the doubt that crt is bad, can it also be true that minority Americans are victims of racism? Assuming yes, then the problem becomes what's a better approach to embedded racism than crt.
Too bad they can't be sued for ruining countless businesses with mindless self-serving "advice" meant to do nothing more than get their contracts re-upped.

The whole business is a scam built around sending in some 26 year-old with an Ivy League degree and $100 haircut to regurgitate snippets from articles in HBR.
Ah the old "entire digitized Library of Congress" per second metric
Google internally requires employees pet projects done on company time to be published on the google git repo.

But if the company doesn't want to provide any kind of ongoing support (eg. if that employee leaves the company and abandons it), then they say this.
That's a fair point actually.
Idea–Expression Distinction
Very cute. "We're going show ads until you leave fewer than four pegs." Nice game, playfully monetised.
You can favorite comments if you click on their timestamp.
It's peanuts. This likely will be covered by some form of insurance, and very little will change.
I hope they also fire everyone involved and substract the money directly from each partner compensation. That will maybe teach a lesson to a whole generation.

Okay, naive, wishful thinking.
And you would be wrong then, as most people define free will as the ability to actually control one's own actions rather than participate in a false world view where those "choices" are viewed as the important part of defining free will.

And I do ignore it. Not it of spite, but because it fails to hold up to intense rigor and scrutiny.
Do those come with pre attached NSA listening devices [1] ?

[1] https://siliconangle.com/2013/07/19/how-the-nsa-taps-underse...
The best overview of this mess is from Cory Doctorow, who notes that while the claims of fraud in this election are garbage, the voting machines, and especially overused Ballot-marking devices (BMDs), are also hugely problematic.

Voting machines didn’t steal the election. But they’re a terrible technology. - The Washington Post
https://www.washingtonpost.com/outlook/2021/02/03/voting-mac...

And worst of all is ES&S' threats against folks who point out those legitimate flaws, e.g. SMART Elections, a journalism and advocacy group in NY.

ESS voting machine company sends threats
https://freedom-to-tinker.com/2021/01/11/ess-voting-machine-...

What we need is evidence-based elections:

Evidence-Based Elections: Create a Meaningful Paper Trail, then Audit
Andrew W. Appel* & Philip B. Stark* Georgetown Law Technology Review 2020
https://georgetownlawtechreview.org/wp-content/uploads/2020/...

And though we have improving evidence for correct tabulations in the recent elections, many states still aren't doing a good job providing evidence for ballot eligibility or chain-of-custody.

The best way to promote confidence in our democracy is to calmly stick to facts, not be swayed by politics, and work to make things better. For more on how we've done that in Colorado and elsewhere, see my page at http://bcn.boulder.co.us/~neal/elections/corla/
A question I have is do you suggest his books to a non US audience ?
I was thinking about a potato video I no longer have links to, that explained how shifting from N to D or B(not sure which) while flooring accelerator bypasses an undocumented safety limiter and cause the car to jump forward harder than the car normally would. Nissan Leaf reportedly has a similar jerk limiter feature.

Isn’t it a bit odd that no one talks about it? Though probably the fact is just that no one take stock Prius or Leaf seriously
Privacy Sandbox: Google's answer to privacy-conscious advertising
Brand Positioning: Your Competition
Well some laptops come with an option of an 'm3', 'i5' or 'i7'. On the internet you'll see lots of people saying the the i5 will crush the m3, however all of those three processors are identical with only a 200 MHz clock increase between them (15-20% performance increase in practice).

I guess the OP is referring to the confusion between the 'laptop' m3 and the i7 that you can get in a desktop or laptop.
Current copyright extends to 70 years after death of the author, so the letter written today will still be copyrighted in 2121 if the author is alive for 30 more years from now.
Nice try, big psychometrics.
The Great Disappointment of 1844
You could load a modern Javascript-powered website in less than a minute with that.
Embedded GUI Code: KnowCode AI Exporting LVGL and NXP GUI Guider
I always find comparisons using text data incredibly worthless.

I'm sure a Shakespeare play or The Great Gatsby are barely a few megabytes.

But if you asked Joe Shmoe on the street "In Great Gatsbys, how big was the last picture your iPhone took", they would rightly have zero idea.

It's so useless.
Most developers have never touched a DNS response beyond requesting host name resolution. DoH makes it possible to request the information in a way familiar to far more developers.

But DoH is by no means a requirement. If you like the DNS protocol, then by all means have at it.
Great find!

The name is already totally aligned with our core values.
Very obscure and unattractive.

Have not seen the vids yet.
Is it already usable?
Anyone on there already?
Makes sense. I don't think the board ever intended Parler to be a business, but rather either a stick in the eye of contemporary culture or, as another poster put it, a data grab to identify their political constituency (see ID requirement).
He Raised $600M to Help Companies Decarbonize Their Energy Resources
After long study, my iron-clad law of biology is this: every other iron-clad law of biology ends with the phrase “well, except when ...”
I've been a heavy user of RSS for a really long time. I can't imagine a world without it, and it frustrates me that it never took off with regular people in the way it has with those in the technical world.

Initially I just used NetNewsWire -- a beloved reader for the Mac that's had an amusing development life cycle -- but I moved to Google Reader and a variety of clients when that existed. When Google killed Reader, I moved to Feedbin for a back end, and found their web interface plenty good enough for me. On my phone and iPad, I use Reeder.
if an attacker knows that the plane has two antennas, and their exact locations, he/she can generate the "correct" signals at each plane antenna with two attacker antennas and lots of math.

Getting their exact locations is simplified by the fact the location is being transmitted by ADS-B...
working and sane package manager and build tool
Incorrect. You willingly lock people up for premeditated murder even if the murder did not happen. If I hire a hit man, and they turn out to be an FBI undercover agent, I am now in jail not for committing murder but trying to commit murder.
I didn't say he broke a law, I have no knowledge on that matter, but since the SEC is all three branches of government in one I don't expect it to be fair. However they are reportedly searching reddit for hype posts. I just figure you can't be accused of a pump and dump if there's no dump. IANAL
History for Millennials. I’m sure the tone of the article could be used to take down any historical figure the author wished to.

Not a defence of the subject matter, but this kind of rambling writing style about history is poison. I don’t want my history written like a 2020 New York Times article.
Whatever problems divorce law has, marriage is a voluntary contract. You could enter into an even more lopsided business partnership, with the difference that you could actually set out penalties for breach. In most jurisdictions, if your spouse abandons you little time after your marry, you're mostly going to be returned to the status quo ante, because assets they have before you marry or that are donated to them/inherited by them do not count as common property.
More Than 108M Shots Given: Covid-19 Tracker
I think this says more about the minuscule (on Google scale) ~10TB size of the digitized library of Congress.
So... anything new with this? Has the site finally been resurrected?

I never had an account :( but always wanted to go through all the publicly listed bookmarks. The site's not really allowed that for years.

EDIT: PSA, site is experiencing hug of death, so just FWIW, it only contains a Web 1.99-styled login form.
Most certainly. You don’t land a cable in either the US or France without a classified annex to the license that provides for interconnection to their intelligence services.
Kind of amazed that my 15 year old account still works.
I know it's fashionable to hate on MBAs, but I am not entirely convinced engineers are any better equipped with skills such as: requirements gathering, scoping, presenting, project management, competitive research, financial modeling, memo writing, and strategic planning. I don't believe these are truly vacuous activities, and - loathe as I am to say - MBAs may be the best trained to do this.

(Disclosure: I do not have an MBA)
They should just go with model years
"What is the cost of doing something like this?"

Their Oregon to Japan cable, 9000km and laid in 2016, cost $300M.

https://www.computerworld.com/article/2939316/googles-60tbps...
I've been thinking about this, and the conclusion I came to is that you'll never be fully able to block fake, scammy apps. You can definitely make them less effective, though. Here's some random ideas I came up with:

* Charging $8 a week seems hard to justify in pretty much any situation. Why not enforce a max cap on app subscription fees? I assume these apps use Apple's payment system, so they can control that.

* Fake reviews are only as effective as their exposure. Assuming spoofing location is hard, for example GPS-based location is used exclusively, if Apple limited ratings and review availability based on location (put review data in a quadtree, for example) scammers would have to go through more hoops to ensure their fake reviews are effective.

** Of course, if location is based only on IP or other spoofable data this becomes much easier to circumvent.

* Keeping reviews visible only if the user regularly uses the app ensures there's an extra cost to generating fake reviews as they have to be maintained.
“Roll the Dice” by Charles Bukowski
McKinsey also implicitly involved in the whole Valeant debacle. These guys love extracting, no extorting, “value” from thin air.
There's a reason the vast majority of undersea cables have at least one end in a Five Eyes country. No need to tap it in the middle of the ocean then!
I love checking this site to see the cool stuff that makes it's way into postgres each year. Fantastic work to all the postgres committers, cheers all around.

This feature looks really cool
Python:

import math

def Circle(x, y, r):
return (lambda visitCircle, visitRectangle : visitCircle(x, y, r))

def Rectangle(x, y, w, h):
return (lambda visitCircle, visitRectangle : visitRectangle(x, y, w, h))

def area(shape):
return shape(
lambda x, y, r : math.pi * r * r,
lambda x, y, w, h : w * h
)

exampleCircle = Circle(2, 1.4, 4.5)
exampleRectangle = Rectangle(1.3, 3.1, 10.3, 7.7)

print(area(exampleCircle))
print(area(exampleRectangle))
# 63.61725123519331
# 79.31
New Apple Mixed-Reality Headset Details: Swappable Headbands, Eye-Tracking
I think that's only true if your vision and methods match those of the business.
> there is a ton of already built tooling

Diving more into postgres recently, I‘m kind of surprised there is not the kind of tooling I know from (frontend) development. I would have expected there to be a number of tools for: version control, CI/CD, (integration) testing, performance monitoring, safe migration, developing stored procedures (in vscode, with hot reload), data shuffling (snaphshots, rollbacks...). Both open source and startups, SaaS services with online dashboards etc.

There are some ok options in these categories but nothing like the explosion of open source tooling out of bigcos and devtools/SaaS startups you see elsewhere.

There‘s... aurora, prisma, some pg extensions to get performance info?
Are You Doing Good?
Reminds me of LoneStar SDF group http://sdf.org
what about ffffound ?
Getting ERR_TIMED_OUT responses (UK).