* Posts by fg_swe

1319 publicly visible posts • joined 20 Nov 2021

Is it time to retire C and C++ for Rust in new programs?

fg_swe Silver badge

Wrong

Even in the world of embedded control units, multiprocessing is already well established, even if most units are probably single core. Language support for multicore definitely makes sense.

In addition, memory protection units are considered a necessity in automotive, because of the lack of C memory safety.

fg_swe Silver badge

Yeah Sure

"Because you are not as big and fat as the incumbent, please don't dare to exist".

fg_swe Silver badge

So ?

You are making a drama because we cannot automatically convert all existing C and C++ code to memory safe alternatives ?

Did it ever occur to you that there are greenfield projects which do not have C or C++ dependencies ?

Every heard of incrementalism ?

fg_swe Silver badge

Thread Safety ?

How does modern C++ ensure there are no multithreaded race conditions, potentially destroying memory ?

Band aids such as heuristic static checkers do not count.

fg_swe Silver badge

Re: C++ and memory safety

I assume you are a good programmer and you just discovered one of the many memory safety issues of C++. Mr Stroustrup is not fully truthful in his claims, as far as I understand it.

Memory safety requires quite a few things and it requires a compiler to enforce it. But are incomplete with C++ at this point.

But very nice to see Mr Stroustrup sees a need to be memory safe, too. This validates my work and that of the Rust guys.

fg_swe Silver badge

In Aerospace

...I know of one project where they do not trust their compiler. They check the generated binary code against source, MANUALLY. They also do lots of automated static checking.

Project is rock solid and has almost 600 flying examples. No crash due to software yet. Unlike some others in the same business.

fg_swe Silver badge

Re: Unix Not Much Better

https://sel4.systems

https://hensoldt-cyber.com/2021/06/24/sel4-why-a-microkernel-system/

fg_swe Silver badge

Unix Challenges

I hear that there is a major government who though that using free Unixoids would be a sure way of protecting their strategic thoughts and decisions.

Turns out that they were wrong and their worst competitor government have them hosed.

And no, not Kongo or Zimbabwe.

fg_swe Silver badge

Re: Wait a minute ...

They know the Windows kernel is a huge security problem. They already had a memory safe OS in their research dept, but never made it a product.

https://www.microsoft.com/en-us/research/project/singularity/?from=http%3A%2F%2Fresearch.microsoft.com%2Fen-us%2Fprojects%2Fsingularity

fg_swe Silver badge

RAII ?

When an exception is thrown, all resources should be released by RAII. Ideally.

The resources you mentioned should all be wrapped in a class that will release them in the destructor.

fg_swe Silver badge

Your expletives give away your dishonesty.

fg_swe Silver badge

Re: My latest project

Given the catastrophic cyber intrusions, I would say it is legit to drum up memory safety as a premier countermeasure.

fg_swe Silver badge

Re: ...only if you want to rewrite all code that's currently written in these languages

There are alternatives to Rust, which deliver almost the same goodies without the things you criticize.

Indeed, one tool for one purpose. KISS.

See my other posts.

fg_swe Silver badge

Static Analysis

Every non trivial C project will have bugs that can be found using PC Lint, PolySpace, Coverity etc.

Rust has strong static analysis baked into the compiler.

You say you can replace that with step by step debugging.

Extremely weak reasoning, because some errors only manifest on "evil" input or they will at first not damage the memory bad enough so that you realize it in your debugging session.

Wherever it matters (aerospace, auto, trains, medical), static checking is now mandatory. It reaps lots of index and arithmetic errors in the code of experience software engineers.

Maybe you are in accounting ?

fg_swe Silver badge

Military Coding

Unfortunately, there are regressions in this community, such as using C++ in the JSF*.

Other projects, such as JÄGER90, still use Ada. Ada was once championed by the Pentagon.

seL4 is also sponsored by German, Australian and US governments, but still not used to the full possible extent.

*but I guess it is befitting to the high wing loading, another cr4p decision

fg_swe Silver badge

Multithreaded Race Conditions

Not addressed by the latest C++ standard. It can be handled by a proper type system and automatically generated runtime checks.

Proof: http://sappeur.ddnss.de

fg_swe Silver badge

RTOS Exploits

Just recently we learned that the TCP stacks of an RTOS would make things like medication pumps in hospitals exploitable. Some of these exploits would not work in Rust or Sappeur.

https://support2.windriver.com/index.php?page=cve&on=view&id=CVE-2019-12255

"doctors thought he would recover, but then he mysteriously died in intensive care"

fg_swe Silver badge

Re: Real programmers

You are talking to God. He has coded the universe in flawless C.

fg_swe Silver badge
Mushroom

Indeed

We can code everything in binary numbers. No need for newfangled things like Assemblers !

It will train your memory and maybe keep Alzheimers away !

fg_swe Silver badge

Unix Not Much Better

Being realized in C, being millions of LOC means it has exploitable bugs. Not as big/bad as Windows, but essentially the same disease.

See seL4 for a systemic fix.

Ex-Googler Eric Schmidt's think tank warns China could win global tech race

fg_swe Silver badge

World Leading Since 50 Years

https://de.wikipedia.org/wiki/Dornier_Do_31

https://www.youtube.com/watch?v=unRKKRZMAVI

https://www.youtube.com/watch?v=AzyYWytHnkU

Let the commies meet their misery.

fg_swe Silver badge

We Will Be Fine - Just Stop Decadence

NATO+SK+JP+ANZAC is the greatest empire that has ever existed. We are so wealthy that some of our citizens have become decadent crazies. Just get rid of the "man can be woman" decadence, be proud about your own people, be proud about your nation's achievements. Get rid of the Marxist Brainfucks* COMINTERN has tried to implant into our minds.

Get back to the basics - the traditional family and three children or more. Get rid of the decadent, sick individualism. Get rid of the rotten British cynicism masquerading as "funny".

Stop selling rope to our prospective enemies.

Don't offend and invade, "because we can".

Believe that your nation's gods will help you in time of need.

Then nobody can do anything to us. We have some technologies that lead the world since 50 years. Nobody comes close and if they don't believe it, they can get a black eye trying.

*listen to Mr Bezmenov on YT

Alibaba Cloud reveals billion dollar 'ecosystem upgrade'

fg_swe Silver badge

EuroCloud

Hetzner

1und1

T Systems

IONOS

OVH

https://european-alternatives.eu/category/cloud-computing-platforms

There is also Fujitsu, who are very interesting, because they design and build their own high performance systems, without Intel/AMD "management engine" inside. They also contain the remnants of ICL and Siemens Nixdorf. All of which were once non trivial computer companies.

Rust is eating into our systems, and it's a good thing

fg_swe Silver badge

Re: ALGOL, PASCAL, MODULA 2, ADA

BSD and Linux are given away for free.

fg_swe Silver badge

Can someone verify the correctness of the claim above ? I doubt it.

fg_swe Silver badge
Happy

Re: Romani ite dōmum

English is a good compromise between German and Latin, so we can live with it ?

It could be much worse, Finnish or Welsh ;-)

fg_swe Silver badge

ALGOL, PASCAL, MODULA 2, ADA

Algol/Algol mainframes is older than C and Unix. Arguably, this is the technologically more robust and more secure approach.

Unix was given away for "free", so it dominates to this day.

Windows is even worse, yet it dominates applied computer science.

If you really want to improve things, look here for inspiration:

https://en.wikipedia.org/wiki/Friedrich_L._Bauer

https://en.wikipedia.org/wiki/Niklaus_Wirth

https://en.wikipedia.org/wiki/Tony_Hoare

https://en.wikipedia.org/wiki/ALGOL

https://en.wikipedia.org/wiki/ICL_2900_Series

https://en.wikipedia.org/wiki/Modula-2

https://en.wikipedia.org/wiki/SPARK_(programming_language)

The greatness of European thought comes from intellectual honesty, not from sucking up to power.

fg_swe Silver badge

A Bit More Complicated

A lack of memory safety translates into exploitable weaknesses and therefore cyber security risks.

For some(many?) computer applications, this can have very real, deadly consequences.

Also, bankrobbers have programmers these days.

fg_swe Silver badge

Not True

The efficiency of C and C++ comes from things such as

+ Stack Allocation of complex data

+ Finely controlled heap allocation/deallocation (as opposed to stop the process GC)

+ Arrays of complex data structures (as opposed to arrays of pointers)

+ Call by reference

+ synchronous destructors

+ RAII

They can be realized in a rather straightforward manner in a memory safe evolution of C and C++.

Proof: http://sappeur.ddnss.de

In Rust We Trust: Microsoft Azure CTO shuns C and C++

fg_swe Silver badge

Do Yourself

Pick 30 Random CVE bugs and create the statistic yourself.

fg_swe Silver badge

You Mean The MCAS Certifiers ?

The people who don't know what they are doing ?

Relying on a single sensor to drive 100 people into the ground at a time ?

They would be offended by the keyword "Unsafe" ?

Surely, that would definitely matter. Not.

fg_swe Silver badge

C and C++: Same Weaknesses

Array Index Error

Use After Free

Invalid Pointer

Pointer to Stack

Invalid Free

Double Free

Unsafe Cast

Multithreaded Race Conditions (probably the worst of all)

Apparently Mr Stroustrup is also a Salesman, when he first claims that memory safety can be achieved, but then says there are no complete checking tools to assure this.

Here is a memory safe C++ variant: http://sappeur.ddnss.de

fg_swe Silver badge

Indeed

We really cannot live without all the undetected index errors and all the exploits.

Devices in hospitals and trains should always be exploitable.

fg_swe Silver badge

Memory Safe C++

Voila http://sappeur.ddnss.de

fg_swe Silver badge

FALSE

Java is a workhorse in commercial computing. Think of SAP, Android Apps, hundreds of thousands of corporate applications which run massive corporations with dozens of billions of revenue each.

.NET is the little brother of Java for Windows shops.

Memory safety has obvious economic and security advantages. The brittleness of C and C++ is a regression from the days of Algol already. Let's hope they will soon die off.

Oh, and there are also ADA, SPARK ADA, PASCAL and FORTRAN90. Highly reliable projects such as JÄGER90 flight control run on SPARK ADA. It would be a dumb idea to use C++, as they do in the joint stubby wings fighter.

fg_swe Silver badge

In Other Words

"Large C/C++ programs suffer from it and getting all the memory management right is nigh impossible"

In other words, Rust is the right approach, but you argue about Syntax.

The precursor is much more C++ like http://sappeur.ddnss.de

fg_swe Silver badge

FORTRAN, ALGOL, C, ADA, PASCAL

FORTRAN was the first language remotely comparable to the imperative languages of today. Then a committee built ALGOL. Two guys at Bell Labs invented C and Unix. In many ways inferior to ALGOL of about the same time. But Unix was "free", so it won over the commercial ALGOL mainframes. Now we discover the real cost of C programs.

fg_swe Silver badge

PASCAL

Still looking very good, after a very long time. Also, Algol now looks interesting again, as they already had some amount of memory safety.

fg_swe Silver badge

Well

Drones and satphones have played a role in Ukraine, but it seems the decisive thing were good old, secret training by Albion and arming them up to the teeth with modern infantry weapons. Playbook Afghanistan 2.0.

A people's infantery, not these SpecOps professional soldiers with long careers. Think of the LONGBOWMAN, just these days with FLIEGERFAUST and PANZERFAUST.

When will you join, Mr Mars ? Takes just a month to learn an ATGM.

When 2 000 000 Russians march west, we need the Landsturm, the Longbowman, whatever you want to call it.

fg_swe Silver badge

Pantheon Of Computer Scientists

Please also look at

WIRTH

HOARE

BAUER

and all the other Algol men. They knew about the need for memory and type safety for decades, if you listen to their speeches. Apparently they were not too much interested in drumming for their ideas, so applied computer science degraded into "free" Unix, instead of the much more robust Algol world.

fg_swe Silver badge

Well,

Look at the precursor, which is much more simple

http://sappeur.ddnss.de

fg_swe Silver badge

You discovered their deceptive marketing. Now look at what they claim in the bio virus "vaccine" business.

Secondly, all non trivial C or C++ based systems are chock full of memory bugs. That includes the Linux kernel, PCRE, PNG libraries, PDF readers and hundreds of other widely used packages.

fg_swe Silver badge

Last time I watched Elon's rockets fly back to base, I was impressed.

Also, I hear StarLink is creating real trouble for the Special Peace Operation.

fg_swe Silver badge

In Some Ways, Yes

Not biologically, but certainly from an engineering point of view:

https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/

Tony says that index checking should be done at runtime and that it is a very real problem in the world of real FORTRAN programs. What I infer from this is that software engineers in general are not perfect. Humans they are, not gods.

Also, Algol was already much better than C is to the present day. Cheap won out over proper engineering.

fg_swe Silver badge

F.U.D.

They say that "just" 70% of CVE bugs are eliminated by memory safe languages such as Rust, Swift or Sappeur.

Now you complain about the other 30%.

"I find airbags boring, they do not stop me from flying out of a curve with excessive speed".

Chromium's WebRTC zero-day fix arrives in Microsoft Edge

fg_swe Silver badge

Lack Of Memory Safety: The Gift That Keeps Giving

C and C++ should be phased out of any software engineering project which is exposed to external input and/or security-critical.

In other words C and C++ are shoddy engineering, we already had it better in the Algol Mainframes.

Here are the details: http://sappeur.ddnss.de/Sappeur_Cyber_Security.pdf

2050 carbon emission goals need nuclear to succeed, says International Energy Agency

fg_swe Silver badge

Back In The Rational World

..nuclear power has the lowest rate of victims per TWh of energy generated.

You can see why this is the case:

1.) Add up all the victims of Harrisburg, Chernobyl, Fukushima, Windscale,...

2.) Add up all the people burned to death in oil platform explosions, killed in coal mines, got cancer from the billions of tons of ash blown out by coal power plants.

3.) Add up all the people who died of the toxic fumes from solar cell production. Add the folks who died from the coal plants which provided the energy to create the solar cells.

Due to the extensive safety precautions, nuclear power is ALREADY the safest energy source.

https://www.zmescience.com/other/feature-post/safest-forms-of-energy-05022022/

fg_swe Silver badge

If you cannot handle truth and rationality, my condolences.

fg_swe Silver badge

Patriotic Energy Approach Links

https://de.wikipedia.org/wiki/Braunkohle (we have enough to power all of our needs for the next 100 years)

https://de.wikipedia.org/wiki/Synthesegas

https://de.wikipedia.org/wiki/Brutreaktor (burn the U238, which is 100x more abundant)

https://de.wikipedia.org/wiki/Fischer-Tropsch-Synthese

https://de.wikipedia.org/wiki/Kernkraftwerk_THTR-300

https://en.wikipedia.org/wiki/Underground_coal_gasification ( lots of coal beneath the north sea)

If only we used more than two brain cells, we could show the middle one to the commies and Mohammedic Oil Tyrants. I guess this is what happens when you betray your king.

https://de.wikipedia.org/wiki/Wilhelm_II._(Deutsches_Reich)

fg_swe Silver badge

COMINTERN BR4INF4CK

"Coal is evil"

"Uranium is evil"

"glue yourself to the autobahn to protest coal"

Meanwhile the COMINTERN power centers Moscow and Beijing build out their coal and uranium power generation. In parallel, they have accumulated the best part of the world's manufacturing capability. Manufacturing needs cheap energy. Also, the NATO banksters have enabled the selling of virtually ANY high tech the communists need.

Germany is especially stupid, KGB Colonel PUTIN has us at the balls after the MethanWende (sold as "EnergieWende" by our GREENIES).

Well done KGB, you are true masters of messing with other people's minds. May your wickedness one day be your downfall.