frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
632•klaussilveira•13h ago•187 comments

Start all of your commands with a comma

https://rhodesmill.org/brandon/2009/commands-with-comma/
20•theblazehen•2d ago•2 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
930•xnx•18h ago•548 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
34•helloplanets•4d ago•26 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
110•matheusalmeida•1d ago•28 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
43•videotopia•4d ago•1 comments

Jeffrey Snover: "Welcome to the Room"

https://www.jsnover.com/blog/2026/02/01/welcome-to-the-room/
10•kaonwarb•3d ago•10 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
222•isitcontent•13h ago•25 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
213•dmpetrov•13h ago•103 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
323•vecti•15h ago•142 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
372•ostacke•19h ago•94 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
359•aktau•19h ago•181 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
478•todsacerdoti•21h ago•234 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
275•eljojo•15h ago•164 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
404•lstoll•19h ago•273 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
85•quibono•4d ago•21 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
25•romes•4d ago•3 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
56•kmm•5d ago•3 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
16•jesperordrup•3h ago•9 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
245•i5heu•16h ago•189 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
13•bikenaga•3d ago•2 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
54•gfortaine•10h ago•22 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
141•vmatsiiako•18h ago•64 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
281•surprisetalk•3d ago•37 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1060•cdrnsf•22h ago•436 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
133•SerCe•9h ago•119 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
177•limoce•3d ago•96 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
70•phreda4•12h ago•14 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
28•gmays•8h ago•11 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
63•rescrv•20h ago•23 comments
Open in hackernews

Squashing my dumb bugs and why I log build IDs

https://rachelbythebay.com/w/2025/08/03/scope/
14•zoidb•6mo ago

Comments

phyzome•6mo ago
Of course, if that code had been written in Rust, the compiler would have caught the bug... no tests necessary, and no need to stick to clever coding patterns and write your own wrappers.

I know she likes her C, but I wonder if she'll eventually come around, drawn by the better reliability.

kevin_thibedeau•6mo ago
This isn't C. At least denigrate the correct language.

The problem here is a flawed object design that requires external knowledge of when methods can be called. The fix is to detect invalid calls to value(), log/print to stderr, and call abort(). With a suitable test suite these logic errors will reveal themselves before a release build.

kelnos•6mo ago
> The fix is to detect invalid calls to value(), log/print to stderr, and call abort().

That is what the code does:

> > Now, had that code ever run, it would have CHECKed and blown up right there, since calling .value() after it's returned false on the pass-fail check is not allowed.

Sure, it also makes sure that the check has been done before calling either .value() or .error(), but that isn't really relevant to the issue at hand: the program aborts if you call the wrong one of those two based on what the object holds.

> With a suitable test suite these logic errors will reveal themselves before a release build.

This is why I prefer Rust's approach with Result: the normal way of using it[0] means that I can't use it incorrectly. If I try to, it will be caught at compile time, and I don't need to write and maintain a test for something so stupidly trivial.

[0] Yes, I can use unwrap() and kill those guarantees. I make a habit of very rarely using unwrap(), and when I do, I write a comment above the line that details why I believe it's safe and will never panic.

phyzome•6mo ago
Eh, I can't tell C from C++, as I've never really programmed in either. But you knew what I meant anyhow.
valicord•6mo ago
How would the compiler have caught this bug in rust?
whytevuhuni•6mo ago
The short answer is that both values and errors are usually better scoped to only the places where they should be used.

For one, Rust's unwrapping of values is done in one step, as opposed to a "check first, unwrap second".

    if let Some(inner_value) = wrapped_value {
        // ..do something with inner_value..
    }
Or this:

    let Some(inner_value) = wrapped_value else {
        // compiler forces this branch to divert (return, break, etc)
    };

    // ..do something with inner_value..
This makes it so you can't check something and unwrap something else.

Second, for pulling out errors, you would usually use a match statement:

    match my_result {
        Ok(good_value) => {
            // use the good_value; the bad_value is not available here
        }
        Err(bad_value) => {
            // use the bad_value; the good_value is not available here
        }
    }
Or:

    let good_value = match my_result {
        Ok(good_value) => good_value,
        Err(bad_value) => { /* return an error */ },
    };

    // bad_value no longer available here
This makes it so that you can't invert the check. As in, you can't accidentally check that it's an Err value and then use it as an Ok, because its inner value won't be in scope.

You also can't use an Ok value as an Err one beyond its scope, because the scope of the error and the scope of the good value are a lot more limited by how if let and match work.

What the C++ code is doing is repeatedly calling `value.unwrap()` or `value.unwrap_err()` everywhere, pinky-promising that the check for it has been done correctly above. There's some clever checks on the C++ side to make this blow up in bad cases, but they weren't enough.