frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

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

https://openciv3.org/
529•klaussilveira•9h ago•146 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
859•xnx•15h ago•518 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
72•matheusalmeida•1d ago•13 comments

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

https://github.com/valdanylchuk/breezydemo
180•isitcontent•9h ago•21 comments

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

https://github.com/pydantic/monty
182•dmpetrov•10h ago•79 comments

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

https://vecti.com
294•vecti•11h ago•130 comments

Dark Alley Mathematics

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

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

https://github.com/microsoft/litebox
343•aktau•16h ago•168 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
338•ostacke•15h ago•90 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
434•todsacerdoti•17h ago•226 comments

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

https://eljojo.github.io/rememory/
237•eljojo•12h ago•147 comments

Delimited Continuations vs. Lwt for Threads

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

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
373•lstoll•16h ago•252 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
6•videotopia•3d ago•0 comments

PC Floppy Copy Protection: Vault Prolok

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

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
14•denuoweb•1d ago•2 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
220•i5heu•12h ago•162 comments

Why I Joined OpenAI

https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
91•SerCe•5h ago•75 comments

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

https://github.com/phreda4/r3
62•phreda4•9h ago•11 comments

Learning from context is harder than we thought

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

Introducing the Developer Knowledge API and MCP Server

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

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

https://infisical.com/blog/devops-to-solutions-engineering
127•vmatsiiako•14h ago•53 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...
18•gmays•4h ago•2 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
261•surprisetalk•3d ago•35 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/
1029•cdrnsf•19h ago•428 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
55•rescrv•17h ago•18 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
83•antves•1d ago•60 comments

WebView performance significantly slower than PWA

https://issues.chromium.org/issues/40817676
18•denysonique•6h ago•2 comments

Zlob.h 100% POSIX and glibc compatible globbing lib that is faste and better

https://github.com/dmtrKovalenko/zlob
5•neogoose•2h ago•1 comments

I'm going to cure my girlfriend's brain tumor

https://andrewjrod.substack.com/p/im-going-to-cure-my-girlfriends-brain
109•ray__•6h ago•54 comments
Open in hackernews

Why export templates would be useful in C++ (2010)

http://warp.povusers.org/programming/export_templates.html
19•PaulHoule•3mo ago

Comments

jcranmer•2mo ago
It's worth pointing out that export templates were removed from C++ based on feedback from the most expert implementers of C++ on implementing the feature, which unanimously resolved to "don't": https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n14....

It's also worth noting that the main claim of this article as to its advantage is in fact listed as "phantom advantage #1" in the paper arguing for its removal. The paper doesn't do a good job of explaining this for lay people, but the basic problem is that export templates actually end up working entirely backwards from the way you think they work--rather than letting you hide the implementation details from other compilation units, they actually force you to expose all of the implementation details, even implementation details not normally fronted to the user, in ways that cause the common slight differences to snowball into catastrophic errors.

The feature people want is to not put the template body in a header. But the problem with C++ templates is that template bodies are instantiated at their first point of use. As the post notes, extern templates let you have a dedicated translation unit provide the instantiations with usefully hidden definition, so long as you manually list all of the instantiations that you might need. And this is possible in modern C++, and is used in some cases where the universe of possible templated values is relatively small and self-contained (say, string libraries or numeric libraries).

Export templates theoretically allow you to delegate the expansion of a template without manually listing all of the possible expansions. But the compilation unit that contains the body doesn't know--it can't know--all of the possible expansions. So the compilation unit that uses the exported template, the only one that knows the expansions it needs, has to generate the expansion. From the body contained in the other compilation unit. Which means the first compilation unit needs to export all of the details necessary to recreate the body for an arbitrary template instantiation. And, were the feature to have lasted long enough for multiple versions of C++ to come into play, a current C++ compiler would have to figure out how to instantiate a template which is half C++26 and half C++98, and I don't mean "C++98 source code compiled with C++26", I mean "code compiled in C++98 mode with C++98 semantics."

At the end of the day, it turns out to be easier to literally include the entire source code of the template as an included header file than it is to do all of the magic required to make export templates work.

MITSardine•2mo ago
Wouldn't a decent compromise be to extend the capabilities of the C preprocessor, so that we could iterate over types at preprocessing time?

That way, we could instantiate for a great number of types more easily, while keeping implementations in source files. You can always do an instantiation macro, but it still becomes painful when the number of template arguments (and their possible values) increases.

I know there's the Boost PP library but I personally find it incomprehensible once you try to nest two+ loops.

Surely there's a reason the CPP hasn't budged?