frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The Hive (Website)

https://en.wikipedia.org/wiki/The_Hive_(website)
1•bariumbitmap•3m ago•0 comments

Zynk, Cross-platform, unlimited, private and efficient file transfer

1•justmarc•3m ago•0 comments

The House of Entropy: A systems engineering view on existential risk [pdf]

https://github.com/kiran-sf-swe/essays/blob/main/The%20House%20of%20Entropy%20-%20The%20Race%20Ag...
1•kiran_kumar_sf•7m ago•1 comments

'What's the stupidest use of AI you saw in 2025?'

https://slashdot.org/story/25/12/29/0738214/ask-slashdot-whats-the-stupidest-use-of-ai-you-saw-in...
1•MilnerRoute•11m ago•0 comments

A new way to map how cells choose their fate

https://www.nature.com/articles/s41467-025-67782-6
1•stevenjgarner•11m ago•0 comments

Show HN: Starthub – Deploy horizontal n8n to Digital Ocean with one command

https://starthub.so
1•tgirotto•13m ago•0 comments

22M Affected by Aflac Data Breach

https://www.securityweek.com/22-million-affected-by-aflac-data-breach/
2•Bender•13m ago•0 comments

AI-generated code leaves businesses open to supply chain risk

https://www.scworld.com/news/ai-generated-code-leaves-businesses-open-to-supply-chain-risk
2•Bender•14m ago•0 comments

Researchers make "neuromorphic" artificial skin for robots

https://arstechnica.com/science/2025/12/researchers-make-neuromorphic-artificial-skin-for-robots/
3•Bender•14m ago•0 comments

Binance's Trust Wallet extension hacked; users lose $7M

https://www.web3isgoinggreat.com/?id=trust-wallet-hack
5•ilamont•17m ago•0 comments

I think I found a bug in amazon.com

1•_cairn•20m ago•0 comments

Every Test Is a Trade-Off

https://blog.todo.space/2025/12/27/buying-the-right-test-coverage/
1•birdculture•21m ago•0 comments

Show HN: I built an AI that generates clean docs for vibe-coded apps

https://www.superdocs.cloud/
1•udit_50•21m ago•1 comments

Ask HN: How can I stop Google search AI overview from spoilers?

1•ex-aws-dude•21m ago•0 comments

How hard is it to encapsulate life? The general constraints on encapsulation

https://royalsocietypublishing.org/rstb/article/380/1936/20240297/235091/How-hard-is-it-to-encaps...
2•PaulHoule•22m ago•0 comments

Finger-Nose Stylus for Touch Screens

https://variationsonnormal.com/2011/04/28/finger-nose-stylus-for-touchscreens/
1•downboots•22m ago•0 comments

The Untold Story of the Nintendo Entertainment System [video]

https://www.youtube.com/watch?v=uJvpRGibFhg
1•Timothee•22m ago•0 comments

Oct 9, 2006 to Dec 27, 2025 – 7,020 Days of Hacker News

https://da0a80a4.static-news-dtg.pages.dev/static
1•keepamovin•24m ago•1 comments

Which Humans?

https://osf.io/preprints/psyarxiv/5b26t_v1
1•surprisetalk•24m ago•0 comments

Fighting Fire with Fire: Scalable Oral Exams with an ElevenLabs Voice AI Agent

https://www.behind-the-enemy-lines.com/2025/12/fighting-fire-with-fire-scalable-oral.html
3•Panos•26m ago•0 comments

Meta's ads tools started switching out top-performing ads with AI-generated ones

https://www.businessinsider.com/meta-ai-generating-bizarre-ads-advantage-plus-2025-10
50•zdw•30m ago•23 comments

Next Five Asteroid Approaches

https://www.jpl.nasa.gov/asteroid-watch/next-five-approaches/
2•gnabgib•30m ago•0 comments

Show HN: Cmt is an AI powered commit generator

https://github.com/clifton/cmt
1•cliftonk•31m ago•0 comments

Nx "pulled the rug" on us, a potential solution and lessons learned

https://salvozappa.com/how-nx-pulled-the-rug-on-us.html
2•lladnar•31m ago•0 comments

Russian Ghost Ship Sank Smuggling Nuclear Reactor Parts Likely Bound for N Korea

https://united24media.com/latest-news/russian-ghost-ship-sank-while-smuggling-nuclear-reactor-par...
13•ck45•32m ago•1 comments

Walmart opts for 3D-printed buildings using technology from Alquist

https://unionrayo.com/en/walmart-3d-printed-building/
3•stevenjgarner•37m ago•1 comments

The "4-Hour Barrier": Forensic Audit of Sm_90 Logic Decay on Nvidia H100

1•Stan_Byriukov•37m ago•0 comments

Bubbly Moonshots: On stagflation, neolabs, how to handpick not-stupid categories

https://substack.com/home/post/p-182749582
2•theno0b•38m ago•0 comments

Ralph Nader Has a Pencil Eraser Problem. We Put 100 Kids on the Case

https://www.nytimes.com/wirecutter/reviews/ralph-nader-pencil-erasers/
1•nateb2022•38m ago•1 comments

Sun Times Visualization

https://udivankin.github.io/sunrise-sunset/
1•amadeuspagel•39m ago•0 comments
Open in hackernews

The production bug that made me care about undefined behavior

https://gaultier.github.io/blog/the_production_bug_that_made_me_care_about_undefined_behavior.html
37•birdculture•2h ago

Comments

titzer•1h ago
tldr; the UB was reading uninitialized data in a struct. The C++ rules for when default initialization occurs are crazy complex.

I think a sanitizer probably would have caught this, but IMHO this is the language's fault.

Hopefully future versions of C++ will mandate default initialization for all cases that are UB today and we can be free of this class of bug.

trueismywork•1h ago
For now, best strategy is to initialize everything explicitly.
torstenvl•59m ago
Yeah... but I wouldn't characterize the bug itself (in its essential form) as UB.

Even if the implementation specified that the data would be indeterminate depending on what existed in that memory location previously, the bug would still exist.

Even if you hand-coded this in assembly, the bug would still exist.

The essence of the bug is uninitialized data being garbage. That's always gonna be a latent bug, regardless of whether the behavior is defined in an ISO standard.

forrestthewoods•47m ago
Yeah I agree. This is a classic “uninitialized variable has garbage memory value” bug. But it is not a “undefined nasal demons behavior” bug.

That said, we all learn this one! I spent like two weeks debugging a super rare desync bug in a multiplayer game with a P2P lockstep synchronous architecture.

Suffice to say I am now a zealot about providing default values all the time. Thankfully it’s a lot easier since C++11 came out and lets you define default values at the declaration site!

titzer•34m ago
I prefer language constructs define that new storage is zero-initialized. It doesn't prevent all bugs (i.e. application logic bugs) but at least gives deterministic results. These days it's zero cost for local variables and near-zero cost for fields. This is the case in Virgil.
kevin_thibedeau•6m ago
C & C++ run on systems where it may not be zero cost. If you need low latency startup it could be a liability to zero out large chunks of memory.
kayo_20211030•58m ago
Great post. It was both funny and humble. Of course, it probably wasn't at all funny at the time.
vhantz•36m ago
The two fields in the struct are expected to be false unless changed, then initialize them as such. Nothing is gained by leaving it to the compiler, and a lot is lost.
gwd•16m ago
I think the point is that sometimes variables are defined by the language spec as initialized to zero, and sometimes they aren't.

Perhaps what you mean is, "Nothing is to be gained by relying on the language spec to initialize things to zero, and a lot is lost"; I'd agree with that.

vhantz•12m ago
Please don't be pedantic. Compilers implement the standard, otherwise it's just a text document.
nneonneo•32m ago
Even calling uninitialized data “garbage” is misleading. You might expect that the compiler would just leave out some initialization code and compile the remaining code in the expected way, causing the values to be “whatever was in memory previously”. But no - the compiler can (and absolutely will) optimize by assuming the values are whatever would be most convenient for optimization reasons, even if it would be vanishingly unlikely or even impossible.

As an example, consider this code (godbolt: https://godbolt.org/z/TrMrYTKG9):

    struct foo {
        unsigned char a, b;
    };

    foo make(int x) {
        foo result;
        if (x) {
            result.a = 13;
        } else {
            result.b = 37;
        }
        return result;
    }
At high enough optimization levels, the function compiles to “mov eax, 9485; ret”, which sets both a=13 and b=37 without testing the condition at all - as if both branches of the test were executed. This is perfectly reasonable because the lack of initialization means the values could already have been set that way (even if unlikely), so the compiler just goes ahead and sets them that way. It’s faster!
arrowsmith•18m ago
How is this an "optimization" if the compiled result is incorrect? Why would you design a compiler that can produce errors?
tehjoker•14m ago
It's not incorrect. Where is the flaw?
Negitivefrags•14m ago
It’s not incorrect.

The code says that if x is true then a=13 and if it is false than b=37.

This is the case. Its just that a=13 even if x is false. A thing that the code had nothing to say about, and so the compiler is free to do.

recursivecaveat•8m ago
Even the notion that initialized values might contain garbage is kind of dangerous. Once you access them you can't reason about what's going to happen at all. Behaviour can happen that's not self-consistent with any value at all: https://godbolt.org/z/adsP4sxMT
mac3n•4m ago
Many years had a customer complaint about undefined data in Fortran 77. It turned out that the compiler never allocated storage for uninitialized variables, so it was aliased to some other data.

Compiler was changed to allocate storage for any referenced varibles.