Live data from Hacker News

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

youtube.com

361–370 of 451 posts

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

#363
post #301

Earlier quoted context omitted.

Ada and especially Spark makes it a whole lot easier to produce correct software. That doesn't mean it automatically leads to better software. The programming language is just a small piece of the puzzle. But an important one.

> Ada and especially Spark makes it a whole lot easier to produce correct software. Relative to what? There are formal verification tools for other languages. I have heard Ada/SPARK is good, but I do not know the veracity of that. And Ada companies promoting Ada have horses in the race. And Ada didn't prevent the Ada code in Ariane 5 from being a disaster. > The programming language is just a small piece of the puzzl…

> Ada didn't prevent the Ada code in Ariane 5 from being a disaster

That's a weak argument to say that Ada could not lead to a better place in term of software. It's like saying that it's not safer to cross at a crosswalk because you know someone who died while crossing on one.

(But I guess that's fair for you to say that, as the argument should probably be made by the people that say that Ada would be better, and because they made a claim without evidences, you can counterclaim without any evidence :-) )

There are no programming language that can prevent a software for working correctly outside of the domain for which the software is written, which was the case for Ariane 501. Any language that would have been used to write the same software for Ariane 4 may have led to the same exact error. Ariane 501 failure is a system engineering problem here, not a software problem (even if in the end, the almost last piece in the chain of event is a software problem)

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

#364
post #102

Earlier quoted context omitted.

If you have memory to spare and are using hardware with an MMU, you can remap your logical address to a different page. Linux can do this, but only for user memory.

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 assurance goals, no?

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

#365
post #321

Earlier quoted context omitted.

I've always strongly disliked this argument of not enough X programmers. If the DoD enforces the requirement for Ada, Universities, job training centers, and companies will follow. People can learn new languages. And the F35 and America's combat readiness would be in a better place today with Ada instead of C++.

> If the DoD enforces the requirement for Ada, Universities, job training centers, and companies will follow DoD did enforce a requirement for Ada but universities and others did not follow. The JSF C++ guidelines were created for circumventing the DoD Ada mandate (as discussed in the video).

TL;DR Ada programmers were more expensive

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

#366

Earlier quoted context omitted.

But Ada had for a number of years a mandate to require its usage [0]. That should have been an extreme competitive advantage. And even then, C++ is still used these days for some US military projects, like F-35. Though I don't know whether the F-35 is successful or not, if it is not, that could be an argument against C++. Ada is almost non-existent outside its niche. The main companies arguing for Ada appear to be th…

Poking around it looks like ada is actually the minority now. Everything current is either transitioning to c++ or started that way. The really old but still used stuff is often written in weird languages like jovial or in assembly.

Essentially the story of DoD mandates goes down to everyone getting waivers all the time and nuking the mandate.

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

#367
post #249

Earlier quoted context omitted.

The exact opposite of what you suggest already happened: Ada was mandated and then the mandate was revoked. It’s generally a bad idea to be the only customer of a specific product, because it increases costs. > And the F35 and America's combat readiness would be in a better place today with Ada instead of C++ What’s the problem with the F35 and combat readiness? Many EU countries are falling over each-other to buy it…

> What’s the problem with the F35 and combat readiness? For example, the UK would like to use its own air-to-ground missile (the spear missile) with its own F-35 jets, but it's held back by Lockheed Martin's Block 4 software update delays.

Also by the software being black box for everyone outside of USA / Lockheed-Martin.

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

#368

Isn't the F35 program considered a failure? Or am I confusing it with some other program?

I'm convinced this was a psyop actually, with the intent of delaying other country's 5th gen programs or development of quantum radars. It definitely had some cost overruns but I think its performance as a fighter is pretty impressive.

Criticism is fair however: they did probably extend themselves too far with the helmet technology, and I do have concerns about touch screens in cockpits (a touch screen requires you to take your eyes off of a target to move your hand to the right location, rather than locating a button by touch).

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

#369
post #198
post #19

Earlier quoted context omitted.

Open a file in the constructor, close it in the destructor. RAII with 0 allocations.

std::vector allocated and freed on the stack will allocate an array for its int’s on the heap…

Sure, but my point was that RAII doesn't need to involve the heap. Another example would be acquiring abd releasing a mutex.

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

#370

Earlier quoted context omitted.

there was a recent interview where andrew suggested if i understood correctly: the future path of zig is to make all compilations (successful or not) produce an executable. if theres something egregious like a syntax or type error, the produced artifact just prints the error and returns nonzero. for a "unused parameter", the compiler produces the artifact you expect, but returns nonzero (so it gets caught by CI for e…

Why would the compiler do that, instead of just printing the error at compile-time and exiting with a non-zero value? What is the benefit?

if you have a syntax error in file A, and file B is just peachy keen, you can keep compiling file B instead of stopping the world. Then the next time you compile, you have already cached the result of file B compilation.
Post reply on HN