Arrggh! beware the upgrade...

Dec 19, 2023 Last reply: 2 years ago 136 Replies

That is hardly because of the language.

NVIDIA decided to leave C/c++ behind and use Ada/Spark instead (where Spark is a subset of Ada with proofs - that is mathematical proof that the code meets some criteria as in no runtime errors (given the hardware does not break)

formatting link

Some nice quotes from the paper

"Evaluating return on Investment (ROI) based on their results, the POC team concluded that the engineering costs associated with SPARK ramp-up (training, experimentation, discovery of new tools, etc.) were offset by gains in application security and verification efficiency and thus offered an attractive trade-off."

I think that is enough to counter your statement above. Besides, the Ada mandate was removed in the late 1990ites. The cost explosion you refer to is with c/c++. Not with Ada.

And this is a general feeling you get when using Ada/Spark

“It’s very nice to know that once you’re done writing an app in SPARK—even without doing a lot of testing or line-by-line review—things like memory errors, off-by-one errors, type mismatches, overflows, underflows and stuff like that simply aren’t there,” Xu said. “It’s also very nice to see that when we list our tables of common errors, like those in MITRE’s CWE list, large swaths of them are just crossed out. They’re not possible to make using this language.”

Once upon a time in a far far off country.... ...I was faced with replacing a rats nest of organically grown disco lighting wiring in a biscuit tin and ageing control units with some more up to date sequencers and audio responding drivers.

My boss was puzzled when I asked him for a hacksaw. 'What are you going to do?' 'Saw off d all those cables and put them into a documented junction box' 'Are you sure? ' 'Watch me'

And I did. Any wires that connected to no other wires at all, were simply tagged 'N/C' and every group of wires that had some sort of ohmic connection were afforded adjacent terminals in the junction box, and finally had mains applied very carefully to see what lit up...inside of

4 hours I had a fully documented junction box to connect the new lighting controllers to.

And then it was so easy to do that lasts part.

Winders is like that. They need to simply go around and *write down* every single call into windows, what it is supposed to do AND what it actually *does*, which is probably in itself a dirty man year of work for an intern, and then hand that specification over to a team of developers to recreate the API. Which could then be ported to any damned OS they chose, and by virtue of having been re written with modern tools would run like greased weasel s*it and could be ported to linux with minimal effort.

IF Windows wants to stay in the commercial desktop arena. In terms of computing for the numpties, Apple is the ultimate dumbed down consumer product, and they cant compete. Android and chrome also for smartphones and cheap laptops for school. Microsoft has no niche market anymore. It is trying to recreate itself as a cloud service, but I think that is a triumph of marketing over engineering. Its totrally loost out in the server market, and the industrial computer...today i'd use a Pi running linux rather than a PC running DOS to control some industrial process ... All it has left is gamers, and high power commercial and industrial *desktops* .

Many of the gamers are going STEAM and Linux as well...

...and technically, Linux is a better platform for mission critical computing *if only the power apps ran on it*...

Honestly, I am not sure what I would do if I was tech director at Microsoft, tasked with moving the company forward. Leave probably.

Or set up a skunk works of 20 guys and say 'document windows, and rewrite it to run on linux, so that any .exe will run on it at full native speeds as well as any linux program using (say) gnome graphics api instead of Windows'...

And go flat out to target high end workstations and really secure commercial applications like banking and finance.

And simply dump the numpties...

IBM reinvented itself as a software and services house when the integrated circuit meant any damned fool could build a mainframe or minicomputer.

IBMs mainframes today are PCS or blades running Linux... but they can still run RPG, and COBOL. And all those legacy apps.

I think Microsoft needs to do similar.

Yes, but in fact a whole swathe of NEW errors become possible, instead :-)

I certainly think C++ is an abortion that should never have been written, (and javaScript).

C is what it is. Fast way to write portable assembler code and as such deserves its cachets. And sufficiently powerful to write whole applications in, not just operating systems.

I am very dubious about languages that claim to solve coding problems. I think its always possible to write code that will fool any computer into doing the wrong thing at *some* level, and since software today seems to be a 'million monkeys randomly typing' ...I am sure they will find ways to f*ck anything up.

In my apprenticeship as an electronic engineer, I could not believe how thick the design and development techs actually were, The *system* was what produced the product quality- random monkeys would 'design' the circuits, and if they didn't meet the spec, the 'engineers' got it thrown back and would tinker along until it either worked or the project ran out of government funding (military electronics).

The problem with Microsoft, is that there is no incentive to meet a functional spec. Or be tested and upgraded and have bugs fixed. All it has to do is *sell*.

Compared with - say - the avionics industry there is zero quality control, in the ISO 9000 meaning of the word.

Even if they pay lip service to it.

Now what that means is that Microsoft is only really suitable for a consumer market.

However I digress. In that my thesis is that its not so much the language that you use, as the testing and quality control and feedback into the design revisions that you implement, that in the end gets the bugs down and the quality up, and that is something the Linux community is pretty *good* at. Although it has no formal quality control, more a culture of 'if its *demonstrably* broken, fix it, as a matter of pride and principle'.

If you look at - say aircraft - as the pinnacle of quality control, with every single incident subject to a 'what conditions, what pilots, what training, what maintenance (or lack of them) what design flaw, ultimately contributed to this situation' then you can see how the ultimate goal - that this situation never happen again. Ever.

They know there is no 'perfect' but by hammering away at the demonstrably *imperfect - be it design, implementation, operational procedures, maintenance, pilot training, air traffic training, aircraft performance and safety just keep getting better.

I see this as a dichotomy between 'we will sell lots of kit, because its bloody well designed' or 'we will sell lots of kit, because we will rush it to market, and spend all the money on chrome and tailfins, and other marketing, and the numpties will just buy it, because they are numpties'.

It's perfectly *possible* to write bug free programs in C. As the help I got here with my daemons memory leak demonstrated. Provided you test the code and analyse the problems that result.

Writing in some 'foolproof' language is no substitute for a proper testing and modification feedback loop to consistently test and improve the product, and the danger is that people will think that it is.

But they had that with Windows NT; perhaps they still have. Written by Dave Cutler of VAX/VMS fame, IIRC. But then they had to cripple it with the drive letter s*it and a file system that doesn't allow an open file to be moved or deleted. So even if they gave it Linux underpinnings, the user experience would still be dreadful. After all, it's their mindset. Look at the ribbon in Office apps, whose contents simply vanish if you make a window narrower. And you do have to make a window narrower if, like most actual users, you only have one screen.

In order to do that it would have to stand still for a year, I suspect that's not a possibility. AIUI the API changes to support application development. The organisational challenges would be minimising the API freeze period and a smooth cut over.

Yet Apple is also the choice of many software developers when corporate compliance/commercial compatibility is on the requirements list.

I've heard the idea of mathematical proofs of program correctness throughout my career, and never had any idea what it meant. I understand where it can't be done, like the halting problem, Godel etc, but not how it could be done.

I can write both programs and mathematical proofs. I don't know how to do either without flaws/bugs. Often I don't really understand the difference between a program and constructive mathematical proof. At the end of the day, it always seemed to me that once you got to a level of complexity, you couldn't really prove anything, couldn't be sure. All you could do is follow good practice, to minimise potential problems, and test, test and test again.

Automating programming, delegating complexity to the programming tools, memory management etc, always seemed to me the best way to avoid errors. Maybe also isolating complexity in standard components, standard patterns. Why people still use C is a mystery to me.

Those seem to be characteristics of the file system. I think the main crippling was done in NT 4.0 when they moved third party graphics drivers into the Kernel layer (whatever that protected level is called in Windows NT).

Although looking at support issues for the Arm Mali 610 on Linux, there is talk about userland (userspace?) hacks, which suggests the debate about where graphics drivers should live exists in Linux too.

I thought Windows NT was pretty good. You seem to be picking on GUI ergonomics as if that is a measure of OS quality. The noticeable difference between Windows NT and Linux for me was always driver support, in particular GPU drivers.

FWIW, Gnome Desktop + Pi OS on the rPi5 feels pretty solid, reminiscent of Windows quality.

I think you are concatenating three aspects of windows: The user interface of what Linux would call the 'window manager', the suite of admin programs it comes with, and the ability to provide a program launcher for .EXE style code.

Whether you call the file system '/' or 'C:' is really not an issue. You can map any amount of compatibility drive letters to Linux directories and volumes via a simple piece of shim code.

In my Windows VM. /home/me is mapped to a drive letter that windows programs understand. It works perfectly

I am not sure that anyone would bother to recreate the windows UI exactly, since it is as you say, utter s*it, and if all you want is a similar look and feel, then Mint MATE already has it, complete with control panels and file finders and a lot more.

I think, and this is a personal perspective you are free to disagree with, (and RK certainly does) that Microsoft's USP (unique selling point) always was that they provided a consistent API for manufacturers of third party code, not that Microsoft's code like Word/Excel/Internet Explode. control panel, registry and so on, or the way its window manager worked, was somehow superior.

And so, from a commercial perspective, that is what they want to continue with. And one of the possible ways to do that, its to write a pretty big shim that can take a .exe and make it work inside a linux window manager. On top of a modified linux operating system. (so that calls to e.g. D:\My Bollox maps to /home/My Bollox and so on) If they then want to write a s*it window manager themselves that has a unique MS look and feel they can also do that, but that is a separate issue. As is the provision of all the admin code that provides a pretty gui interface to set up and configuration.

Again from my perspective, Linux Mint MATE can be tarted up to look and feel massively similar to the last Windows I used - XP - (it does everything that XP does, better)

And unless you are deep in the hoopla of microsoft specific features of Word or Excel, then Libre Office and Firefox and Thunderbird are perfectly acceptable alternatives to the standard MS offerings

There is no reason not to duplicate the sheer turdity of The Registry, with a text file, and some API tools to access it. If your third party programs need it. Or the quirks of windows file sharing via a SAMBA shim.

The real question is whether or not that sort of thinking is happening in Microsoft at all. For far too long the assumption that 'if it's Microsoft (or INTEL), it will dominate the market ' has held sway and that arrogance has stopped any real innovation. Personally I think they have to change, or they will go the way of e.g. CP/M.

YMMV

Yes, because its a reasonable supported system, not because it has a great look and feel.

Remember that what an app developer wants is a stable supported program launcher ONLY.

But your point is good. Microsoft even faces competition in its core market

Yep doing both was a clever move on Apple's part. Admittedly it did take them a while to get round to putting a solid base under their pretty face but when they did they did it properly, unlike some.

Yep I know why I like them, but I still like a unix workstation better.

Absolutely no Ada programmer imagines for a nanosecond that it is "foolproof", or any kind of panacea. It is, however, a superb tool for writing reliable software, as is attested by a great deal of practical experience.

BTW, my KDF9 emulator, *available for the RPi*, is written in Ada 2012. See

formatting link
.

Or is it that the people who uses it also care deeply about reliable software, and have quality control systems in place and actually test their software?

Hear, hear.

Quality is irrelevant. Sales is everything.

That's called marketing, innit?

That's like that fellow who was asked why he robs banks. His answer: "That's where the money is."

Microsoft has no pride or principles. Only money.

Plus changes are made to make things safer, and as such are relatively infrequent and thoroughly thought out. They're not made just to keep up with the latest fad.

M$ vict^H^H^H^Husers must shoulder a lot of the blame. They're the ones who react to chrome and tailfins the way Homer Simpson reacts to donuts.

Someone once pointed out that it's possible to write FORTRAN in any language.

"Windows" and "quality" in the same sentence?

Sure, like "People's Democratic Republic".

Multiple reasons:

- practical difficulty of migrating a large codebase to a new language

- commercial difficulty of migrating to a new language

- resistance to change

- ignorance of C’s deficiencies

Some people like Linus Torvalds do not like object oriented programming. I am pretty sure he will never change his mind on that. On top of this there is historically a theoretical divide between functional and object oriented approach. Especially for hardware the functional approach seems to be rectified, however for GUI stuff etc. - it is masohistic thing (IMO).

Regarding "C’s deficiencies" I do not agree. It is rather the lack of programmers experience and complexity of the code that leads to such deficiencies.

The point is that it is perfectly possible to use the lexical constraints of C to write 'object oriented' code.

But it isn't forced on you as it somewhat is in C++.

To people like me who migrated from assembler to C, it was heaven. All of the power of assembler but with a neat logical way to express the more usual constructs. And local variables on the stack! Wow! clever stuff. Obviously you had to worry about not overwriting the stack return addresses though.

We didn't expect to have our bottoms wiped for us by the language. We were just happy to be able to write code 5 times as fast (the writing, not the code) as assembler.

Gosh, how macho! I bet you are really butch.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required