frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Tell HN: Claude is down (auth only?)

2•AznHisoka•1m ago•0 comments

Women live longer than men – scientists might finally know why

https://www.popularmechanics.com/science/a68805403/women-live-longer-than-men/
1•binning•2m ago•0 comments

How to nail the AERO look on your website

https://frutigeraeroarchive.org/blog/posts/23_07_2025
1•Mr_Minderbinder•2m ago•0 comments

US anti-fascism expert blocked from flying to Spain at airport

https://www.theguardian.com/us-news/2025/oct/09/anti-fascism-mark-bray-rutgers-university
3•perihelions•4m ago•0 comments

Future Data Systems Seminar Series – Fall 2025

https://db.cs.cmu.edu/seminars/fall2025/
1•sebg•5m ago•0 comments

The Prime Minister who tried to have a life outside the office

https://www.newyorker.com/magazine/2025/10/13/the-prime-minister-who-tried-to-have-a-life-outside...
1•binning•5m ago•0 comments

Show HN: Evals pass, agents fail." A/B test agents with Raindrop Experiments

https://twitter.com/benhylak/status/1976392820614439315
1•alexisgauba•6m ago•0 comments

Sub-agents in Claude Code: I tried them

https://boliv.substack.com/p/claude-code-usage-patterns-3-sub
1•brunooliv•7m ago•0 comments

Azure Portal Outage

https://azure.status.microsoft/en-us/status
2•tatersolid•8m ago•1 comments

German conservatives block Chat Control

https://bsky.app/profile/markus.reuter.netzpolitik.org/post/3m2metni3zs2u
1•jech•9m ago•2 comments

Central bank says what the Federal Reserve won't

https://www.axios.com/2025/10/09/ai-bubble-federal-reserve
1•zerosizedweasle•9m ago•0 comments

AI models that lie, cheat and plot murder: how dangerous are LLMs really?

https://www.nature.com/articles/d41586-025-03222-1
1•pykello•12m ago•0 comments

New York AG James, a Trump foe, indicted for bank

https://www.reuters.com/world/new-york-ag-james-trump-foe-indicted-bank-fraud-2025-10-09/
2•zerosizedweasle•12m ago•0 comments

All in on MatMul? Don't Put All Your Tensors in One Basket

https://www.sigarch.org/dont-put-all-your-tensors-in-one-basket-hardware-lottery/
1•sebg•14m ago•0 comments

Show HN: Browser extension to analyze my son's Math Academy data

https://github.com/rahimnathwani/mathacademy-stats
1•rahimnathwani•14m ago•0 comments

Why "Market Bullets" is the only pre-market newsletter I still read

1•kvallans•14m ago•0 comments

Show HN: Open-Source Voice AI Badge Powered by ESP32+WebRTC

https://github.com/VapiAI/vapicon-2025-hardware-workshop
1•Sean-Der•14m ago•1 comments

US Launches Financial Rescue of Argentina, Treasury Buys Pesos

https://www.bloomberg.com/news/articles/2025-10-09/bessent-says-20-billion-us-argentina-currency-...
4•toomuchtodo•15m ago•2 comments

Data quantity doesn't matter when poisoning an LLM

https://www.theregister.com/2025/10/09/its_trivially_easy_to_poison/
2•mikece•15m ago•0 comments

Leveraging the Zeigarnik Effect

https://www.theolouvel.com/fieldnotes/Notions/Zeigarnik+Effect
1•theolouvel•16m ago•0 comments

Groundbreaking Tech Inside Meta's $800 AR Glasses but Don't Count on Fixing Them

https://www.ifixit.com/News/113543/theres-groundbreaking-waveguide-tech-inside-metas-800-ar-glass...
3•wayne•16m ago•0 comments

Dominion Voting sold to company run by ex-GOP election official

https://www.msn.com/en-us/news/politics/ar-AA1Oano9
6•dmschulman•20m ago•0 comments

Big Brother has gone full Orwell

https://www.spiked-online.com/2025/10/08/big-brother-has-gone-full-orwell/
2•binning•23m ago•0 comments

Show HN: Engin – a modular application framework for Python

https://github.com/invokermain/engin
2•invokermain•23m ago•0 comments

Parents Never Bought You That Power Wheels? Here's a Cooler One for $10k

https://www.thedrive.com/news/parents-never-bought-you-that-power-wheels-heres-a-cooler-one-for-1...
2•PaulHoule•24m ago•0 comments

This was the fix to the iPhone Antennagate in 2010. 20 bytes

https://threadreaderapp.com/thread/1975360407935328544.html
1•haunter•24m ago•1 comments

Show HN: Oneseal – Secrets, configs, and platform outputs as code

https://github.com/oneseal-io/oneseal
2•stanguc•26m ago•0 comments

Show HN: Summeze – Turn videos into editable LaTeX summaries in seconds

https://summeze.com
2•lorenzolibardi•27m ago•0 comments

Magnolia: Interactive Shell Navigation and History

https://codeberg.org/mtmn/magnolia
3•todsacerdoti•28m ago•0 comments

Tick byte makes people vegan

https://en.wikipedia.org/wiki/Alpha-gal_syndrome
1•riedel•30m ago•0 comments
Open in hackernews

LLMs are mortally terrified of exceptions

https://twitter.com/karpathy/status/1976077806443569355
49•nought•3h ago
https://x.com/karpathy/status/1976082963382272334

Comments

mwkaufma•1h ago
Even when they're not AI slop, these kinds of "paranoid sanity checks" are the software equivalent of security-theater.
bwfan123•1h ago
Form over function is what they are trained for. So, verbose commentary, needless readmes, and emojis all serve that purpose.
mwkaufma•1h ago
Coding for the reviewer, not the user.
simonw•1h ago
Yeah, I really hate code like this because it generally ends up full of codepaths that have never been exercised, so there's all sorts of potential for weird behavior and unexpected edge cases. Plus it's harder to review.
shiandow•1h ago
Is there a way to read the rest?
hugo1789•1h ago
https://xcancel.com/karpathy/status/1976082963382272334
wffurr•1h ago
Turns out computer math is actually super hard. Basic operations entail all kinds of undefined behavior and such. This code is a bit verbose but otherwise familiar.
Den_VR•1h ago
If we wanted defined behavior we’d build systems with Karnaugh maps all the way down.
falcor84•33m ago

    # Step 3: Preemptively check for catastrophic magnitude differences
    if abs(a) > sys.float_info.max / 2:
        logging.warning("Value of a might cause overflow. Returning infinity just to be sure")
        return math.copysign (float('inf'), a)
    if abs(b) < sys.float_info.epsilon:
        logging.warning("Value of b dangerously close to zero. Returning NaN defensively.")
        return math.nan

Does the above code make any sense? I've not worked with this sort of stuff before, but it seems entirely unreasonable to me to check them individually. E.g. if 1 < b < a, then it seems insane to me to return float('inf') for a large but finite a.
im3w1l•29m ago
Ignoring the sign of b for big a can't be right.
OutOfHere•1h ago
Is this Claude? GPT is not like this. To me it looks like Anthropic is just maximizing billable token use as usual, and it has nothing really to do with exceptions per se.
constantcrying•1h ago
If you are dividing two numbers with no prior knowledge of these numbers or any reasonable assumptions you can make and this code is used where you can not rely on the caller to catch an exception and the code is critical for the product, then this is necessary.

If you are actually doing safety critical software, e.g. aerospace, medicine or automotive, then this is a good precaution, although you will not be writing in Python.

mewpmewp2•1h ago
I might agree with that, and maybe the example posted by Karpathy is not the greatest, but what I'm constantly being faced with is try catches where it will fail silently or return a fallback/mock response, which essentially means that system will behave unexpectedly in a more subtle way down the line while leaving you clueless to as what the issue was.

I have to constantly remind Claude that we want to fail fast.

isoprophlex•1h ago
A good 10% of my Claude.md is yelling at it that no i don't want you to silently handle exceptions six calls deep into the stack and no please don't wrap my return values in weird classes full of dumb status enums "for safety"

Just raise god damn it

hyperpape•1h ago
I'm not sure returning None is any safer than an Exception, because the caller still has to check.
metalcrow•1h ago
Given that the output describes the function as being done "with extraordinary caution, because you never know what can go wrong", i would guess that the undisclosed prompt was something similar to "generate a division function in python that handles all possible edges cases. be extremely careful". Which seems to say less about LLM training and more about them doing exactly what they are told.
freehorse•41m ago
Aside from the absurdity and obvious satirical intention,

1. the code is actually wrong (and is wrong regardless of the absurd exception handling situation)

2. some of the exception handling makes no sense regardless, or is incoherent

3. a less absurd version of this actually happens (edit: commonly in actual irl scenarios) if you put emphasis on exception handling in the prompt

sarchertech•1h ago
Expert beginners program like this. I call it what it driven development. Turns out a lot of code was written by expert beginners because by many metrics they are prolifically productive.

In go all SOTA agents are obsessed with being ludicrously defensive against concurrency bugs. Probably because in addition to what if driven development, there are a lot of blog posts warning about concurrency bugs.

bobogei81123•1h ago
This is just AI trying to tell us how bad we designed our programming languages to be when exceptions can be thrown pretty much anywhere
recursive•1h ago
So you think java's checked exceptions are a better model? No opinion myself, but that way seems widely considered bad too.
nivertech•38m ago
Why do you need exceptions at all? They’re just a different return types in disguise…

Also, division by zero should return Inf

threeducks•29m ago
Or -Inf, depending on the sign of the zero, which might catch some programmers by surprise, but is of course the correct thing to do.
nivertech•14m ago

  a/0 =  Inf when a>0
  a/0 = -Inf when a<0
  a/0 =  NaN when a=0
johnyzee•23m ago
Unchecked exceptions are more like a shutdown event, which can be intercepted at any point along the call stack, which is useful and not like a return type.
nivertech•19m ago
Why do you need the call stack at all?
criemen•1h ago
It's also logically incoherent - division by zero can't occur, because if b=0 then abs(b) < sys.float_info.epsilon.

Furthermore, the code is happy to return NaN from the pre-checks, but replaces a NaN result from the division by None. That doesn't make any sense from an API design standpoint.

dijksterhuis•1h ago
I mean, the first three cases are just attempting to turn dynamic into static typed... right? maybe just don't aim for uber-safety in a dynamically typed language? :shrugs:

(I used to look out for kaparthy's papers ten years ago... i tend to let out an audible sigh when i see his name today)

falcor84•43m ago
You shouldn't have the same expectations from a person's tweet as you would from a paper. I don't see any issue with high profile people who are careful in their professional work, putting less thought-through output on social media. At least as long as they don't intentionally/negligently spreading misinformation, which I've never seen Karpathy do.

I for one really enjoy both his longer form work and his shorter takes.

falcor84•47m ago
That code has many issues, but the one that bothers me the most in practice is this tendency of adding imports inside functions. I can only assume that it's an artifact of them optimizing for a minimal number of edits somewhere in the process, but I expect better.
kccqzy•12m ago
It's to make imports lazy, to solve the issue of slow import at startup.
jpcompartir•46m ago
Most comments seem to be taking the code seriously, when it's clearly satirical?
fkyoureadthedoc•37m ago
Not sure why but it made me think of FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
glitchc•33m ago
But what's the prompt that led to this output? Is it just a simple "Write code to divide a by b?" or are there instructions added for code safety or specific behaviours?

I know it's Karpathy, which is why the entire prompt is all the more important to see.

johnisgood•22m ago
"Write me a code that divides a by b and make sure it is safe and handles all edge cases"[1] or something and some languages have more than others.

[1] Probably with some "make you sure handle ALL cases in existence", or emphasis, along those lines.

stargrazer•31m ago
but then, why code with exceptions, why not perform pre-flight/pre-validation checks and minimize exceptions to the truly unknown?
jampekka•12m ago
I've noted that LLMs tend to produce defensive code to a fault. Lots of unnecessary checks, e.g. check for null/None/undefined multiple times for same valie. This can lead to really hard to read code, even for the LLM itself.

The RL objectives probably heavily penalize exceptions, but don't reward much for code readability or simplicity.