frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Attention people who think UB is fine

https://blog.habets.se/2026/10/Attention-people-who-think-UB-is-fine.html
7•signa11•2h ago

Comments

johnea•54m ago
Isn't a solution to simply not use unreachable()?
stop50•34m ago
im not an c++ expert, but it looks like the unreachable macro of rust. In rust it allows optimizing the generated binary to not care about special paths. If an integer can only be 1-4, then it doesn't make sense to dedicate an code path for 0 or 5+ that will never be called. in an explicit for loop its easy to know for the compiler, but when this information crosses boundaries like function calls then it can make it easier and can reduce the binary size.
tyushk•10m ago
unreachable! in Rust is panic! with a different name [1]. The unsafe unreachable_unchecked [2] is C++ std::unreachable.

[1] https://doc.rust-lang.org/std/macro.unreachable.html [2] https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked....

mpyne•31m ago
The solution is to avoid UB. std::unreachable() is just an easy-to-invoke way of hitting UB, mentioned for the sake of the discussion. They did later take your advice “Let’s say we change std::unreachable() to int* ptr = nullptr; *ptr = 99; in the previous example.”. They still got improper codegen out of the compiler.

Though, it would be better if programmers read deliberate instances of UB as if they literally said "std::unreachable()" at that point in the code, as that would better convey how the optimizer passes will see things after dozens of frontend and middle-end passes have run before it.

pestatije•23m ago
UB - undefined behaviour
charleslmunger•15m ago
This is sort of true, except that behavior can be undefined in the standard but defined in your implementation. One of the best examples is -fwrapv, which makes signed integer overflow not UB. And Fil-C has no undefined behavior that I'm aware of. But most implementations target the standard and "define" what the standard doesn't to be "whatever I feel like, in service of implementation simplicity and performance". What matters is what your implementation guarantees, which should be a superset of what the standard does.

Five Qwen3.8-27B models match Fable 5 Using GVS5H Harness

https://github.com/slee-persis/GVS5H
58•rzk•1h ago•15 comments

We should be more ambitious with the software we build

https://danluu.com/ambitious/
280•ltratt•7h ago•238 comments

Cerebras Deploys Trillion-Parameter AI Models

https://www.cerebras.ai/blog/how-we-deploy-trillion-parameter-frontier-models-on-cerebras
57•gmays•3h ago•18 comments

The Goose Programming Language

https://aardappel.github.io/goose/
305•bobbydigitales•9h ago•188 comments

America has lost 200k of jobs in media, film and the arts. How much is AI?

https://www.apricitas.io/p/ai-and-the-fall-of-the-creative-class
259•gnabgib•5h ago•264 comments

Small Programs and Languages

https://ratfactor.com/cards/pl-small
66•andsoitis•7h ago•5 comments

SpeedCrunch 1.1

https://www.speedcrunch.org/
104•LordNibbler•9h ago•13 comments

Xbox Turns Down Netflix $500M Offer

https://www.darkhorizons.com/xbox-turns-down-netflix-500-million-offer/
65•xoxxala•1h ago•73 comments

In Rainbows

https://hitogata.neocities.org/Rainbows
13•surprisetalk•2d ago•1 comments

Listen and read USA nuclear forces Emergency Action Messages, heard on 11175 kHz

https://missileer.watch
148•liotier•9h ago•101 comments

Why Gopher in 2026?

https://gopher.muffinlabs.com/sdf.org/users/nervtoji/phlog/001.txt
47•andsoitis•5h ago•13 comments

Meta employees say Lula’s accounts restricted in Brazil election: Report

https://www.aljazeera.com/economy/2026/10/16/meta-employees-say-lulas-accounts-restricted-in-braz...
80•nidnogg•2h ago•15 comments

I Built a Stereo Vision Board for Hardware Hackers

https://rootkitlabs.com/2026/10/06/i-built-a-stereo-vision-board-for-hardware-hackers/
49•machinehum•4d ago•4 comments

Social dynamics of toxic metal industry in medieval Europe

https://www.cambridge.org/core/journals/antiquity/article/social-dynamics-of-toxic-metal-industry...
25•XzetaU8•4d ago•0 comments

Show HN: Steal My Bitcoin

https://stealmybitcoin.com/
442•cloudlandsdev•8h ago•264 comments

FreeDNS

https://freedns.afraid.org/
267•esher•13h ago•67 comments

I don't understand quantum physics (2018)

https://www.southampton.ac.uk/~doug/quantum_physics/index.html
291•rramadass•19h ago•235 comments

Attention people who think UB is fine

https://blog.habets.se/2026/10/Attention-people-who-think-UB-is-fine.html
7•signa11•2h ago•6 comments

The Importance of Limitations for Creativity and Learning (2023)

https://ratfactor.com/cards/limitations
45•andsoitis•7h ago•12 comments

Pragtical v3.14 Lua-based text editor adds menus, floating views, and sessions

https://pragtical.dev/blog/pragtical-v3140-release
5•rd07•3d ago•1 comments

The St. Helena 5 pence coin shows Jonathan, a roughly 190 year old tortoise

https://de.numista.com/9866
109•schleck8•12h ago•32 comments

Node2Shell evolves to HTTP2Shell, blast radius affects many HTTP libs and apps

https://www.aikido.dev/blog/python-packages-vulnerable-node2shell-brotli-cve-2026-111497
294•theanonymousone•20h ago•140 comments

A story of a Figma bug that wasn't a bug at all (2021)

https://aresluna.org/this-is-a-story-of-a-figma-bug/
13•jllyhill•3d ago•0 comments

Neural chip decodes interactions between brain regions

https://actu.epfl.ch/news/neural-chip-decodes-interactions-between-brain-r-2/
97•giuliomagnifico•13h ago•34 comments

Roku developer repositories moved from GitHub to GitLab

https://blog.roku.com/developer/gitlab-move
274•cxr•12h ago•187 comments

Local Wikipedia: Wikipedia, but only for things a half hour walk from you

https://edjefferson.com/localwiki/
1561•sohkamyung•2d ago•245 comments

Bbtree: Fastest Ordered Map

https://bbtree.xiangpeng.systems/post/
76•aoli-al•10h ago•11 comments

GPU-unlock: FP/BF16 instruction issue rate on Nvidia 3000's cards

https://github.com/Zagitta/gpu-unlock
208•fragebogen•19h ago•67 comments

Reactive Optimizers: rewrite the optimizer's source code during training

https://xingjianbai.com/reactive-optimizers/
22•matt_d•3d ago•2 comments

Physicists trap a single antimatter particle for a month

https://www.scientificamerican.com/article/physicists-trap-a-single-antimatter-particle-for-a-month/
291•mooreds•3d ago•83 comments