Based C++
Posted4 months agoActive3 months ago
github.comTechstory
excitedmixed
Debate
60/100
C++MetaprogrammingInterpreted Programming
Key topics
C++
Metaprogramming
Interpreted Programming
A GitHub project 'Based C++' showcases an unconventional use of C++ metaprogramming, sparking both fascination and confusion among HN commenters.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
3h
Peak period
20
78-84h
Avg / period
7.4
Comment distribution37 data points
Loading chart...
Based on 37 loaded comments
Key moments
- 01Story posted
Sep 19, 2025 at 6:36 PM EDT
4 months ago
Step 01 - 02First comment
Sep 19, 2025 at 9:25 PM EDT
3h after posting
Step 02 - 03Peak activity
20 comments in 78-84h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 23, 2025 at 2:27 PM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45307570Type: storyLast synced: 11/20/2025, 6:51:52 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Two scenarios where the definition of a function in C changes, are dynamic libraries on OSes that allow reloading the same library multiple times, or self-rewriting code.
Here you stay within the realms of a compiled language implementation, where what happens, is only expecified by compiler specific features, or OS capabilities handling executables and dynamic libraries.
Compiled code with dynamic replacement during execution,
https://liveplusplus.tech/
https://learn.microsoft.com/en-us/visualstudio/debugger/hot-...
https://dev.epicgames.com/documentation/en-us/unreal-engine/...
Plain interpreters,
https://iel.ucdavis.edu/publication/2006/CUJ_proof.pdf
https://root.cern/
Just some examples.
>
Also the music is way is too loud and sudden.
It's also really interesting to see the audience this is reaching. The issues on the GitHub repository are quite telling.
But if you just want to run C++ in a REPL, you can use Clang-Repl <https://clang.llvm.org/docs/ClangRepl.html> which uses the LLVM JIT to "interpret" C++.
Here, probably used ironically.
[1] https://www.urbandictionary.com/define.php?term=based
Also read up on sheafification really quick. Neither Firefox nor Chrome seem aware of it (red underline), so there.
Edit: If anyone is actually interested in interpreted C++, I think AngelScript is the most practical way for this.
Funnily enough, sufficiently enough of C++ is constexpr-able that it was the driving force for compile-time reflection in C++[1], which is not unlike what the author has done.
Although the new syntax is much more readable than what the author chose to do with expression templates, it's still annoying, as is much of C++. But I still like it, so I am decidedly Stockholmed.
[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p29...
As to why, I can't pretend to know the author mind, but I suspect they did it because they could, the project itself is the objective.
[1] https://en.wikipedia.org/wiki/Expression_templates