Live data from Hacker News

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

youtube.com

411–420 of 451 posts

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

#411
post #306

Earlier quoted context omitted.

That sounds like your answer is: "Yes, global variables". That may be a perfectly good solution in many embedded environments, but in most other context's global variables are considered bad design or very limiting and impractical.

> global variables are considered bad design Global mutable variables, and they usually tend to be grouped into singletons (solving initialization issues, and fewer people bat an eye)

Even global mutable variables are a problem only because they lend to spaghetti code and messy state handling if you use them in multiple places. But you could just... make a global variable and then handle it like you would a variable init with malloc. No functional issue there.

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

#412
post #381

Earlier quoted context omitted.

The DOD could easily have organized Ada hackathons with a lot of prize money to "make Ada cool" if they had chosen to in order to get the language out of the limelight. They could also have funded developing a free, open source toolchain.

Ada would never have been cool. Ironically I remember one of the complaints was it took a long time for the compilers to stabilize. They were such complex beasts with a small userbase so you had smallish companies trying to develop a tremendously complex compiler for a small crowd of government contractors, a perfect recipe for expensive software. I think maybe they were just a little ahead of their time on getting a…

Out of curiosity:

1: If you had to guess, how high is the level of complexity of rustc?

2: How do you think gccrs will fare?

3: Do you like or dislike the Rust specification that originated from Ferrocene?

4: Is it important for a systems language to have more than one full compiler for it?

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

#413

Earlier quoted context omitted.

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?

Not OP, but presumably, the answers are: 1) You don't... hence, my question about no nested function calls. If you push it anywhere else, you can call it whatever you want, but you just re-invented the stack. I _guess_ you could do some wierd stuff to technically not get a stack, but... again, it's wierd. And for what, again? 2) Some fixed address. If you have for example: ```c typeRealBigStructure foo; void baz(type…

Ah, you're right, the struct case is actually pretty straightforward (especially since recursion is likely forbidden anyway), I just have trouble contorting my brain to such a different viewpoint.

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

#414

Earlier quoted context omitted.

Ada would never have been cool. Ironically I remember one of the complaints was it took a long time for the compilers to stabilize. They were such complex beasts with a small userbase so you had smallish companies trying to develop a tremendously complex compiler for a small crowd of government contractors, a perfect recipe for expensive software. I think maybe they were just a little ahead of their time on getting a…

Out of curiosity: 1: If you had to guess, how high is the level of complexity of rustc? 2: How do you think gccrs will fare? 3: Do you like or dislike the Rust specification that originated from Ferrocene? 4: Is it important for a systems language to have more than one full compiler for it?

Given how much memory and CPU time is burned compiling Rust projects I'm guessing it is pretty complex.

I'm not deep enough into the Rust ecosystem to have solid opinions on the rest of that, but I know from the specification alone that it has a lot of work to do every time you execute rustc. I would hope that the strict implementation would reduce the number of edge cases the compiler has to deal with, but the sheer volume of the specification works against efforts to simplify.

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

#415

Earlier quoted context omitted.

I fail to see how a warning doesn't achieve the same thing while allowing you to iterate faster. Unless you're working with barbarians who commit code that complies with warnings to your repo and there is 0 discipline to stop them.

> I fail to see how a warning doesn't achieve the same thing while allowing you to iterate faster. In almost every code base I have worked with where warnings weren't compile errors, there were hundreds of warnings. Therefore it just best to set all warnings as errors and force people to correct them. > Unless you're working with barbarians who commit code that complies with warnings to your repo and there is 0 disci…

> I work with a colleague that doesn't compile/run the code before putting up a MR. I informed my manager who did nothing about it after he did it several times (this was after I personally told him he needed to do it and it was unacceptable).

At this point what you need to do is stop treating compiler warnings as errors, and just have them fire the shock collar.

Negative reinforcement gets a bad rep, but it sure does work.

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

#416
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…

Since on paper government cares about cost efficiency and you have to consider that in your lobbying materials.

Also it enables getting cheaper programmers who where possible might be isolated from the actual TS materiel to develop on the cheap so that the profit margin is bigger.

It gets worse outside of the flight side JSF software - or so it looks like from GAO reports. You don't turn around a culture of shittiness that fast, and I've seen earlier code in the same area (but not for JSF) by L-M... and well, it was among the worst code I've seen. Including failing even basic requirement of running on a specific version of a browser at minimum.

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

#417
post #298
post #291

Earlier quoted context omitted.

But C-derived languages are also used much more. And it still shows that Ada does not automatically make software correct and robust. It presumably did indeed make Ada less popular than if it had not happened.

People still die in car crashes when wearing seatbelts, ergo seatbelts are useless.

[dead]

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

#418
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…

> Relative to what?

Relative to C++.

> There are formal verification tools for other languages.

None that are actually used.

I have no horse in this race and I have never actually written any Ada, but it seems pretty clear to me that it would produce more correct code on average.

Looking at the Ariane 5 error it looks like the specifically disabled the compile-time error: https://www.sarahandrobin.com/ingo/swr/ariane5.html

That's nothing to do with Ada.

Also asking for evidence is a red herring. Where's the evidence that Rust code is more likely to be correct than Perl? There isn't any. It's too difficult to collect that evidence. Yet it's obviously true.

Plenty of things are pretty obviously true but collecting scientific evidence of them is completely infeasible. Are code comments helpful at all? No evidence. Are regexes error-prone and hard to read? No evidence. Are autoformatters helpful? No evidence.

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

#419

Earlier quoted context omitted.

You’re confusing clickbait articles with reality. There have been over 1,200 F-35s built so far, with new ones being built at a rate of about 150 per year. For comparison, that’s nearly as many F-35s built per year as F-22s were built ever, and 1,200 is a large amount for a modern jet fighter. The extremely successful F-15 has seen about that many built since it first entered production over 50 years ago. That doesn’…

In many regards, the F-35 was the first aircraft explicitly engineered for the requirements of drone-centric warfare. Its limitations are that this capability was grafted onto an older (by US standards) 5th generation tech stack that wasn't designed for this role from first principles. I think this is what ultimately limited production of the F-22, which is not upgradeable even to the standard of the F-35 for drone-c…

This is simply not what happened historically.

Drones were not discussed much when the requirements for the F-35 were formed.

The F-22 was considered very open and upgradable for it's era. It's just that freakin' old where FireWire was the unproven new hotness.

Current AF efforts do focus on drone and loyal wingman concepts, but these don't have much material impact on avionics. There everything the AF is talking about is agility in deliverin capabilities through open systems architecture. That's why they're doing things like trying out k8s on military aircraft. It's not about drones specifically but things like delivering new EW capabilities in days or hours instead of decades.

For a dive on the latter stuff look into what Dr Will Roper was talking about during his tenure.

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

#420
post #381

Earlier quoted context omitted.

The DOD could easily have organized Ada hackathons with a lot of prize money to "make Ada cool" if they had chosen to in order to get the language out of the limelight. They could also have funded developing a free, open source toolchain.

> They could also have funded developing a free, open source toolchain. If the actual purpose of the Ada mandate was cartel-making for companies selling Ada products, that would have been counter-productive to their goals. Not that compiler vendors making money is a bad thing, compiler development needs to be funded somehow. Funding for language development is also a topic. There was a presentation by the maker of El…

Is the Gnat compiler not sufficiently free and open source? It does not fulfill the comment calling for "toolchain" however.

Edit: Thanks for that video. It is an interesting synthesis ad great context.

Post reply on HN