Live data from Hacker News

The C++ standard for the F-35 Fighter Jet [video]

youtube.com

391–400 of 451 posts

Re: The C++ standard for the F-35 Fighter Jet [video]

#391
post #332
post #328

A very jovial discussion of systems that have killed millions of innocent people. Maybe you could do the same treatment of Nazi gas chambers or something for the next video?

Weird link to gas chambers.. Do you think 'genocides' will go down if we bring first world militaries to third world standards?

I think Israel would find it harder to kill children, yes. In my view a good thing.

Re: The C++ standard for the F-35 Fighter Jet [video]

#392
post #42

The “90% ban” isn’t about hating C++ — it’s about guaranteeing determinism. In avionics, anything that can hide allocations, add unpredictable control flow, or complicate WCET analysis gets removed. Once you operate under those constraints, every language shrinks to a tiny, fully-auditable subset anyway.

They could use 100% of Rust

No they could not. Rusts standard library heavily uses dynamic memory allocation and panics, for example. MISRA C:2025 Addendum 6 covers MISRA rules that still apply to Rust, as an example of how one would restrict Rust in safety-critical contexts.

Re: The C++ standard for the F-35 Fighter Jet [video]

#393
post #328

A very jovial discussion of systems that have killed millions of innocent people. Maybe you could do the same treatment of Nazi gas chambers or something for the next video?

Technology is not evil, the people wielding it are. It's a little disingenuous and dare I say insensitive to make this analogy.

Disingenuous is making a bald statement like that about a very long and involved debate in philosophy. Suggest you read around the subject a bit first before making such haughty comments... Could start here:

https://plato.stanford.edu/entries/technology/

https://bpb-us-e2.wpmucdn.com/sites.uci.edu/dist/a/3282/file...

Re: The C++ standard for the F-35 Fighter Jet [video]

#394

Earlier quoted context omitted.

I've heard that MSVC does (did?) that, but if so that's an MSVC problem. gcc and clang don't do that. https://godbolt.org/z/nasoWeq5M

WDYM? Vector is an abstraction over dynamically sized arrays so sure it does use heap to store its elements.

I think usefulcat interpreted "std::vector allocated and freed on the stack" as creating a default std::vector and then destroying it without pushing elements to it. That's what their godbolt link shows, at least, though to be fair MSVC seems to match the described GCC/Clang behavior these days.

Re: The C++ standard for the F-35 Fighter Jet [video]

#395

Earlier quoted context omitted.

While there are several comparable European alternatives, many countries put their bets on the F-35 a long time ago. It is very much a part of this discussion. I’m from one of those countries, and I can assure you a lot of people would now have preferred that we went with an EU competitor instead.

What comparable alternative is available today? None of the European companies has a production 5th generation aircraft nor the integrated sensing capabilities. This is what is driving the incredible demand despite misgivings. You can't survive in a near peer combat environment without it. Countries are buying it because it is the only game in town for certain high-value capabilities, not because they necessarily lik…

> You can't survive in a near peer combat environment without it.

How well will the european countries survive with it if the US cuts off access to spare parts, SW maintenance links etc?

Re: The C++ standard for the F-35 Fighter Jet [video]

#396
post #364

Earlier quoted context omitted.

This assumes that the operating system can run. If the memory corruption impacts the OS, then it may be impossible to recover. As the systems (and software) have become more complex, keeping these Mission Assurance best practices becomes more important, but the modern generation of developers sometimes loses sight of this. A good example of what I'm talking about is a program that I was peripherally involved with abo…

Do satellite embedded satellite systems usually have an OS these days? Is this a custom made OS, or do you have any examples of an OS that honors the no stack/heap and fixed address requirements you mentioned? What does the OS do? I don’t know about aerospace specifically, but plenty of embedded microcontroller systems don’t have an OS, and I would assume that having an OS is a massive risk against any mission assura…

It's a mixed bag. Some programs use Green Hills Integrity, some use Wind River VxWorks, some roll their own. I've done all of the above.

The main purpose of the OS is to centralize, schedule, and manage the resources needed for the mission. It's usually pretty lightweight. Different philosophies are used on different missions. The OS risks can be mitigated. Usually there's a backup "golden copy" OS that can boot if needed. There's also "Safe Mode", which prioritizes communications with the ground, so anomalies can be worked.

Re: The C++ standard for the F-35 Fighter Jet [video]

#397
post #371
post #365

Earlier quoted context omitted.

TL;DR Ada programmers were more expensive

Since when was expense a problem for defense spending? In the video, the narrator also claims that Ada compilers were expensive and thus students were dissuaded from trying it out. However, in researching this comment I founds that the Gnat project has been around since the early 90s. Maybe it wasn't complete enough until much later and maybe potential students of the time weren't using GNU? The GNAT project started…

Take a look at job adds for major defense contractors in jurisdictions that require salary disclosure. Wherever all that defense money is going, it's not engineering salaries. I'm a non-DoD government contractor and even I scoff at the salary ranges that Boeing/Lockheed/Northrup post, which often feature an upper bound substantially lower than my current salary while the job requires an invasive security clearance (my current job doesn't). And my compensation pales in comparison to what the top tech companies pay.

Re: The C++ standard for the F-35 Fighter Jet [video]

#398

Earlier quoted context omitted.

They need to have very strict security clearance requirements and maintain them throughout the life of the project or their tenure. People don’t realize this isn’t some little embedded app you throw on an ESP32. You’ll be interviewed, your family, your neighbors, your school teachers, your past bosses, your cousin once removed, your sheriff, your past lovers, and even your old childhood friends. Your life goes under…

I went through the TS positive vetting process (for signals intelligence, not writing software for fighter jets, but the process is presumably the same). If I were back on the job market, I’d be demanding a big premium to go through it again. It’s very intrusive, puts significant limitations on where you can go, and adds significant job uncertainty (since your job is now tied to your clearance).

And yet my experience looking at the deluge of clearance-required dev jobs from defense startups in the past couple of years is that there is absolutely no premium at all for clearance-required positions.

Re: The C++ standard for the F-35 Fighter Jet [video]

#399

Earlier quoted context omitted.

They could use 100% of Rust

No they could not. Rusts standard library heavily uses dynamic memory allocation and panics, for example. MISRA C:2025 Addendum 6 covers MISRA rules that still apply to Rust, as an example of how one would restrict Rust in safety-critical contexts.

In safety critical contexts, you're not usually using the standard library. Or at least, you're using core, not alloc or std.

Panics can still exist, of course, but depending on the system design you probably don't want them either, which is a bit more difficult to remove but not the end of the world.

I hadn't seen that addendum though yet, that's very cool!

Re: The C++ standard for the F-35 Fighter Jet [video]

#400

Earlier quoted context omitted.

Your points are correct, but recursion is banned anyway in safety critical applications. The main issue is determinism. The fact you have to use the stack for call stacks is correct OP seems misinformed.

You have to use the stack for procedure calls on x86/x86-64 CPUs, where the hardware enforces this. In most other surviving CPU ISAs the return address is saved in a register and it is easy to arrange in a compiler to use only procedure arguments that are passed in registers, the only price being paid for this being a reasonable upper limit for the number of parameters of a function, e.g. 12 or 24, depending on the n…

I honestly can't tell if you know a lot more than me or a lot less than me about how computers work... A couple of honest questions:

1. Where do you save the current value of the return address register before calling a function?

2. When parameters are "grouped into a structure" and the structure is passed as an argument to a function, where do you store that structure?

Post reply on HN