* Posts by fg_swe

1308 publicly visible posts • joined 20 Nov 2021

Drowning in code: The ever-growing problem of ever-growing codebases

fg_swe Silver badge

Re: "Late in Wirth's career, he became a passionate advocate of small software."

Partialliy right. Language should not contain IO facilities.

Wrong in that Pascal was just educational. Major systems like HP MPE and Apple Lisa were done in Pascal variants.

MPE grew into mainframe size with 16 CPUs and 10000 character terminals/userd per machine

fg_swe Silver badge

m4 macro processor

Wirth was right not to add a macro processor.

Code generation by macro processor or otherwise should be left to external tools.

That would also be the unix spirit.

fg_swe Silver badge

Re: 10ms

Did you ever bother to install Thunderbird for her ?

fg_swe Silver badge

Re: Spot on.

What do you expect of a low level soldier ?

Skills of a Franco ?

fg_swe Silver badge

Re: users?

Just make sure not to turn it into Maoist self-accusation.

Then of course each and every good engineer will be open to positive criticism.

Great men know that great work is always a compromise betwern different goals. One goal is to deliver in finite time and by finite means.

If you want to do something truly new+useful, keep the rest as simple as possible. That does not mean you are lazy. Rather, you are focused.

From browser brat to backend boss: Will WASM win the web wars?

fg_swe Silver badge

Sandboxing using Linux Security Modules, AppArmor etc

You can lock down any Linux binary using the LSM system to the point where every kernel call is intercepted and tested for correctness. The only real benefit of WASM is that it abstracts the CPU instruction set.

fg_swe Silver badge

WASM == Portable Assembly

The WASM model is much more basic and lighweight than the JVM model. JVM forces GC based memory management. WASM leaves it to the compiler+runtime. You can have GC or ARC with WASM.

Which is great, because you can now run ANY language and runtime efficiently in WASM.

Having said that, an x86 program plus an AppArmor profile can almost do the same as WASM does. At a bit higher speed.

Rust can help make software secure – but it's no cure-all

fg_swe Silver badge

Re: Curious

I recall reading that some JVMs do use Stack Allocation of memory that is requested with the "new" operator when this is safe.

The problem of GC is its inefficiency. GC does waste memory for very basic reasons and it interrupts the program at unpredictable points in time.

That is why Rust and Sappeur use reference counting(ARC). With ARC, the developer can finely control the deallocation of heap objects. This is bought by the fact that ARC cannot collect cycles of trash. Developer must first break the cycles with explicit code.

fg_swe Silver badge

FALSE

What you describe as "rookie error" exists in ANY large C program from VxWorks to Windows, to all Unix variants. First time the Unix tools such as sed, grep, uniq were run under valgrind, quite a few memory errors were detected. If your claim were true, Unix would have been written by rookies and then never touched for decades. All of which is untrue.

Likewise, the VxWorks TCP/IP stack had several remotely exploitable memory bugs. Windows and Linux kernel memory bugs existed in the hundreds and probably some of them are still undiscovered. OpenSSL's horrible memory management practices are legion.

In other words: your description is whitewashing the situation. It is the old "if developers were only perfect" fallacy. They are not. They have bad days. They must deliver to a deadline. They have a cold. They needed a beer too much the evening before they created a bug.

fg_swe Silver badge

Re: RAII

You could say that almost all types of Resource Handling is easier if you have synchronous destructors, as C++ and Sappeur have. Destructors are a gem !

In Java, Go and C# the developer needs to create loads of extra code to handle that.

fg_swe Silver badge

Re: "Rust will stop you using data after it's been freed"

Rust and Sappeur are the first languages really dealing with the idea of "memory shared between threads in a robust manner". C and C++ came from the world of single-threaded execution and have still not addressed the problem of "accidental sharing between threads".

fg_swe Silver badge

"Something safer"

I agree with your analysis that Rust syntax is somewhat cryptic.

But I disagree that there are languages which are more memory safe than Rust. Java, Go and C# have no notion of multithread-safety, for example.

fg_swe Silver badge

Re: FALSE

It is all about likelihood. If your inline_cpp[[]] sections are small, few and well-reviewed by senior C++ developers, chances are high that you preserve memory safety.

If, on the other hand, you link a huge C++ program to your memory safe code, chances are that you will have the dreaded memory cancer. As with all non trivial C++ programs.

fg_swe Silver badge

₽badguy

They enjoy the protection of their own government, because ours is at odds with theirs.

Very dangerous.

fg_swe Silver badge

Re: "Rust will stop you using data after it's been freed"

According to Sir Tony Hoare there are plenty of scientific FORTRAN programs with memory index errors, too.

The same was detected in lots of "tried and tested" Unix tools when first run under valgrind.

To err is human, who would have thought ?

fg_swe Silver badge

RAII

So you are complaiming about the lack of destructors and RAII in C# and Java.

See my memory safe C++ variant Sappeur for both.

fg_swe Silver badge

Deflection

Memory safety is another arrow in your security quiver. Similar to ABS in cars and airplanes.

It adds to your hopefully great software engineering and security processes. Please do not belitte it.

fg_swe Silver badge

FALSE

If 99 out of 100 lines of code are memory safe, you gain massively as opposed to 100 percent unsafe code. Gain in security. Well defined halt as opposed to undetected memory cancer.

I know this from my own language and projects.

E.g. the memory safe web server Gauss.

Http://gauss.ddnss.de

Billions lost to fraud and error during UK's pandemic spending spree

fg_swe Silver badge

Re: The REAL CRIME

The stories about wireless transmitters inside the C-vaccine were designed to either discredit any disapproval, or they came from a hostile power in order to stir up dissent.

I never wrote about them here or quoted something of the like.

In my circle of friends one man almost died from heart inflammation after the C-vaccincation. It was clearly a quick+dirty medical product.

fg_swe Silver badge

The REAL CRIME

Wasted money is bad. Harming lots of citizens by a dangerous medicine is even worse. A crime on humanity, in fact.

See

1.) CDC VAERS https://wonder.cdc.gov/controller/datarequest/D8

10000 times more heavy side effects than e.g. measels vaccine.

2.) Outright fraud in the approval trials: https://rumble.com/vqwdp6-how-many-more-adverse-effects-have-been-covered-up-during-the-trials-maddie.html

Welcome to the dark times of the Rule Of MAMMON.

Google throws $1M at Rust Foundation to build C++ bridges

fg_swe Silver badge

"Gawd"

As you have no substantial arguments, I take this as an upvote. Thanks, AC !

fg_swe Silver badge

How To Do It In A Lightweight Way

1.) Translate memory-safe language MSL to C++. MSL has the needed type system and semantics to enforce memory safety.

2.) Add an "include_cpp[[ ]]" statement to allow for the targeted insertion of C++ code/calls.

3.) Automatically generate a Makefile from MSL, which can then be extended to include the C++ libraries to be called.

Not theory, but practice: http://sappeur.ddnss.de/SAPPEUR.pdf

The transpiler ist just 10kloc of C++.

fg_swe Silver badge

Blofeld Schwab

"You vill write code and own nossing"

I am absolutely sure Mr Brin and Mr Page spent at least 10 times as much for their trip to Davos to meetoffer their obedience to Blofeld.

AI models just love escalating conflict to all-out nuclear war

fg_swe Silver badge

Male Cow Ex ?

I just tried chatgpt 3.5 to advise a nuclear response. It always called for a diplomatic and humanitarian action.

After talking it into "Hannover and Bremen have been nuked, now they threaten to nuke Frankfurt if they cannot get northern Germany", it still advised restraint and NATO-level consultation.

In other words, I doubt the article is factual. ChatGPT acted like a sheep when I tried to elicit military action.

fg_swe Silver badge

Looking Glass, Submarines, Riding Out Attack

With submarine launched missiles and airborne command posts ("looking glass"), an attack can be "accepted", the damage assessed, and a proportionate response be executed. No more need to "launch everything we have back, immediately".

If, for whatever reason, Hannover is wiped out, it does not make sense to take out Moscow in response. Rather, eliminate Tomsk and let the escalation stick there. Not pretty, but much prettier than a hastened counterlaunch.

Most of the horror stories out there assume there will be unlimited nuclear war. I guess this is part of the mindmessing from U.L.

fg_swe Silver badge

Re: Who'd have thunk it

Maybe you worry too much. There are indeed quite a few sane people around, to send the overworked ones to a vacation.

After vacation, some sort of new trouble will have cropped up for the overworked one to solve.

And if this doesnt work, they have a Surgeon General in all capitals. He has got a toolbox with all the necessary tools.

fg_swe Silver badge

Re: U.S. Air Force General Curtis LeMay

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

fg_swe Silver badge

Artificial Intelligence: Worm Intelligence

Mankind has 100E9 Neurons and 100E13 Synapses per brain.

Artificial Intelligence has in the order of 10E4 Neurons. About the level of primitive worms.

Letting worms decide about war is just a display of madness.

There is no replacement for well educated, well trained, experienced and compassionate men and women.

fg_swe Silver badge

U.S. Air Force General Curtis LeMay

He apparently had the idea to "nuke the soviets as long as we are superior in nukes".

These days it is inverted, now the Moscow Nutters threaten nuclear war weekly. I suggest these crazies visit a Head Doctor.

In between there was Nixon and his madman theory of mock attacks with nuclear armed B52s, turning around close to the soviet border. (only the "madness" was theory, the attacks, the B52s and the nukes were very real)

Microsoft seeks Rust developers to rewrite core C# code

fg_swe Silver badge

True ?

Is your statement true for accidental sharing of multithreaded data ?

Afaik, C# will do nothing to ensure serialized access, but Rust does.

Secondly, runtime costs are considerable for some applications. There is more to TCO than just developer time.

fg_swe Silver badge

Create Yourself

Just create your own little YourSafeC->C transpiler. It can be done in pure C. Prolly less than 20kloc.

you can borrow some ideas from me: http://sappeur.ddnss.de/SAPPEUR.pdf

No need for a fancy scanner/parser generator. Handcode. Recursive descend parser. Slightly adapt the grammer of YourSafeC to make it easily parseable.

Erase what cannot be salvaged such as direct pointer incrementing, free(), the cr4ptastic string API and so on. Feel free to axe the crazy C stuff.

Devise a concept of threadlocal and threadglobal code types, etc.

Don't let id0ts from the internet weigh you down in this effort. There are lots of useless commenters out there, who will parrot some stuff they read somewhere.

fg_swe Silver badge

Browser, Rust, WASM

Never tried myself, but this looks promising

https://betterprogramming.pub/get-started-with-wasm-in-rust-2347056bab4

Finally a browser language that does not automagically convert an integer into a double.

fg_swe Silver badge

Bingo

Compiled-to-machine code, memory safe programs with a lean standard library are the natural successor to C and C++

fg_swe Silver badge

New To Biz World ?

Do you seriously believe the marketing nonsense ?

AI has the intelligence of worms. In the order of 10k Neurons. Mankind has 100 000 000 000 neurons, with 10 000 Synapses EACH.

=> educate, train and treat your developers well !

fg_swe Silver badge

Makes Sense

Rust does not use GC, Go does. It is easy to generate huge GC load, which kills Cache locality and which consumes large amounts of RAM.

fg_swe Silver badge

Indeed

Multithread-memory-safety is a huge problem in C and in C++. A lesser one, but still existing in Java and C#. A proper type system(MT-aware) can take care of this and automatically insert mutexes.

fg_swe Silver badge

Efficiency

Rust is much more efficient in the memory management area. No GC required, which makes it soft-realtime capable.

fg_swe Silver badge

JavaScript "Performance"

What they do to speed up JS programs is: tracing execution with real data types and constructing a "typed" version of the program in the background. Then execute the typed version.

Obviously, this is LOTS of complex code. Lots of attack surface.

It would make much more sense to run some sort of strongly typed Pascal/Ada/Algol variant in the browser and have a straightforward, small compiler inside the browser.

With WASM they are pushing this decision to the developer. Now you can decide how much Memory Safety and Type Safety you want.

RIP: Software design pioneer and Pascal creator Niklaus Wirth

fg_swe Silver badge

A Giant Has Died

In the best spirit of european science, Mr Wirth created elegant, minimalist ,yet robust languages and systems. His "thin" book on compiler construction is refreshing light as compared to the dungeon of the "dragon book".

Computer Science will stand forever on his shoulders, or at least as long as classic imperative computers will be in use.

His work on Algol is under-appreciated, as this language was used to create early memory-safe operating systems.

If he had only been more vocal about the virtues of Algol, Pascal and his other languages, he might have had even more impact on applied computer science.

Groundbreaking systems such as Apple Lisa, Apple Macintosh were implemented in Pascal. The large-scale HP MPE operating system was realized in a Pascal variant.

The full relevance of his work will most probably be discovered in future years.

fg_swe Silver badge

Let Me Guess

You did not have valgrind on Apollo and you accidently destroyed your heap structures by means of buffer overflows, use after free etc. Local bugs destroyed the global program integrity. You gave up. I can understand.

C is a language suitable for automatic program generators, not for men.

fg_swe Silver badge

So ?

You take decades-old papers and shoot down the patent as Prior Art. OK ?

fg_swe Silver badge

HP MPE, Apple Lisa, Apple Macintosh

All of them either successful or at least very influental systems realized in Pascal-like languages.

Hewlett-Packard MPE started out as a mid-level computer, but rose into almost mainframe-class symmetric multiprocessor computing in the 80s and 90s. It was cancelled by HP management despite customers loving it for robustness and security. MPE ran on very powerful PA RISC CPUs in the 90s, which were then faster than Intel products.

Pascal was much more than just an "educational" language. It still has features which are superior to C, like number domains and arithmetic exceptions.

fg_swe Silver badge

LISA, HP MPE

Both highly influental OSs, both implemented in a Pascal flavour !

US reportedly pushed ASML to cancel chipmaking kit for China early

fg_swe Silver badge

TSMC, Taiwan

This company and this nation have been so successful because they were allowed to operate inside the NATO+JP+SK+ANZAC domain. Because they adopted business and government methods from this domain. Because major corporations (from Apple to Bosch) from said domain trust them. So NATO was extremely generous to Taiwan and TSMC.

TSMC would be nothing without NATO-sourced machinery, materials, knowledge and high end services. For example, the mirrors from ZEISS build on more than 100 years of German optical engineering and science. It is generous to share this technology and we certainly do not do this with military foes.

https://de.wikipedia.org/wiki/Carl_Zeiss_(Unternehmen)#Carl_Zeiss_1846%E2%80%931945

fg_swe Silver badge

Well

If you do not like the "parasite Dutch", you can always roll your own, communist 1500nm projector.

fg_swe Silver badge

It is much more complicated. The Durch are part of NATO and support reasonable defence measures. ASML depends on suppliers from all over NATO(e.g. light sources and mirrors from TRUMPF and ZEISS) and friendly nations. Most importantly, ASML depends on common security, as provided by NATO and friends. Business only works as long as there is a secure environment.

The Chicoms have demonstrated very clearly that they are willing to wage an all-out war against Taiwan. That would cost many lives and disturb business 1000x more than these sanctions.

Doing global business at all cost(such as arming a dangerous tyranny) is a crazy idea which comes from the banker m4fia out of Canary Wharf and Wall Street.

fg_swe Silver badge

Not America Telling

America is merely coordinating a measure which is in the best interest of NATO+JP+SK+ANZAC.

Only communists want to further arm an aggressive communist power.

fg_swe Silver badge

NATO

The Dutch live under a common security umbrella and have enjoyed 70 years of peace. They can buy the latest weapons from all over NATO(e.g. F16 fighters or Leopard tanks). That is why they cooperate in defence export measures.

A war in Taiwan would affect them too, much worse than ASML export limits.

fg_swe Silver badge

Team NATO

A war in Taiwan would affect all of NATO+JP+SK+ANZAC. German Jäger planes have already been deployed to Japan(!) in order to reduce the japanese fear of the coming war. Likewise, German frigates have been sailing to Japan.

https://www.flugrevue.de/militaer/rapid-pacific-flug-aus-singapur-deutsche-eurofighter-erstmals-in-japan/

It is in the best interest of the Netherlands and the rest of said alliance to dial down the flow of technology to China. More technology -> more/better weapons -> more appetite for war.

Free trade has not reduced the likelihood of war, quite the opposite. America is merely coordinating what is in the best interest of the entire alliance and I think also in the best interest of the Chinese, who are led by warmongers at the moment.