MurphyA/hacker-news huggingface dataset:
Would you believe try-catch-finally works in plain old C?
by mf_taria | 2025-05-14 22:14:50+00:00
I was digging through some of my old repositories and found a C language extension I wrote years ago. Even now, I think it’s kinda cool — and I’d love for you to check it out.

https://github.com/simpart/c-try

It recreates `try {}` / `catch {}` / `finally {}` in plain C using just macros and global variables. There's also a `$` macro to propagate errors between function calls — a bit like a mini DSL for error handling.

You can find a working example in `test.c`.

It doesn't support nesting or multithreading, and yes, it abuses macros. But hey, it's C.
by ahmedaley | 2025-05-14 22:14:59+00:00
So we have been working on a solution to this problem for the past 5 years at university. We have just released one tool for containers (not the full thing for now) and we are about to release our tools for removing bloat in shared libraries. Out paper describing one of these tools won the best paper award at MLSys yesterday! https://mlsys.org/virtual/2025/poster/3238

If there are any adopted or anyone who would like to try our tools, please reach out! We would love to support you!
by mecredis | 2025-05-14 22:15:23+00:00
Hi! Author here. I don't actually think they're deliberately doing this, hence my choice of "perverse incentives" vs. something more accusatory. The issue is that they don't have a ton of incentive to fix it.

Agree with you on all the rest, and I think writing a post like this was very much intended as a gut-check on things since the early days are hopefully the times when things can get fixed up.
by germinalphrase | 2025-05-14 22:16:14+00:00
My father was a commercial artist in the 80’s-2000’s. He was also very early on the transition of analog desktop publishing to digital graphic design. This is exactly how the ad agency guys talked about things: at first, it was great. We could double our output and revenue, but soon we were caught in a rat race to the bottom as the tools improved and the skill floor fell away.
by csallen | 2025-05-14 22:16:49+00:00
Books are not like gambling, they are gambling. you exchange dollars for chips (money — some libraries even give you digital credits for "tokens") and spend them on a book in exchange for the chance of getting something good out of it.

If you don't get something good the first time you buy a book, you might with the next book, or you might not. Either way, the house wins.

It should be regulated as gambling, because it is. There's no metaphor — the only difference from a slot machine is that books will never output cash directly, only the possibility of an insight or idea that could make money. So if you're lucky with your first gamble, you'll want to try another.

Gambling all the way down.
by deepdarkforest | 2025-05-14 22:16:53+00:00
Not sure if this can work. We played around with something similar too for computer use, but comparing embeddings to cache validate the starting position is super gray, no clear threshold. For example, the datetime on the bottom right changes. Or if it's an app with a database etc, it can change the embeddings arbitrarily. Also, you must do this in every step, because as you said, things might break at any point. I just don't see how you can reliably validate. If anything, if models are cheap, you could use another cheaper llm call to compare screenshots, or adjust the playwright/api script on the fly. We ended up writing up a quite different approach that worked surprisingly well.

There are definitely a lot of potential solutions, I'm curious where this goes. IMO an embeddings approach won't be enough. I'm more than happy to discuss what we did internally to achieve a decent rate though, the space is super promising for sure.
by germanjoey | 2025-05-14 22:17:12+00:00
TBH, the 2x-4x improvement over a naive implementation that they're bragging about sounded kinda pathetic to me! I mean, it depends greatly on the kernel itself and the target arch, but I'm also assuming that the 2x-4x number is their best case scenario. Whereas the best case for hand-optimized could be in the tens or even hundreds of X.
by lxgr | 2025-05-14 22:17:50+00:00
> Generally, authenticators are “something you have.”

Shameless plug: Here's one that is "something you know" :) https://github.com/lxgr/brainchain

It derives all keypairs from a passphrase, and rederives the private key from the key handle, similar to "stateless" hardware authenticators.

Please don't use it for anything important – it's a fundamentally bad idea, similar to "brain wallets"; I only implemented it to figure out whether it was possible, and to improve my own understanding of the WebAuthN and FIDO specifications.
by insane_dreamer | 2025-05-14 22:18:11+00:00
> China has more Rule of Law than the US right now.

Not quite. You either don't realize or are overlooking how much implementation of the law in China, at every level, depends very much on who is doing the implementation. But the US under Trump is quickly heading down the road to where I can see it being worse than China in that respect.

> China can do things because their power is working on behalf of their people, while in the west our power is working on behalf of the powerful.

I can't disagree with your criticism of the West, but your statement about China is straight from a CCP propaganda handbook.

> China executed the executives that poisoned infant formula.

That was a long time ago, and obviously those executives didn't have the necessary guanxi.

Who gets accused and is found guilty of corruption in China depends very much on who is in power. That much was obvious in how Xi cleared out the opposition from 2013-2017. Bo Xilai is a prime example.

But back to the original topic of public transportation: That's one thing China gets right that the US is totally inept at because it's built on a car culture.
by ryao | 2025-05-14 22:18:23+00:00
"Quenching isn't random" is a big change from "it doesn't happen". Quenching is random for all intents and purpose, which is why test fusion reactors have systems in place to try to detect and respond to it before very bad things happen. If they knew when it would happen, they would not need such detectors.

As for the waste, you are still going to have to pay per unit to clean it up, just like you would with waste from a nuclear fission reactor. You have far more of it since the volume being irradiated is far higher. Although it is by volume rather than by weight, a decomissioned MH-1A PWR power plant produced 89 m^3 of solid radioactive waste and 363 m^3 of liquid waste:

https://world-nuclear.org/information-library/nuclear-fuel-c...

The youtube video stated that the cleanup effort for the Joint European Torus was projected to produce 3000m^3 of waste, and the ITER reactor would be 10 times its size. Neither of them produced or will produce useful energy, yet they produced / will produce orders of magnitude more waste when it is time to decommission them than a decommissioned fission reactor did.

It also does not matter if the half lives are lower. It is still not going to be safe to be around that stuff long after both of us are dead and buried. The costs are effectively the same, since they will both be disposed in the same way.
by cogman10 | 2025-05-14 22:18:42+00:00
> By which you mean < 10× ?

Yup

> So not those Java -Xint, PHP, Ruby, Python 3 programs?

Pretty much. The Java -Xint stuff turns off the JIT and purely uses the interpreter. That's not how anyone (that I'm aware of) uses java. I had to look up exactly what that flag did.

Ruby I think might be underperforming because `yjit` isn't enabled by default. I suspect the same of Python (it just got a jit with python 3.13. Looks like it's still marked as experimental)
by JumpCrisscross | 2025-05-14 22:19:12+00:00
> what impact? Driving around looking for a space?

That. Plus desensitisation, requiring more driving in general.

> in Manhattan, they are likely to be closer, but I'd guess that impact is more per time (stuck in traffic) than per mile

Congestion charge. (And a lot of the traffic is caused by private cars. Hired cars move.)
by gjm11 | 2025-05-14 22:19:48+00:00
My understanding of the situation is that:

1. Waksman's algorithm works in any commutative ring admitting division by 2.

2. In particular, it won't work when the matrix entries are themselves matrices, which means you can't use it recursively to get an algorithm for n-by-n matrices with large n with a better exponent than you get from Strassen's algorithm.

3. The Deep Mind paper is annoyingly unexplicit about whether the algorithm it reports has that property or not.

4. What they say about tensors suggests that their algorithm can be used recursively to do better than Strassen (but, note, there are other algorithms that are substantially better for very large n which using their algorithm recursively would very much not outperform) but it's possible I've misunderstood.

5. They explicitly talk about complex-valued matrices, but I think they don't mean "complex numbers as opposed to matrices, so you can't do this recursively" but "complex numbers as opposed to real numbers, so our algorithm doesn't get you a 4x4 matmul using 48 real multiplications".

I am not certain about points 4 and 5. The language in the paper is a bit vague. There may be supporting material with more details but I haven't looked.
by sanderjd | 2025-05-14 22:19:56+00:00
A story that I think is clearly worth discussing on HN is "what seems to have happened with grok here?". Musk fiddling with the system prompt is only one of the possibilities. People here can make arguments for or against that theory or others.

But also, it's news worth discussing on a technology news discussion site if the owner of one of the largest technology platforms by reach is manipulating the information on that platform in a new way, even if there have been lots of other discussions about them manipulating things in other ways.

Notably, I think the only uninteresting threads here are the ones like this one that are questioning why this is news. Yawn.
by buibuibui | 2025-05-14 22:20:14+00:00
Hi HN! I created reaktiv, a Python library that brings reactive Signals to the backend world.

The frontend ecosystem has already embraced Signal-based reactivity (Angular, SolidJS, React) with tremendous success. It's time for Python developers to enjoy these same benefits. My breakthrough came when I stopped describing it as "Angular signals for Python" and started calling it "Excel-like computation graphs" - suddenly Python developers understood the value.

reaktiv automatically tracks dependencies between computations, only recalculating values when dependencies change. This eliminates manual dependency tracking, prevents synchronization bugs, and reduces cognitive load when managing complex state - benefits that are just as valuable on the backend as they are in UI frameworks.

I'm seeing initial interest from data scientists and believe the Home Assistant/IoT communities could benefit greatly from this approach. Python deserves the same modern reactivity patterns that have revolutionized frontend development.

Would love your thoughts on bringing Signals to the Python ecosystem!
by ars | 2025-05-14 22:20:30+00:00
Cars are only harmful in dense cities. They work just fine everywhere else. For example in small cities kids can play in the road without fear of cars. It's only in dense cities where they can not.

Dense cities are also the only places where public transit works, so it kind of balances out.

> This is just a small example.

New York city is a small example? New York city is the largest city in the US, and pretty much the ONLY city where you can do this. And the mediocre results (10% is very little) from even NYC show that this will not even come close to working anywhere else.
by listenallyall | 2025-05-14 22:20:48+00:00
Numerous politicians and advocates have suggested exempting electric vehicles from the NYC congestion pricing. Such vehicles are exempt in London. It isnt unusual for governments to start a program with one goal or purpose, then expand it (or use as a launching point) to achieve further goals, such as banning ICE vehicles.

This is currently happening with cigarettes. Banning them at workplaces and other public places is one thing. But we live in a capitalist country that celebrates individual freedom. Or do we? Beverly Hills CA and Manhattan Beach CA have both banned the sale of cigarettes entirely. Massachusetts banned all flavored cigarettes and is trying to permanently ban the sale of cigarettes to anyone a born after a certain date.

These go beyond "normalization", it is exactly slippery slope... get a small foothold then keep expanding the position.
by CrimsonCape | 2025-05-14 22:21:13+00:00
I recently started watching this lecture series on Category Theory by Bartosz Milewski and he delves into some mind-boggling existential questions in the first video.

To paraphrase, mathematicians believe that they are in "a field of discovery" with the implication of "discovery" being that mathematicians are discovering something that already exists.

He gives an example of how mathematicians believe that lambda calculus and other systems like set theory and graph theory are actually all the same thing as category theory. In a metaphoric way we have discovered the abstraction (category theory) and recognize that lambda calculus "implements the trait/interface"

The dilemma is: did we truly invent a theory of a pre-existing phenomenon? Or do we somehow map physics of the universe to a what a brain is capable of parsing?

https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbm...
by JumpCrisscross | 2025-05-14 22:21:30+00:00
> in Manhattan, they are likely to be closer, but I'd guess that impact is more per time (stuck in traffic) than per mile

I don’t want to gamble on whether I’ll hail a taxi in time to make the train. And if I’ve spent a few minutes hailing such that it’s questionable if I’ll make the train, I’ll just gun for the airport.

> I am not convinced that they are better for the environment (i.e. emissions) than private vehicle ownership

If you can get people to not own a car, ridesharing wins hands over feet. In most of America, ridesharing just decreases private miles driven. There, the environmental impact is more mixed.

> prioritizing ride hailing vehicles over mass transit (i.e. buses) on public roads will disincentivize mass transit on said roads

I think anything that makes mass transit more accessible, or which pays its bills, is good. Because the default in most of the country isn’t busses. It’s private cars. If we get self-driving cars while busses are still on a legacy model, those systems will be shut down.
by jdeibele | 2025-05-14 22:22:56+00:00
What I wanted (and still want) is a secure place to hold statements from banks for savings accounts, credit cards, etc. and brokerages.

I bank with two credit unions. Years ago, they implemented a fee of $2/month for paper statements. I get it, printing and mailing statements costs money. But it also comes to me without me having to log into an account and navigate my way to where the statement is.

I'd prefer to have them send the statement each month to an email address I specify. I get that they should take security seriously, so practically maybe that only means Gmail, Apple Mail, etc. are whitelisted.

I used to think there was a business idea here, that the banks should be willing to pay $.10/statement to save on the cost of paper. I'd be willing to use the service because the statements would automatically go to it and be retained for forever.

The reality is, I'm afraid, that the banks don't want you looking at statements because then you might find errors and dispute them and that costs the banks money.
by cryptonector | 2025-05-14 22:23:40+00:00
The U.S. used to have a vibrant private transportation industry. The cities killed it. NYC is a great example. The vast majority of the NYC subway system was constructed by _two_ private companies (!) in the 19-teens(!) in competition with each other(!!). The city regulated them and kept them from raising fares in the 20s and 30s. By the 40s the city had to rescue and acquire them because they could not survive on artificially-low fares. And until the 50s there was a vibrant trolley car and bus network between Brooklyn and Queens. Today only the city runs buses, and there is much less capacity per-capita between Brooklyn and Queens.

It's the same nationwide, roughly. There is nothing like Buenos Aires' private bus system in the U.S. because the cities don't allow it.

It didn't have to be that way. But in the U.S. the federal government has no power to nationalize, the States do but are in competition with each other so they don't do it. But the cities?

The cities can totally "nationalize" the transport industry, and they do and did all the way up until ride sharing came along to destroy the hyper-regulated taxi industry. Ride sharing grew fast enough that the cities did not have time to quash it and now they can't without incurring the ire of their citizens.

Now finally comes the ride sharing industry to -let us hope- finally destroy the cities' stranglehold on public transportation.
by SpicyLemonZest | 2025-05-14 22:25:18+00:00
ChatGPT changed that because it, along with other current advances, brought AI out of its niche and into widespread mainstream usage. The laboratory the source article covers (https://www.mayo.edu/research/labs/radiology-informatics/ove...) publishes some of the technical detail you're interested in, but in 2025 it's also interesting to people less familiar with theoretical computer science. The doctors quoted in the source article, using programs that can calculate kidney volume or detect blood clots, don't necessarily want or need to know the difference between "artificial intelligence" and "deep learning".
by cryptonector | 2025-05-14 22:26:11+00:00
In Buenos Aires the bus system is run by private companies. The buses are full, and they run way more often than the typical and pitiful once-every 20 or 30 minutes during rush hour rate that we see in the U.S.'s city run bus systems. You never have to wait long. You can buy small books with all the info you need to get from any one part of the city to any other using only buses.
by nemonemo | 2025-05-14 22:27:06+00:00
The answer says "For rings in which division by 2 is permitted". Is there the same constraint for AlphaEvolve's algorithm?

Edit2: Z_2 has characteristics 2.

Edit: AlphaEvolve claims it works over any field with characteristic 0. It appears Waksman's could be an existing work. From the AlphaEvolve paper: "For 56 years, designing an algorithm with fewer than 49 multiplications over any field with characteristic 0 was an open problem. AlphaEvolve is the first method to find an algorithm to multiply two 4 × 4 complex-valued matrices using 48 multiplications."
by jiggawatts | 2025-05-14 22:27:31+00:00
The washed out grey thing was an error that became a style!

Because HDR wasn’t natively supported on most displays and software, for a long time it was just “hacked in there” by squashing the larger dynamic range into a smaller one using a mathematical transform, usually a log function. When viewed without the inverse transform this looks horribly grey and unsaturated.

Directors and editors would see this aesthetic day in, day out, with the final color grade applied only after a long review process.

Some of them got used to it and even liking it, and now here we are: horribly washed out movies made to look like that on purpose.
by n2d4 | 2025-05-14 22:28:40+00:00
For fun, I pasted these into ChatGPT o4-mini-high and asked it for an opinion:

data + plural = datasets data - plural = datum king - crown = ruler king - princess = man king - queen = prince queen - king = woman king + queen = royalty boy + age = man man - age = boy woman - age = girl woman + age = elderly woman girl + age = woman girl + old = grandmother

The results are surprisingly good, I don't think I could've done better as a human. But keep in mind that this doesn't do embedding math like OP! Although it does show how generic LLMs can solve some tasks better than traditional NLP.

The prompt I used:

> Remember those "semantic calculators" with AI embeddings? Like "king - man + woman = queen"? Pretend you're a semantic calculator, and give me the results for the following:
by oceanplexian | 2025-05-14 22:29:20+00:00
If public transit even remotely resembled anything in China or Japan, Americans would ditch their cars in a heartbeat. But every train ride I've been on to Manhattan is like commuting through an open sewer while being harassed by strangers doing an obnoxious dance with a bluetooth speaker in my face, dodging puddles of urine, and wondering if today's the day I'll be thrown off the platform.

Of course people would rather commute in a gas guzzling SUV. I don't even know how it's controversial. It must be a form of Stockholm syndrome to think that this would be attractive to any normally adjusted human being.
by andrewmcwatters | 2025-05-14 22:29:23+00:00
Considering there's an entire portion of the software industry built on accepting a user's credentials and also prompting them for their TOTP, I don't think this really matters.

It's not an acceptable trade-off. And the answer isn't, "Those third-parties shouldn't be asking for your password and TOTP," because that's not a realistic premise.
by lesuorac | 2025-05-14 22:29:37+00:00
I think the slippery slope has long happened and also gone away.

There are a ton of roads with "turnpike" or "pike" in their name. Some cost money [1] others are free. What's the big difference between NYC's congestion pricing and the Florida Pike?

I guess you can fight congestion pricing in order to slow the spread of toll roads but it's not the beginning of a slipper slope. Usage fees are a very old concept (price discrimination by time is pretty old as well).

[1]: https://floridasturnpike.com/system-maps/
by cryptonector | 2025-05-14 22:29:44+00:00
I'm pretty sure that is just your biases talking. Where's the experience elsewhere in the world?

In Buenos Aires there are only privately-operated buses and bus routes. The city did and does build bus lanes. Idk if the bus companies pay a fee to access the bus lanes but I imagine that they must.

You have no idea how amazing the bus network is in Buenos Aires.
by reaperducer | 2025-05-14 22:30:13+00:00
Before long distance phone service was widespread, but local service was becoming common, people often sent a telegram over the phone.

Person in City A would phone the local telegraph office and dictate a message. It would be sent over the telegraph wires to the nearest telegraph office to the recipient in City B, where it would be written down by the operator. Then someone would phone the recipient and read the telegram over the phone to them.

This was in use at least into the late 1940's that I know of.
by jdeibele | 2025-05-14 22:31:00+00:00
A lot of stores in the US used to take payments for utility companies. The idea was that as long as you were there paying that, you'd be tempted to buy things from the store.

Paying by check in the mail put a huge dent in this and then having the utility automatically debit your account pretty much put an end to it from what I've seen. I'm sure there are some areas where it still is a thing but they'd also have a high number of people without bank accounts.

For a while, utilities would only debit checking accounts, presumably because ACH payments are so much cheaper than credit card ones. A few years, they opened up to credit card payments. There seem to be a lot of people who do everything on credit cards and they must have had to change with the times.
by allmathl | 2025-05-14 22:31:22+00:00
> At Pig, we built computer-use agents for automating legacy Windows applications (healthcare, lending, manufacturing, etc).

How do you justify this vs fixing the software to enable scripting? That seems both cheaper and easier to achieve and with far higher yields. Assume market rate servicing of course.

Plus; how do you force an "agent" to correct its behavior?