MurphyA/hacker-news huggingface dataset:
by phibz | 2025-04-20 06:35:59+00:00
I'm a bit surprised that they don't use the name "type state". Perhaps it wasn't in wide use when this post was originally written?

The important ideas here are that each state is moved in to the method that transitions to the next state. This way you're "giving away" your ownership of the data. This is great for preventing errors. You cannot retain access to stale state.

And by using the From trait to implement transitions, you ensure that improper transitions are impossible to represent.

It's a great pattern and has only grown in use since this was written.
by Centigonal | 2025-04-20 06:36:00+00:00
Anubis, go-away, etc are great, don't get me wrong -- but what Anubis does is impose a cost on every query. The website operator is hoping that the compute will have a rate-limiting effect on scrapers while minimally impacting the user experience. It's almost like chemotherapy, in that you're poisoning everyone in the hope that the aggressive bad actors will be more severely affected than the less aggressive good actors. Even the Anubis readme calls it a nuclear option. In practice it appears to work pretty well, which is great!

It's a half-measure because:

1. You're slowing down scrapers, not blocking them. They will still scrape your site content in violation of robots.txt.

2. Scrapers with more compute than IP proxies will not be significantly bottlenecked by this.

3. This may lead to an arms race where AI companies respond by beefing up their scraping infrastructure, necessitating more difficult PoW challenges, and so on. The end result of this hypothetical would be a more inconvenient and inefficient internet for everyone, including human users.

To be clear: I think Anubis is a great tool for website operators, and one of the best self-hostable options available today. However, it's a workaround for the core problem that we can't reliably distinguish traffic from badly behaving AI scrapers from legitimate user traffic.
by ben_w | 2025-04-20 06:40:33+00:00
In learning German as an adult, one thing I keep noticing is how a single word in one language is several in the other.

English: Times, German: Mal or Zeiten.

"Every time" is "jedes Mal", but "good times" is "gute Zeiten". "Three times four" uses "mal".

And every time a new thing gets invented, found, or imported, neologisms pop up, or words get borrowed from other cultures. In English, robins are said to have "red breasts", because the colour orange had not yet been coined when the bird needed a name, because the fruit after which the colour is named had not yet arrived.

People also argue about if "vegetarian hamburgers" is a sensible term, as if the "ham" implies meat, even though (1) the meat varieties usually use beef, and (2) it's named after the place Hamburg.

Before the development of hormonal and surgical solutions, the only thing trans people could do was change their clothes. At some point, the medical options are so capable that any given previous definition of gender becomes malleable. A womb implant is one such option.
by jwr | 2025-04-20 06:43:46+00:00
I use Claude Code. I read the discussion here, and given the criticism, proceeded to try some of the other solutions that people recommended.

After spending a couple of hours trying to get aider and plandex to run (and then with Google Gemini 2.5 pro), my conclusion is that these tools have a long way to go until they are usable. The breakage is all over the place. Sure, there is promise, but today I simply can't get them to work reasonably. And my time is expensive.

Claude Code just works. I run it (even in a slightly unsupported way, in a Docker container on my mac) and it works. It does stuff.

PS: what is it with all "modern" tools asking you to "curl somewhere.com/somescript.sh | bash". Seriously? Ship it in a docker container if you can't manage your dependencies.
by CuriouslyC | 2025-04-20 06:43:58+00:00
The human brain optimizes for efficiency, if that extra intelligence doesn't confer survival benefits it'll be lost. I can't imagine that intelligence doesn't confer survival and reproductive benefits though, it's more likely that the gradient of survival and reproduction between the most intelligent and least has shrunk. In a sense civilization is coddling the weak, and humanity is getting weaker for it.
by protocolture | 2025-04-20 06:44:50+00:00
The Corporate Family is what you are thinking of. A corporate family includes all immediate branches. Imagine a ranch with a Patriarch and 3 male kids and their wives. If your dad dies your uncles and aunts just pick up the slack. Its usual also for all branches to work the same or related trades.

Its really tertiary education and suburbia that undermined the corporate family, atomising it. The Atomic family is modern.
by ratatoskrt | 2025-04-20 06:45:35+00:00
The Guardian's article on this[1] includes a quote from an eminent colour expert at City:

> The claim left one expert bemused. “It is not a new colour,” said John Barbur, a vision scientist at City St George’s, University of London. “It’s a more saturated green that can only be produced in a subject with normal red-green chromatic mechanism when the only input comes from M cones.” The work, he said, had “limited value”.

[1] https://www.theguardian.com/science/2025/apr/18/scientists-c...
by aisenik | 2025-04-20 06:46:11+00:00
I did intend to type "Nazi era", though I find the clarification is meaningless to the point. I'm all for reclaiming words, but I am unaware of any significant efforts to reclaim and promote the word in question. It is anachronistic and inextricably connected to 20th century transphobia and violence against trans women in particular

Re: your second point, a closer reading of the comments will show that this thread is discussing "women."

e: The far more interesting discussion is whether the revival of eugenics-era language is justifiable. This is hardly the first example on this site of arrogant commentators casually reviving language that came to be understood as hateful in the 20th century.
by firesteelrain | 2025-04-20 06:47:14+00:00
I disagree that coding doesn’t have regulation. If you have never developed code in a professionally regulated industry such as Airworthiness then you haven’t been exposed yet to an area that requires rigorous process. There are regulated areas where software is regulated.

I have DIY’d an addition onto my house with professionally architected blueprints and engineering seal. During various stages, I would call the City who would send code inspection officials to incrementally sign off on my project’s progress. Other than pouring a new slab of concrete and electrical, I built it all myself to code. I followed YouTube tutorials.

My point is that DIY isn’t the issue - lack of oversight is. With standards, expert input, and review processes, even non-experts can safely build. AI-assisted coding needs the same approach.
by protocolture | 2025-04-20 06:47:20+00:00
You seem to have a definition of nuclear family which differs from the consensus.

>throughout most of human history, people grew up with their mother, father, and siblings being the most important people in their lives.

Throughout most of history people grew up with their mother, 3 aunts, their dad, 5 uncles, and grandparents if they are lucky, learning the single trade of their entire family. The "Nuclear" family is the atomisation of this corporate family through modern practices (Finance, Tertiary Education, Suburbia)
by borski | 2025-04-20 06:47:36+00:00
Because that is not what they said. Their comment was “Apparently hacking is something the denizens of Hacker News disapprove of these days?”

Hacking, by one common definition, generally refers to a clever, benign, and "ethical" prank or practical joke, often challenging to execute and amusing to the community. This was certainly true at MIT.

This fits all of those characteristics. That it happened to involve doing something illegal was not the point.

Putting something on the MIT dome is also illegal; if you get caught, you’ll get charged with trespassing. But trespassing was never the point.
by eviks | 2025-04-20 06:47:59+00:00
> did send a specific wavelength to your retina, but that wasn't violet.

It was, by definition

> Color is not a property of wavelength.

Sure, it's a label

> There's nothing special about photons wiggling in the 380 to 750nm range.

There is - they activate different receptors your brain relies on, hence leading to a distinct (from other wavelengths) sensation
by laurent_du | 2025-04-20 06:48:44+00:00
Very poor take. The author clearly has very limited experience with raising kids. Most kids won't do difficult things if you don't push them. Playing music, learning to spell correctly, doing mathematics, and so on. A very small minority of kids will do all of that easily and for the fun, but you can't rely on it. If you don't push your kid to do their 20 minutes of piano every day, they will half-ass it and will stop after 1 year and conclude they are not good at music. Same for sport. Same for reading books. Same for maths. And you know what? It's your fault. You chose to be lazy and complacent and didn't push them because it's hard to be a good parent. And now you expect me to validate your laziness? Nah.
by borski | 2025-04-20 06:49:14+00:00
That is not what I did. I provided multiple examples of how they left various accessibility features intact. In fact, I have not found one they hadn’t left intact.

Have you? If so, that would be a useful argument, and I would not respond in the same way.

Thus far, I have provided some semblance of evidence, and you have provided speculation, which is a bad argument.

I’m not saying I’m right. I might not be. I am saying your argument is not.
by DrSiemer | 2025-04-20 06:51:22+00:00
A valid point of criticism, but I do wonder if this only applies to those who can (still) easily spot LLM assisted output.

Many people lack the time or writing skills to produce something elegant by themselves, so for them it's like fake breasts: an upgrade for the less discerning larger part of the target audience, as long as they don't look to closely.
by __MatrixMan__ | 2025-04-20 06:52:45+00:00
That's a silly definition, even if somebody with a lot of money wrote it. Organizations can do more than individuals for the same reason that an M4 can do more than a Pentium 4--it's a difference in degree.

Generality is about differences in kind. Like how my drill press can do things that an M4 can't. How could you ever know that your kinds of intelligence are all of them?
by int_19h | 2025-04-20 06:53:14+00:00
But they aren't better represented unless everyone else does the same.

Suppose California were to do it, resulting in a proportional allocation of seats in the House for its delegation. If this causes the House to swing from Democratic majority to Republican majority, the net effect is the opposite of what most Californians wanted.

Don't get me wrong, I get the point that it is a more fair and equitable way of doing things, and in principle, I agree. But if you play fair at a table where everybody else cheats, you lose. My state (WA) also has referendums, and if such a proposal would come up, I would absolutely vote against it - unless it was some kind of interstate compact where another similarly-sized red state were to implement the same reform at the same time.
Show HN: FlipClock – fullscreen flip clock with alarms, Pomodoro, timer
by artiomyak | 2025-04-20 06:54:30+00:00
I’m a CS student who enjoys building distraction‑free tools. I wanted a screen‑filling, old‑school flip clock that could also handle everyday timing needs, so I built FlipClock – https://aflipclock.com.

What it does

Alarms that ring even if the tab’s in the background (Service Worker + Web Audio)

Pomodoro sessions with automatic breaks

Countdown timer and lap‑enabled stopwatch

Works offline and is installable as a PWA

Dark/light themes, 12 / 24‑hour toggle, mobile vibration feedback

Totally free, no ads or tracking
by bigfatkitten | 2025-04-20 06:55:20+00:00
Same ballpark build time and cost for a fire truck in Australia or New Zealand.

A bushfire tanker is a bit cheaper, an urban pumper costs a bit more. All based on off the shelf^ European or Japanese truck chassis.

The lead time from order to delivery is more like 18 months, but 6 weeks is pretty typical for the actual build time.

^ Not quite “off the shelf” in that commercial trucks tend to be built to order, crew cabs especially, but they’re not entirely bespoke beasts like North American appliances.
by dbdr | 2025-04-20 06:55:43+00:00
That's fantastic, well done!

Is the "Controlled Neovim Terminal" supposed to be some bot you are competing with? At first it confused me. Personally I think the first contact with the game would be much more intuitive without it (it can always be introduced later, e.g. if you plan competitions with other humans on randomly generated levels).

There are only two levels now, right? As I equaled both top scores (possibly optimal?)... when more? ;)
by joshka | 2025-04-20 06:58:11+00:00
I prefer giving the transitions explicit names over relying on the From implemenations defined on the machine (defining them on the states still prevents bad transitions). The raft example drops a bunch of syntactic noise and repetition this way:

https://play.rust-lang.org/?version=stable&mode=debug&editio...

fn main() { let is_follower = Raft::new(/* ... */); // Raft typically comes in groups of 3, 5, or 7. Just 1 for us. :) // Simulate this node timing out first. let is_candidate = is_follower.on_timeout(); // It wins! How unexpected. let is_leader = is_candidate.on_wins_vote(); // Then it fails and rejoins later, becoming a Follower again. let is_follower_again = is_leader.on_disconnected(); // And goes up for election... let is_candidate_again = is_follower_again.on_timeout(); // But this time it fails! let is_follower_another_time = is_candidate_again.on_lose_vote(); } // This is our state machine. struct Raft<S> { // ... Shared Values state: S } // The three cluster states a Raft node can be in // If the node is the Leader of the cluster services requests and replicates its state. struct Leader { // ... Specific State Values } // If it is a Candidate it is attempting to become a leader due to timeout or initialization. struct Candidate { // ... Specific State Values } // Otherwise the node is a follower and is replicating state it receives. struct Follower { // ... Specific State Values } impl<S> Raft<S> { fn transition<T: From<S>>(self) -> Raft<T> { let state = self.state.into(); // ... Logic prior to transition Raft { // ... attr: val.attr state, } } } // Raft starts in the Follower state impl Raft<Follower> { fn new(/* ... */) -> Self { // ... Raft { // ... state: Follower { /* ... */ } } } // When a follower timeout triggers it begins to campaign fn on_timeout(self) -> Raft<Candidate> { self.transition() } } impl Raft<Candidate> { // If it doesn't receive a majority of votes it loses and becomes a follower again. fn on_lose_vote(self) -> Raft<Follower> { self.transition() } // If it wins it becomes the leader. fn on_wins_vote(self) -> Raft<Leader> { self.transition() } } impl Raft<Leader> { // If the leader becomes disconnected it may rejoin to discover it is no longer leader fn on_disconnected(self) -> Raft<Follower> { self.transition() } } // The following are the defined transitions between states. // When a follower timeout triggers it begins to campaign impl From<Follower> for Candidate { fn from(state: Follower) -> Self { Candidate { /* ... */ } } } // If it doesn't receive a majority of votes it loses and becomes a follower again. impl From<Candidate> for Follower { fn from(state: Candidate) -> Self { Follower { /* ... */ } } } // If it wins it becomes the leader. impl From<Candidate> for Leader { fn from(val: Candidate) -> Self { Leader { /* ... */ } } } // If the leader becomes disconnected it may rejoin to discover it is no longer leader impl From<Leader> for Follower { fn from(val: Leader) -> Self { Follower { /* ... */ } } }
by lukan | 2025-04-20 06:59:26+00:00
Different point of view: do you consider hunting in the wilderness to be difficult?

I do, it requires being still in miserable conditions for a long time, being cold, wet, mosquitos, and then usually still no success, but frustration.

But to my knowledge, no savage kid is in need of being forced to learn it.

"children sense your true passions and naturally want to join in"

And that is my experience as well. But if you stop childrens curiosity out of limited time and patience "Be quite now!" - stop them from helping, because they are not a help in the beginning and you are faster on your own - then of course they won't just start enthusiastically some years later doing with motivation whatever it is, you define as their arbitary target now.
by Animats | 2025-04-20 07:03:11+00:00
Basically, because a modern game console and TV has equally good graphics.

Sony is fooling around with location-based entertainment again.[1] Might work. There are some one-offs in Dubai and China. But nothing seems to scale.

The Void [2] did some nice location-based VR systems around 2018. A group of people in VR goggles are in a big room, and can move around. The tracking system keeps the virtual and real worlds in sync. There are props you see in VR and touch in the real world. Seems to be inactive now.

Disney tried that Star Wars themed hotel experience LARP. Cost more than a cruise on a real ship. Had to be dumbed down to theme park customer level. Huge flop.

The military has the best immmersive themed experiences. The US Navy has Battle Stations 21, with a convincingly real looking full sized ship in a big building near Chicago.[3] It's the final exam for new recruits, with fires to fight and flooding to plug.

[1] https://www.youtube.com/watch?v=fLnxV8w1Fq8

[2] https://www.thevoid.com/

[3] https://www.youtube.com/watch?v=7vAkqLY0uvU
by joshka | 2025-04-20 07:05:06+00:00
There's definitely a missing part of this which talks about when to use this sort of approach. The answer is often when there's non trivial amounts of stuff that happens between the end of one method and the start of the next which is in control of the external system. That said, I often argue that async/await solves the majority of that problem by implicit modeling of the state machine while keeping the code readable.
by esseph | 2025-04-20 07:05:35+00:00
You cannot have a government with a high interest and stake in national security without bringing up all of those 16 identified "critical infrastructure sectors" with you.

CVEs are almost a starting point of truth. The threats can be verified, tested against/for, etc.

They're also tied up in insurance liabilities.

If there are no CVEs, there will be no cyber security insurance.

Follow the rabbit hole.
by pndy | 2025-04-20 07:05:50+00:00
I've got 4861 (top 2% ~3 years off)

If someone likes additional challenge then Teuteuf Games' WhenTaken has both guessing the year and location: https://teuteuf.fr/

They also got Worldle which was covered on hn - https://news.ycombinator.com/item?id=30367906
by seanhunter | 2025-04-20 07:06:46+00:00
I know what you mean, but as a sibling pointed out for everyone else's benefit, parent is using the word inverse where they mean reciprocal.

The inverse of cosine is arccosine (sometimes written acos or cos^{-1}). Secant is the reciprocal of cos ie sec x = 1/cos(x)).

Likewise cotan is the reciprocal of tan (1/tan). The inverse of tan is atan/arctan/tan^{-1}.

This is confusing for a lot of people because if you write x^{-1} that means 1/x. If you write f^{-1} and f is a function, then _generally_ it means the inverse of f. In the case of trig functions this is doubly confusing because people write sin^2 theta meaning (sin theta)^2 but sin^-1 theta means arcsin theta.

That's why in my maths studies they started by teaching you to do the inverse with a -1 so when you see it you don't get confused but changed to preferring arcsin etc as this is unambiguous and if you learn to write this way you won't confuse others.
by foundart | 2025-04-20 07:12:03+00:00
A very interesting dive into, as the title says, the computational complexity of air travel planning. Graph algorithms with lots of complexity added due to the wide variety of fare conditions that airlines have dreamt up over the years.

The article may be from 2003 but I would call it an evergreen. While I imagine some of the details have changed since then, I suspect that the complexity has only grown since then.
by cue_the_strings | 2025-04-20 07:12:08+00:00
Nope, the issue is still there, and not just for Postgres. You need `hvac` to use Hashicorp Vault-related stuff, for example.

There's a decent workaround, though, if you don't mind managing your Ansible install with `pipx` instead of your system package manager:

$ pipx install ansible --include-deps $ pipx inject ansible psycopg2-binary --include-apps

I'd prefer to use `uv tool install` instead of `pipx`, but it's not there yet [1].

You can also containerize it w/ Podman or Docker and install the deps in the container. Maybe even add an alias.

[1]: https://github.com/astral-sh/uv/issues/6314
by dspillett | 2025-04-20 07:14:25+00:00
> So there is a (IMHO) shady market out there that gives app developers on iOS, Android, MacOS and Windows money for including a library into their apps that sells users network bandwidth.

This is yet another reason why we need to be wary of popular apps, add-ons, extensions, and so forth changing hands, by legitimate sale or more nefarious methods. Initially innocent utilities can be quickly coopted into being parts of this sort of scheme.
by chneu | 2025-04-20 07:16:11+00:00
It's not. Everytime there's a new form of media or communication there's an uptick in "bad actors". Think yellow journalism or any of the moral panics around TV programming. Even back when the printing press was invented there was an uptick in troll behavior. One of the Green brothers posited that martin Luther was really just a pamphlet troll.

With social media and the Internet, stupid just got louder. I don't think people got stupid.
by card_zero | 2025-04-20 07:16:19+00:00
Why not say it, though? There's only us here capable of doing any supposing. Why would we say "it's supposed to be nice for cyanobacteria"? Which of course isn't even an option under consideration, only the pre-industrial levels thing is considered, never pre-photosynthesis levels. (Won't somebody think of the archaea?) Why this bias? Because humans like a certain kind of environment with trees and megafauna, that's why. It's a park.
by michalsustr | 2025-04-20 07:16:21+00:00
Well this is timely :) I’m in the middle of writing a library, based on rust-fsm crate, that adds nice support for Mealy automata, with extensions like

- transition handlers

- guards

- clocks

- composition of automata into a system.

The idea is to allow write tooling that will export the automata into UPPAAL and allow for model checking. This way you don’t need to make too much additional effort to ensure your model and implementation match/are up to date, you can run the checker during CI tests to ensure you don’t have code that deadlocks/ some states are always reachable etc.

I plan to post a link here to HN once finished.