MurphyA/hacker-news huggingface dataset:
by tzs | 2025-12-12 00:24:01+00:00
Selection sort is arguably the easiest sort, and arguably the easiest to see that it is correct. Given an array a with n elements A[0], A[1], ..., A[n-1], let the notation A[x:y] mean the set {A[x], A[x+1], ..., A[y]}.

for i = 0 to n-1 find an index j in A of the smallest member of A[i:n-1] swap A[i] with A[j]

I think that selection sort is easy to understand and easier to see that it is correct because it can be separated into a two array version. Given input array A and an empty array B, do this:

while A is not empty find a smallest element of A append that to B

The in place version earlier is essentially that, just storing B and A together in one array.

That is something most non-programmers could easily come up with for physical sorting. For instance you have a row of books on a shelf that are in random order, and you want to move them to another shelf and have them sorted by author's last name.

1. Scan the first row to find the book that should come before all the rest on that row.

2. Move it to the end of the books on the second row.

3. Repeat until all the books have been moved.

Selection sort is in a sense just a computer implementation of a procedure that ordinary people have a good chance of coming up with when they need to sort physical items.

Selection sort performs better than bubble sort on random data. They are both O(n^2) but selection sort will perform fewer writes.

If you deal with data that is mostly already sorted though then bubble sort with early stopping is O(n) and wins.

With bubble sort I can't think of a two array version that makes it easier to understand. I also don't think many ordinary people would come up with bubble sort when sorting say their bookshelf.

There's also insertion sort. The two array version would be

while A is not empty take the first element of A insert that into B keeping B sorted

In bookshelf form

1. Pick a book from the first row.

2. Find where that belongs in alphabetical order in the second row and put it there.

3. Repeat until you run out of books on the first row.

I think this is what most ordinary people who don't come up with selection sort would come up with.

The two array form can be converted to in place the same as selection sort.

Insertion sort is, like the others O(n^2). Like selection sort it is faster than bubble sort on random data. Unlike selection sort whose runtime is about the same no matter how the data is ordered, it is fast on almost sorted data.

Here's all three (bubble, selection, insertion) illustrated by folk dancers:

https://www.youtube.com/watch?v=Iv3vgjM8Pv4

https://www.youtube.com/watch?v=hFhf9djnM5A

https://www.youtube.com/watch?v=QdQmAdyfmDI
by smallnix | 2025-12-12 00:24:17+00:00
> Acronyms are abbreviations for meaningful names.

I think often words are added to allow for a memorable name, such as crispr

> When Mojica and Jansen struck up a correspondence, they began tossing around catchy names for the patterns, and on Nov. 21, 2001, they settled on CRISPR—an acronym for Clustered Regularly Interspaced Short Palindromic Repeats.

https://nautil.us/the-unbearable-weirdness-of-crispr-236685/
by ryan_lane | 2025-12-12 00:24:18+00:00
It's a bad point though, because those are fringe and don't have network effects that would pressure most children to join them. You become a social outcast if you don't participate in <popular social media of the day>, but the kids participating on fringe sites are likely already outcasts.

We should be aiming to remove purposely addictive things from our children's lives, and all currently popular social media platforms are addiction machines.
by jasonfarnon | 2025-12-12 00:24:42+00:00
"The problems I mentioned aren't real, that's the point."

Can you possibly think that determining what is and is not a valid problem isn't a subjective evaluation?

Even looking at your examples, which are not chosen well for your argument. In each of these you're just shifting the burden of proof to reflect what your values. "No one has proven counter strike causes violent behavior, consuming porn makes people rapists or people can become gay." All wide-open empirical questions. Maybe none of these gets resolved in the near future; they aren't even well-formed questions. Meanwhile parents, governments, policy-makers need to make decisions. If you are very concerned about your kid being violent, you will avoid videogames even as a precautionary measure.

"The fact that some organizations (particularly religious) "

Ah you found an even easier way to resolve the issue, just ignore religious values.
by pksebben | 2025-12-12 00:25:13+00:00
the more I think about it, the more I feel like I need someone with deep knowledge to explain ZKPs to me.

So like, we've got this algorithm that gets sent our way and we run it and that provides kind of a cryptographic hash or whatever. But if we're running the algorithm ourselves what's to stop us from lying? Where does the 'proof' come from? What's the check that it's running and why do we inherently trust the source it's checking?
by marksomnian | 2025-12-12 00:25:35+00:00
Meta don’t use RSC: https://bsky.app/profile/en-js.bsky.social/post/3lmvwmr5rfs2...

> We are not using RSC at Meta yet, bc of limits of our packaging infra (it’s great at different things) and because Relay+GraphQL gives us many of the same benefits as RSCs. But we are fans and users of server driven UI and incrementally working toward RSC.

(as of April 2025)
by w_for_wumbo | 2025-12-12 00:26:10+00:00
If we as humans take full responsibility for the world we inhabit. It's really clear that we live inside of systems that we both control and feel that we don't. Exploitation of children is (as strange as it sounds) a design issue. We've designed systems that encourage and rationalize the exploitation of children as a feature of fear.

The encouraging part is that we are in control and it's easier to navigate with a system than to resist it, so the question becomes.

- How do we modify the incentives that are already in place to not result in the exploitation of children?

Because people generally make decisions for their best interest, we're in a dangerous situation where the incentives are for child exploitation.

An example would be: I need to feed my family I need to work to live I need to appease my boss to continue to work The boss has goals to meet We need to perform these actions to meet the goals There isn't time or space to consider the full consequences of this action When the impact to children is not considered by a change to a system, they inevitably reap the consequences of living in a system that never considered their welfare.

The children that grew up feeling out of control, and in a system not designed for them then seek to control the very system that formed them - not knowing that they're replicating the same harm that got them there.

This is a design cycle as I see it, if we don't look at it and understand it - then we will continue feeling powerless - while holding the reigns of our future in our hands.

I believe so much in the power of humanity - so I share this not with the idea that I have the answers, but that I am part of the collective that does.
by jrm4 | 2025-12-12 00:26:43+00:00
While we're here, let me go ahead and once again give much praise to https://zim-wiki.org , my daily driver for most things in my life.

It was really interesting to see the sort of "second stage" discovery of things like this when obsidian got hot, and I toyed with many of those for a while.

And the end result was me getting even further back into doing what zim does, and even finding new cool little time savers (e.g. interwiki links).
by accrual | 2025-12-12 00:26:49+00:00
What are some examples of names that Windows does better than macOS and vice versa?

I've always though iOS naming was pretty logical - Calculator, Notes, Messages, Mail, Health, Clock, Calendar, Photos, Contacts, Maps, Settings. They're all named as if they're the reference implementation and everything else is 3rd party.

Under Windows we have Notepad, Paint, Terminal / Command Prompt. Word and Excel are likely household names so it's tough to ask a random person who's never heard of them to describe their purpose. But they did have "Clipchamp" which was a pretty dumb program IMO.

Here's a potential reference for Windows app naming conventions in modern Windows: https://windows-11.fandom.com/wiki/List_of_apps
by Cyph0n | 2025-12-12 00:27:25+00:00
I understand we won’t come to an agreement here, but I wanted to respond to two of your points:

1. Re: the term genocide, do you know why Palestinians have been insisting on this specific word to be used? Because genocidal intent was clearly communicated from virtually day 1, and was backed by actions to prove this intent. Cabinet members were calling Palestinians “human animals” and “amalek” for God’s sake - and that’s not even close to the worst of it! Palestinians didn’t just wake up one day and say “well, it’s arbitrarily a genocide, and we want everyone to call it that”. And South Africa rightfully pursued a case at the ICJ. Firstly, because they recognized the shared suffering from their experience with apartheid, but most importantly, because they saw that there was a mountain of incontrovertible legal evidence to support their case.

1. Re: Ukraine, you simply cannot make that argument in good faith. Russia’s goals in Ukraine are in direct opposition to Israel’s goals in Gaza and the West Bank.

Russia ultimately wants to annex Ukraine to expand its influence and reinstate its past glory with the USSR. This requires that it absorb Ukrainians into Russia proper. Russia uses the shared culture and language as a justification in its propaganda, but I think there is a kernel of truth there when it comes to Russia’s motivations, particularly in eastern Ukraine. Given all this, genocide is a non-starter for Russia - how can you claim annexation when you are also working to genocide the local population?

On the other hand, Israel wants to cleanse the land of its people - in fact, the absolute last thing it wants to do is absorb Palestinians into Israel proper. From day 1, its intentions were crystal clear: Palestinians as a racial/ethnic group cannot remain in Gaza. They used all tools at their disposal in pursuit of this goal, including mass starvation, collective punishment, mass bombardment, forced relocation, and so on. Taken together with the statements made by top gov officials, this constitutes genocide.

This is all setting aside that Ukraine is a fully sovereign nation with an equipped and supported conventional military fighting a conventional war against a nation state aggressor.
by forrestthewoods | 2025-12-12 00:28:54+00:00
Believe you me I wish every website worked on 2G. HN is great at least.

For consoles total disk space is an even bigger constraint than download size. But file size is a factor. Call of Duty is known to be egregious. It’s a much more complex problem than most people realize. Although hopefully not as trivial a fix as Helldivers!

In any case HN has a broadly dismissive attitude towards gamedevs. It is irksome. And deeply misplaced. YMMV.
by al_borland | 2025-12-12 00:29:37+00:00
I had an iPhone day 1 in 2007, and my typing on that day was better than it is today.

Once they added the suggestion bar above the keyboard things got noticeably worse. Every time they try to fix it they make it even worse than before.

With the current version, it’s not just the issue in the video I see as an issue. The two big problems I have are 1) repeated words, where I will type a word once, but auto-completion will inject another one. 2) The autocorrect will seemingly look at the whole paragraph I’m typing and change random words I typed several lines up and deemed correct. I will catch it doing this in real time, and sometimes it will flip a word back and forth repeatedly. I find I don’t just need to proofread while I’m typing, but also need to go through and re-read everything. It wasn’t always like this.

Maybe it’s my rose colored glasses, but I often think the iPhone peaked with the 4S.
by holtkam2 | 2025-12-12 00:30:42+00:00
I know I sound like a snob but I’ve had many moments with Gen AI tools over the years that made me wonder: I wonder what these tools are like for someone who doesn’t know how LLMs work under the hood? It’s probably completely bizarre? Apps like Cursor or ChatGPT would be incomprehensible to me as a user, I feel.
by throwaway2037 | 2025-12-12 00:31:13+00:00
I agree with your sentiment. Work in France sounds like hell -- not for the work-life balance, but for the compensation model. Sorry to all of the French readers here. (You may feel similar to the United States or other places.) In these countries were the labour laws are extremely in favour of the worker (France, Germany, Italy, etc.), the pay for technologists is generally awful and there is very little upside. If you work really hard, you barely get paid more. That would so demotivating to me.

About this part:

> Number of public holidays.

I Googled USA vs France. Both have 11 national holidays per year. Did you mean to write something else?
by richardfeynman | 2025-12-12 00:31:29+00:00
@Cyph0n, if you think Israel's approach led to too much collateral damage, why don't you propose a solution that would have led to less collateral damage while still taking the Hezbollah leaders out of action?

I bet you won't do this, because I think we can ultimately agree it wasn't possible for Israel to take all these men out of action simultaneously and minimize collateral damage much beyond what it did.

I think where we disagree is that you think Israel should not have taken these men out of action.
by MatteoFrigo | 2025-12-12 00:31:29+00:00
Excellent question. More generally, what prevents me from copying the credential and giving it to somebody else?

The currently favored approach works like this. The DOCUMENT contains a device public key DPK. The corresponding secret key is stored in some secure hardware on the phone, designed so that I (or malware or whatever) cannot extract the secret key from the secure hardware. Think of it as a yubikey or something, but embedded in the phone. Every presentation flow will demand that the secure element produce a signature of a random challenge from the RP under the secret key of the secure hardware. In the ZKP presentation, the ZKP prover produces a proof that this signature verifies correctly, without disclosing the secret key of the secure hardware.

In your example, the parent could give the phone to the kid. However, in current incarnations, the secure hardware refuses to generate a signature unless unlocked by some kind of biometric identification, e.g. fingerprint. The fingerprint never leaves the secure hardware.

How does the issuer (e.g. the republic of France) know that DOCUMENT is bound to a given fingerprint? This is still under discussion, but as a first bid, a French citizen goes to city hall with his phone and obtains DOCUMENT after producing a fingerprint on the citizen's phone (as opposed to a device belonging to the republic of France). You can imagine other mechanisms based on physical tokens (yubikeys or embedded chips in credit cards, or whatever). Other proposals involve taking pictures compared against a picture stored in DOCUMENT. As always, one needs to be clear about the threat model.

In all these proposals the biometric identification unlocks the secure hardware into signing a nonce. The biometrics themselves are not part of the proof and are not sent to the relying party or to the issuer.
by layer8 | 2025-12-12 00:31:50+00:00
I agree with the sentiment, though the argument could be made better. It’s not really about good names being descriptive, nor about memorable mnemonics. It’s that modern naming styles tend to overload random English words for no good reason, but just to be cute (which I don’t consider a good reason) or to be evocative of something which it isn’t. One issue with that is that you might have very different connotations evoked by the word, that clashes with the software. And conversely, if you have to use the software regularly, it now encroaches into the semantic space of what you otherwise associate with the word. I’d like my software, and hence its name, to be its own thing, thank you very much.
by gnabgib | 2025-12-12 00:31:59+00:00
Small discussion (78 points, 3 days ago, 12 comments) https://news.ycombinator.com/item?id=46199649

Smaller (31 points, 2 days ago, 2 comments) https://news.ycombinator.com/item?id=46210304

Related: Service members deserve the right to repair (131 points, 4 months ago, 77 comments) https://news.ycombinator.com/item?id=45054037
by yndoendo | 2025-12-12 00:32:35+00:00
Had a WPF touch interface application that would latch on when a person; presses, holds, and slides their finger off the screen. Highly unacceptable when it controls a machine that could remove a limb.

Only fix was to write a custom touch screen event handler that overrides the built in one by Microsoft.

I would love to have a _proper method_ and pull out my _hacky_ method that prevents the removal of a person's limb.
by ineptech | 2025-12-12 00:32:49+00:00
The lede IMO is near the end:

> The federal government responded to the 2008 crisis by limiting the ability of traditional banks to take on big, risky loans. Since then, however, private-equity firms, which aren’t subject to the same regulatory scrutiny as banks, have gotten more heavily into the lending business. As of early this year, these firms had lent about $450 billion in so-called private credit to the tech sector, including financing several of the deals discussed above. And, according to one estimate, they will lend it another $800 billion over the next two years. “If the AI bubble goes bust, they are the ones that will be left holding the bag,” Arun told me.

> A private-credit bust is almost certainly preferable to a banking bust. Unlike banks, private-equity firms don’t have ordinary depositors. In theory, if their loans fail, the groups that will be hurt the most are institutional investors, such as pension funds, university endowments, and hedge funds, limiting the damage to the broader economy. The problem is that nobody knows for certain that this is the case. Private credit is functionally a black box. Unlike banks, these entities don’t have to disclose who they are getting their money from, how much they’re lending, how much capital they’re holding, and how their loans are performing. This makes it impossible for regulators to know what risks exist in the system or how tied they are to the real economy.

> Evidence is growing that the links between private credit and the rest of the financial system are stronger than once believed. Careful studies from the Federal Reserve estimate that up to a quarter of bank loans to nonbank financial institutions are now made to private-credit firms (up from just 1 percent in 2013) and that major life-insurance companies have nearly $1 trillion tied up in private credit. These connections raise the prospect that a big AI crash could lead to a wave of private-credit failures, which could in turn bring down major banks and insurers, Natasha Sarin, a Yale Law School professor who specializes in financial regulation, told me. “Unfortunately, it usually isn’t until after a crisis that we realize just how interconnected the different parts of the financial system were all along,” she said.

A lot of people lost money when YHOO tanked in 2000, but the money they lost generally hadn't been lent to them by a bank, which is why 2000 was a tech crash and not a finance crash. I generally think of private equity as a rich guy gambling with a wealthy guy's money, but to the extent that the last ten years of growth have made private equity seem safe enough for banks and pensions to invest in, a correction caused by AI companies failing seems a lot scarier.
by amluto | 2025-12-12 00:33:22+00:00
Service can’t do anything about the state machine being wrong.

The Rivian app does not permit you to send a command to the car while the app thinks the car is processing a command. Trunk opening? You can’t unlock the door. On top of this, if you try to open the trunk while outside Bluetooth range and then Bluetooth connects, you are still stuck waiting for the pending command to complete.

Oh, and the ridiculous “hey let’s always remind you that you own a Rivian” Live Activity seems to synchronize on a schedule that involves being hours and hours out of date.

The Rivian app sucks.
by Yokohiii | 2025-12-12 00:33:53+00:00
Well I guess I am not clear enough. Naming stuff is a normal human habit, maybe even why we have language? So we can agree on that, it's helpful. But you say it yourself, a thing is called different in another language, so the thing is bigger then the word. But everyone can handle it better in his own head and in communication with a word for it. I guess my usual grief is that any kind of excessive celebration and ceremony comes down to some kind of brainwash. Which mostly affects newbies and cultists. The article for example isn't overtly critical on singletons, while past design pattern writings often heavily disregarded the use of it. So we don't just always reiterate the good, but also the bad.
EU Healthcare Startups Cannot Legally Use OpenAI API Despite Saying They Can
by naticasta | 2025-12-12 00:34:18+00:00
OpenAI's documentation advertises EU data residency as an available feature. For healthcare companies in the EU, this is legally required under GDPR. Without it, there's no compliant way to use their API.

I run a healthcare startup in the EU.

After months of trying to enable this advertised feature, OpenAI's response was: "The setup you've described isn't available for organisations of your current size."

That's it. No pricing tier to upgrade to. No enterprise minimum specified. Just a refusal.

OpenAI effectively does not sell to EU healthcare startups. The feature exists and is documented as available, but they only provide it to large enterprises. If you're a startup building healthcare technology in Europe, OpenAI will not serve you, despite their docs saying otherwise.

This isn't about one company. This is a policy that blocks an entire category of healthcare innovation in the EU while maintaining documentation that suggests the service is available.

Can anyone from OpenAI clarify what "size" threshold is actually required to purchase your advertised EU data residency feature?
by ProllyInfamous | 2025-12-12 00:35:21+00:00
I coincidentally read Kurt Vonnegut's first novel, Player Piano, during my first few weeks exploring ChatGPT (~January 2023~). The book explores the rebellion of automated factory workers, drawing inspiration from Vonnegut's own mid-20th-Century experiences working at a GE manufacturing facility.

That was a Cassandra-like experience.

If anybody has never read Vonnegut, I'd definitely recommend Piano over Thieme's Mindgames.

----

I'm currently halfway through Neal Shusterman's Scythe Trilogy, which he published right before LLMs became reality. A ficticious global AI entity, known collectively as "Thunderhead," begins each chapter with its own all-knowing passage about how it perceives humanity's progression.

It's really quite creepy reading, with many of Shusterman's ficticious Thunderhead passages having already proven possible (particularly: characters maintaining friendships with chatty Thunderhead; ability to know something about everything; hallucinations; government by uncodified code; ability to lie, either intentionally or by human deception).

Really exciting storytelling, and I foresee many more of its future non-predictions becoming foreseeable future.