frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Trust your compiler: Modern C++

https://categorica.io/blog/2026.06.29_trust_your_compiler/
25•foxhill•3d ago

Comments

sylware•1h ago
Are you a fool?

Another name for compilers: invisible backdoor injectors. The more complex is the syntax the more it is likely to happen... I let you guess how the "sane" syntax from c++ and similar (LOL) does fit here...

pjmlp•28m ago
Quite funny comment on the vibe coding age.
kzrdude•59m ago
Trust the compiler - sure - but we can't change the whole program by using -ffast-math, unfortunately, so that particular one is out.
CoastalCoder•28m ago
I really dislike the complexity of modern C++ language specs, but does it obscure much detail about FP ops?

TL;DR:

A vast majority of the programmers I've worked with don't understand the nuances of FP in general, nor the various extents of IEEE-754 support in different programming languages.

So for important numerical programming, I think clarity regarding the FP operations being performed can be crucial. I'm just unclear if modern C++ is a significant factor for that.

Glandalf•54m ago
I’ve seen some terrible horrid nonsense from them and even the best compilers don’t use a third of the opcodes our modern CPUs boast of. Nobody understands the big compilers any more either, they’re all too huge. And soon AI will be “improving” hem too.

You want to see a beautiful compiler? Look at Plan 9’s compiler suite. A man could understand and even build on that.

mike_hock•39m ago
> Virtual vs static polymorphism

> std::visit over std::variant<A, B, C> is lowered to a switch over the active alternative.

> In this case, layout is probably doing more work than the dispatch mechanism itself.

Very likely because last time I checked visit lowers to a virtual call.

Panzerschrek•13m ago
> exceptions are slow

There are proposals to introduce better exceptions into C++. Like this: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p07....

But until it's not in the standard, people should use std::expceted instead.

Joker_vD•4m ago
Every time I see "use ranges and algorithms!" examples, I am baffled that apparently, I am supposed to find

    inline double algorithm_call(std::span<double const> xs) noexcept {
        return std::accumulate(
            xs.begin(),
            xs.end(),
            0.0,
            [](double acc, double volts) {
                auto mv  = calibrated_mv(volts);
                auto err = residual(mv);
                return weighted_square(err) + acc;
        });
    }
more readable, concise, and easier on my eyes than

    inline double raw_loop(std::span<double const> xs) noexcept {
        double sum = 0.0;

        for (double volts : xs) {
            auto mv  = calibrated_mv(volts);
            auto err = residual(mv);
            sum += weighted_square(err);
        }

        return sum;
    }
Sure, there are some algorithms in <algorithms> that I'm rather not reimplement myself, but this one is not it.

Phosh 0.56.0

https://phosh.mobi/releases/rel-0.56.0/
24•edward•29m ago•2 comments

Introduction to Compilers and Language Design

https://dthain.github.io/books/compiler/
33•AlexeyBrin•2h ago•1 comments

If you're a button, you have one job

https://unsung.aresluna.org/if-youre-a-button-you-have-one-job/
347•nozzlegear•11h ago•175 comments

Shadcn/UI now defaults to Base UI instead of Radix

https://ui.shadcn.com/docs/changelog
195•dabinat•9h ago•85 comments

Show HN: KiCad in the Browser

https://demo.pcbjam.com/
20•ViktorEE•1h ago•5 comments

Pandoc Lua Filters

https://pandoc.org/lua-filters.html
96•ankitg12•2d ago•7 comments

Knowledge Should Not Be Gated

https://www.formaly.io/blog/knowledge-should-not-be-gated
40•nezhar•5h ago•20 comments

Fast Software, the Best Software (2019)

https://craigmod.com/essays/fast_software/
68•ustad•6h ago•35 comments

Medieval-style fortifications are back in the Sahel

https://www.economist.com/middle-east-and-africa/2026/06/25/medieval-style-fortifications-are-bac...
6•andsoitis•4d ago•2 comments

Trust your compiler: Modern C++

https://categorica.io/blog/2026.06.29_trust_your_compiler/
25•foxhill•3d ago•8 comments

Claude Design System Prompt

https://github.com/Trystan-SA/claude-design-system-prompt
73•handfuloflight•5h ago•19 comments

Jellyfish can heal wounds in minutes. Scientists want their secrets

https://www.mbl.edu/news/jellyfish-can-heal-wounds-minutes-scientists-want-their-secrets
159•hhs•15h ago•35 comments

Megawatts by Microwave

https://computer.rip/2026-07-04-microwave-and-power.html
44•eternauta3k•8h ago•4 comments

Scientist who cleaned space toilet on work now leading Mars exploration

https://www.bbc.com/news/articles/cz758x04g83o
25•saikatsg•4h ago•5 comments

Pi square is nearly 10

https://mihai.page/pi-square-is-10/
25•freediver•3h ago•16 comments

Artful Cats: Feline-Inspired Art and Artifacts

https://www.si.edu/spotlight/art-cats
60•jruohonen•3d ago•5 comments

Moby Dick Workout (2022)

https://www.hogbaysoftware.com/posts/moby-dick-workout/
63•helloplanets•9h ago•20 comments

Command and Conquer Generals natively ported to macOS, iPhone, iPad using Fable

https://github.com/ammaarreshi/Generals-Mac-iOS-iPad/tree/main
606•asronline•18h ago•257 comments

Functional Programming in hica

https://www.hica.dev/docs/functional-programming/
30•cladamski79•3d ago•4 comments

Meta's Un-Stable Signature

https://hackerfactor.com/blog/index.php?/archives/1098-Metas-Un-Stable-Signature.html
112•ementally•3d ago•15 comments

Atomic Force Microscope [video]

https://www.youtube.com/watch?v=DyIQkqBXhS0
90•mhb•2d ago•9 comments

The Log is the Agent

https://arxiv.org/abs/2605.21997
65•iacguy•10h ago•19 comments

What ORMs have taught me: just learn SQL (2014)

https://wozniak.ca/blog/2014/08/03/1/index.html
229•ciconia•4d ago•263 comments

“Beyond the limit”: Satellites and mirrors in space pose threat to the night sky

https://www.eso.org/public/news/eso2607/
166•Breadmaker•20h ago•264 comments

About the Digital Art

https://www.tricivenola.com/about-the-digital-art/
20•NaOH•3d ago•3 comments

GPT-5.5 Codex reasoning-token clustering may be leading to degraded performance

https://github.com/openai/codex/issues/30364
324•maille•16h ago•124 comments

Return of the Nigerian Prince Redux: Beware Book Club and Book Review Scams (2025)

https://writerbeware.blog/2025/09/19/return-of-the-nigerian-prince-redux-beware-book-club-and-boo...
67•Anon84•13h ago•23 comments

My ASN Journey series (2024)

https://www.animmouse.com/p/my-asn-journey/
31•antonalekseev•9h ago•12 comments

Dark mode with web standards

https://olliewilliams.xyz/blog/dark-mode/
21•thm•6h ago•12 comments

Drone Autonomy (2021)

https://www.cggonzalez.com/blog/index.html
73•cgg1•14h ago•6 comments