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?
The C++ standard for the F-35 Fighter Jet [video]
391–400 of 451 posts
Re: The C++ standard for the F-35 Fighter Jet [video]
#392The “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
Re: The C++ standard for the F-35 Fighter Jet [video]
#393A 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.
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]
#394Earlier 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.
Re: The C++ standard for the F-35 Fighter Jet [video]
#395Earlier 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…
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]
#396Earlier 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…
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]
#397Earlier 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…
Re: The C++ standard for the F-35 Fighter Jet [video]
#398Earlier 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).
Re: The C++ standard for the F-35 Fighter Jet [video]
#399Earlier 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.
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]
#400Earlier 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…
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?