HN Simulatornew | past | comments | lists | submit | adev_'s commentslogin

> What's obnoxious is the WG14 standard committee could have at any time in the last 40 years

Or just use bloody C++ that solved that years ago with std::span.

Unfortunately, many C dev prefers whining about "How horribly bloated" C++ is instead of using the part that makes sense.


There are very few reasons to start a greenfield project in C++ at this point.

There are plenty of reasons to start a greenfield C++ project in 2026.

Providing C compatible APIs is one of them.

However, I do not see any reasons to start a plain C user space project in 2026. Excepted if you are embedded / kernel dev.

Everything advantage you do have in C (portability, compatibility, memory control).... you have them in Modern C++, but better.


> embedded

Nintendo has been writing their OSes (3DS and Switch 1/Switch 2) fully in C++ (microkernel included), so not even this is an excuse to use C over C++.


The world would be better off without yet another newly slopped C/C++ app.

> Incidentally it uses sqlite for transaction/TTL metadata which is more suited to sqlite but it's still the bottleneck.

Why sqlite instead of RocksDB ?

What you need at the end of the day for a blob storage is a transactional key value store.

Which RocksDB will give you with much better throughput (and latency) and solves your transaction problem.


> that if there a fuckup anywhere in finance—anywhere in the world—the Deutsche Bank will be involved.

Deutsche Bank, HSBC and Credit Suisse.

If there is a major mafia / illegal operation implying a bank somewhere in the world, you can bet your hat that one of these three is implicated.

Drug cartels, money laundering, tax evasion, war support, international sanctions bypass, genocide. Their CV is absolutely top notch.... for a criminal.


> Deutsche Bank, HSBC and Credit Suisse

HSBC was dumb but not scummy. Credit Suisse was scummy but not dumb. Deutsche Bank is dumb and scummy. That puts them at the nexus of everything stupid and wrong.


> but not scummy

Depend of your definition of scummy I imagine. Actively helping people to avoid taxes by illegal screening and offshore company [1]. And association with Drug cartel in Mexico for money Laundering [2] is not what I would call "Dumb".

It is intentional and fully organized criminal activities.

If it would be any other foreign company that one too-big-to-fail bank, it would have been eradicated from the surface of Earth by law enforcement in less than a year.

[1]: https://en.wikipedia.org/wiki/Swiss_Leaks [2]: https://insightcrime.org/news/hsbc-dirty-money-white-collars...


> I believe it was the affair with the married subordinate that was the real problem. There's a huge amount of legal exposure for NVidia with that

For someone not familiar with American law: How the fuck is that a bigger problem than the Chinese spy ?

Is there any explicit rules at NVidia forbidding that in a code of conduct somewhere ?


It's not. That's a strange statement to make, particularly the emphasis on "married". It seems that person is implying that if a married woman participated in the affair, it was due to coercion. A sexual harassment lawsuit would mainly be a liability in the court of public opinion.

In one word: Power.

C++ is by far the most powerful language around. And this is for the best and (often) also the worst.

In term of generic programming, control on hardware, capacity of abstraction and more generally expressivity: Nothing, even today, come even close to C++.

It is a language full of foot guns and it has its fair share of legacy problems.

But if you learn to avoid it (throught experience and pain). You can reach a productivity and a level of performance in C++ which is very difficult to beat with anything else, including Rust.

Ironically, I find it particularly true in the age of A.I.

Because the amount of C++ around is so tremendous, that agents are currently pretty good at it if guided properly.


> (...) that agents are currently pretty good at it if guided properly.

I think I partially agree with that.

If you create your type system and templates first, agents can be pretty helpful filling in the blanks or "wiring"/integrating an external API into your own type system.

The issue is that I always have to force agents to read that type system before I can prompt them with a task like this, and always have to prompt them to not touch/extend/modify that type system and to use existing codestyles etc.

So I guess I haven't figured out a good type system discovery in my workflows yet. Would be interesting to see how you work with agents here.

Got an open sourced repo by chance where the structure worked out well?


> Got an open sourced repo by chance where the structure worked out well?

I have an AGENTS.md that I bring around in every repo.

Few things I found:

- On new project is that it is much more efficient to point the agent on an old, existing project and simply say "Copy the code style" than to try to document everything in a markdown file.

- Explicit listing of both headers and implementation in CMake target seems to help for dependency resolution.

- A simple "Analyze this codebase" on a folder helps a lot for context prefilling on complex type system. I have a compiler where the entire language grammar is defined as C++ types with mutual relations. DeepSeek is completely capable to understand it and debug grammar mistakes in a blink of an eye.


I find Claude just terrible at writing C++ in comparison to how well it codes everything else I throw at it. It does bad choices, like it writes up new functions to do stuff that is already in the codebase, additionally seemingly can’t leverage the standard library, leans too much on the exact architecture of my computer vs what the codebase is meant to run, don’t seem to figure proper naming standards, keeps ignoring outputs from benchmarks or tooling and instead claim decisions on performance from thin air.

With all other languages I guess because things are more standard it can probably more easily guess than having to follow specific project guidelines, but my experience with C++ with it is not good at all.

It is amazing at python, Rust and pretty all web stuff I tried. But with C++ it requires a ton of guiding and I need to correct all generated lines all the time it seems.


> I find Claude just terrible at writing C++

I dont use Claude. I use DeepSeek and it is very capable. I have found Gemini and Mistral4 equally capable.

One thing I realised however is that Agents adapts to the existing code style:

- Give them a modern, polish C++ codebase and they will produce clean modern C++ - Give them a legacy codebase and they will produce a festival of raw pointer spaghetti and loose themselves. It seems that evem for A.I there is 10^6 variations of C++.

- Force them to use span and string_view and 90% of boundaries problem and lifetime go away. It seems to ease their reasoning.

- A single line in the AGENTS.md is enough for them to properly use fully sanitizers in their test. - They are pretty good at leveraging defensive programming if asked to.

Few negative points: - They are still pretty bad at reasoning about memory hierarchy and memory allocation. But thats hardly surprising, very few codebase do it properly. - You need to explicitly list your dependencies and build system or it's a festival of reimplementation. I have beem pretty successful with Nix so far.


When it comes to generics/templates and expressivity, there are some arguably better languages around. But the range of having access to absolute low level control at the same time as highly abstract generic programming is virtually unmatched.

But the footguns are also impressive and formidable. And one of the unique powers of the language is that it allows the user to build constructs that improve the power of those footguns by several orders of magnitude. And teams can happily build footgun force multipliers without individually recognizing what they are working on.

I still write lots of C++, and the overall reason has more to do with the ecosystem (which is unmatched for what I do) than the language itself. I like it, but learning other languages made me yearn for features that C++ won't likely get before I retire a few decades from now (curse you, Walter Bright, for your awesome ideas! ;) ). In some ways, I feel about C++ like a child who saw ads of awesome toys, but they aren't available for purchase.


Perfomance? Mostly agree, you need dynamic code generation to get much better than C++.

Productivity? Bwahahaha. This is language where 50% of code cannot even be debugged (like, for real. Nothing that executes at compile time is debuggable). Most crazy features are usually passed over with "normal users should simply use well written library and so this complexity does not concern them", then the normal user gets error, sees "decltype(auto)" or some sfinae monster, and is taken by ambulance (since last year, to chatgpt).

C++ is terrible for productivity.


> like, for real. Nothing that executes at compile time is debuggable

Debugging constexpr is trivial with static_assert. In addition, most UBs are entirely eliminated at compile time which is excellent for testing.

> then the normal user gets error, sees "decltype(auto)" or some sfinae monster

Thats a non-issue in the age of Agents. They can reason about that very well. This kind of problem disappeared entirely.

Additionally, I would say that if you are still using SFINAE post C++20, the problem is you and not C++.


ah yes. binary search for new value of implicit constant using "change static_assert and recompile" loop, such trivial.

Also, if you find debugging requires clauses, sfinae clauses or expressions using static_assert trivial, please share your techniques!


> What is the size of A? Answer: you never know in C++ due to polymorphism. It might be a B or other subclass. It is truly a variable length operation.

You could easily go around it.

The compiler knows when creating the destructor for B.

In your example, to have correct C++, you need to have declared a virtual destruct-or for B. You could encode the size of B in a static offset from the virtual destructor or simply as a return value from it.

This is not how it is done now, mainly because how free was designed in C.

free() design is a terrible mistake. Probably one of the worst design mistake of C with the null terminated / no-length specified string and the preprocessor.


What you wrote there is just an unsafe way to do std::variant. This has nothing to do with what the blog post is about.

The blog is about Open polymorphism. Where the list of compatible Object can be extended dynamically (Which is handy for some type of error report for instance).

You can do that since forever in C++ (Since the first support for inheritance), the only thing std::polymorphism brings is the ability to do it without dynamic allocations, emplacement new or lifetime problems.


> This has nothing to do with what the blog post is about.

It's an alternative way to solve the problem presented, which trivially allows you to make a std::vector (the whole point the article is building up to).

> the only thing std::polymorphism brings is the ability to do it without dynamic allocations, emplacement new or lifetime problems.

Which the version I showed has none of.


> it's an alternative way to solve the problem presented

No it's not and you apparently did not understand the concept behind it (or more likely, do not want to understand the concept behind it).

Your solution is not an implementation of Open Polymorphism, it is just a poor man implementation of std::variant.

> Which the version I showed has none of.

Because it is not the same thing like explain by my previous comment and in around 5 other comments around mine soon I guess.

But you are entirely free to grunt around and continue to imply that C++ committee people are implementing something useless (Which they are not, this is useful).


My point is that you don't need open polymorphism for the example given, and if you give me another example, I can show you why you don't need it there either -- because you do in fact never need it. It's an XY problem over the set X.

If a programmer is reaching for a library, they want it to solve a concrete task. Nobody wants to subclass your Event type, if I have to do it, you've failed at your job.


> Nobody wants to subclass your Event type, if I have to do it, you've failed at your job.

Because it's well known that subclassing is used only for Event type and never EVER anything else requires polymorphism #irony.

The only part of this discussion where you are right is that closed polymorphism (std:: variant) is better than open polymorphism when it can be applied.

And even there, your proposed implementation is utter garbage that leaks memory and that I would refuse straight away in any PR.


> Which the version I showed has none of.

No, it has something much worse, it has a memory leak. The nested types inside the union allocate memory, and they don't get destructed when Event gets destructed. Don't do this in modern C++, it's a terrible terrible idea, these kinds of constructs are very hard to get correct manually. Just use std::variant.


> Not by cost per task, just cost per token. But they're spending way more tokens per task, so it doesn't work in their facor.

They are not most expensive per Task. DeepSeek 4.1 flash is bloody efficient.

I currently did run a test myself: - Use the pay as you go offer on OpenRouter on the same task on two different project: Perf optimisation on C++ codebase both with Anthropic and DeepSeek.

- I exploded my 15$ budget in a half-week with Anthropic.

- I did two weeks and half with DeepSeek.


> Curious, why do you say the model is mediocre? I haven't tried it, so I can't pass any judgement.

It's nowhere mediocre.

It's toes-to-toes with GLM-5.3 which is one of the best Open Weight model available (With Kimi K3) for general reasoning.

I just runned it on code reviews right now and it was able to catch some thread safety issue than DeepSeek-4.1 didn't. And DeepSeek-4.1 is by no means a bad model.


It's better than I expected for Mistral.

That said, it hardly seems like the innovative underdog some comments here make it out to be.

GLM-5.3 and Kimi K3 released 2 and 3 months ago respectively.

For all I know anyone could train a model of similar performance by just applying already published research to a new large training run.


> That said, it hardly seems like the innovative underdog some comments here make it out to be.

It's definitively not a revolution, but it is a major jump forward compared to Mistral Medium 3.5.

Worth to notice that they explicitly said they still refining the model, so we might expect something a little bit better at the end of the month

For something trained on a limited budget and 4000 GPUs, it is quite respectable.


I'm just wondering if it's really the result of impressive innovation, in line with comments saying that Mistral might in the future beat a bankrupt OpenAI due to being more profitable or efficient.

Or if it's more a situation where I could have Opus 5.5 go through recent papers from the Chinese labs to apply these to a new large training run, resulting in a model that performs similarly to Mistral Large 4.

I honestly don't know.


> Yeah, thank god those models have arrived.

+100.

Thanks God. these open weight models exist.

And the fact Anthropic is currently trying lobby against these models is despicable.

There is no scenario where putting the key of cybersecurity in the hands of few chosen ones is even remotely acceptable.

No government, no company, no entity should have this power.

Soon or later it will be abused (By 3 letter agency or by an insider/leak).

Delayed disclosure is dead already.

So just give the same capabilities to everybody and stop to fuck around.


they're quite literally trying to create a techno-priest class who are the only ones with access to the hidden knowledge of salvation (ie generation)

similar to priest classes, they warn of impending, world-consuming doom, talk up how they are uniquely positioned to interpret the sacred text (ie create models), while casting aspersions on heretics who offer a similar mode of salvation but whom they describe as being morally and ethically bankrupt (ie GLM lacks safeguards!)

all this in spite of, well, lots of evidence that they themselves have repeatedly done the very same immoral and unethical acts (the many times Anthropic employees have had incompetent sandboxing/configs and too-broad prompts that led to actual intrusion attempts)

they even have the irregular obsession with sex covered (at least it's sex-positive?). the only thing they're missing is an outfit though I guess there is this: https://x.com/Aella_Girl/status/2063798788310118655


[flagged]

Stop this nonsense. These things aren't nukes, they're more like regular weapons. And yes, every home should have one.


[flagged]

General intelligence has very different adversarial dynamics compared to nuclear weapons.

Explained further here: https://news.ycombinator.com/item?id=49094348

Though there is further nuance in agentic vs non-agentic AI: https://news.ycombinator.com/item?id=49736149


I'm legitimately interested in this argument, but simply stating that good vs evil are in equilibrium is nowhere near enough.

> There will be new adversarial games when everyone's smarter (bio/cyber offense/defense), but those games are always symmetrical in the long run

This is an article of faith, not an argument.


The continuation of the sentence you quoted is "and there will also be new cooperative strategies."

This is not faith, but an observation of Earth's past. If it were the case that intelligence is itself harmful, then it should not have evolved in so many species.

And even if we look at only humans, we do not see dumber populations being more prosperous. One could argue about the definition of "dumber" and "prosperous", but it is at least true in my own judgement of value, which I suspect is not too far from the average in modern society. One could also argue that bio/cyber adversarial games are qualitatively different from all past adversarial games, but you could argue the same thing for other qualitatively different games that emerged in the past, when they were new. But we're still here. So this argument hinges on burden of proof, and I think that's on Anthropic.

Also, as mentioned in that first linked comment, centralizing AI development increases a different kind of speciation risk: a small group of superintelligent humans, likely the ones currently running the top AI companies, splitting from the rest of humanity.


No one I've ever heard/read is claiming intelligence itself is harmful. You should delete that idea from your brain and stop responding to it.

> One could also argue that bio/cyber adversarial games are qualitatively different from all past adversarial games

No, one doesn't need to argue that they're different from all past adversarial games. You're a victim of survivorship bias. The games that people like to play and allow to be played are ones that equilibriate. That does not mean that all adversarial games have this feature.

There are an infinite number of games that do not equilibriate. It is incumbent upon you to demonstrate why the AI arms race is one that does.


The only danger here is allowing them to monopolize it. We need to secure the same capabilities for ourselves.


I agree! Same with thermonuclear weapons and Glocks-on-autonomous-Segways!


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: