Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 9:06 am

ejolson,
Even if you don't use or want very much object-oriented programming, I suspect the difficulty is that a working C++ compiler needs to be able to create all those those data structures and objects, just in case, and this is not possible for certain classes of micro-controllers. Oh well, I read that people are working on adding a wrapper library to the Linux kernel that allows coding loadable modules in Rust.
Back in the day Dijkstra wrote his famous letter to the ACM: "Go To Statement Considered Harmful". His argument was not that GOTO was intrinsically a bad thing but that it made it easier for sloppy, lazy, programmers to create code that was a tangled mess that was impossible to reason about.

Linus Torvalds did not want to write his kernel in C++ or allow any C++ in it. When asked about that he will explain that it's because C++ OOP style and all the other features of C++ make it easy for sloppy, lazy, programmers to create code that was a tangled mess that impossible to reason about.

In effect he was saying "OOP Considered Harmful".

Oddly enough, I notice that recently people have started to come round to that idea. At least C++ style OOP.

Rust is perhaps the first language that is suitable for use in the kernel. Besides C of course. Personally I don't like the idea of mixing up different languages in a code base like the kernel. Especially since at the moment you would need both GCC and LLVM to build such a hybrid kernel and modules. That is a requirement to far...
Since a high-quality open-source optimizing compiler and operating system is a threat to the business model of hardware lock-in practiced by some manufacturers, those manufacturers have become generous with funds and manpower for improving the tool chain to the point it become so complicated it can no longer be retargeted easily to new computer architectures.
Luckily we have two gigantic vendors who have a vested interest in their compilers producing efficient code. Both for two different architectures, x86 and ARM. Hence they both put so much work into LLVM. Which has the happy side effect of making it easy to reuse all that work to target other architectures, like RISC V.
Some time ago there was a thread about creating a new compiler for the Raspberry Pi simple enough that a single person could write it as well as audit it for security issues.
Yeah, where did DavidS get to?

In this marathon series of live streamed coding by Per Vognsen, bitwise: https://www.youtube.com/watch?v=Oeqeqw4OHPE&t=5s, he writes a compiler for a language, Ion, which is basically C but with it's syntax streamlined to make it easy to write a compiler for.
Along similar lines, some blogger recently noticed...
Interesting article. He says sch things as "How much better could things actually be if we abandoned the enterprise development model?"

He's only a couple of decades behind the times. Such thoughts have been discussed since before the Linux kernel was a thing and Open Source was "invented".
Memory in C++ is a leaky abstraction .

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 1:00 pm

LdB wrote:
Fri Jan 10, 2020 1:48 am
Heater wrote:
Thu Jan 09, 2020 7:18 pm
I did not understand that part about embedded CPU vendors. I see no reason they cannot be supporting the latest GCC / LLVM and C/C++ standards.
OOP as is mandated by C++ is a drop dead on many microcontrollers.
But no one is running those compilers on those micros. The only need is to build C compilers used to cross-compile code for those micros.

Isn't any C++ requirement purely needed for compiling the C cross-compiler ?

I am beginning to think that when I said I comprehended the problem I hadn't.

For example I can build the latest Pi/ARM GCC from source on my Pi. I can then compile the latest GCC C compiler source with my Microchip/Atmel/VC4/RISC-V/etc code generator patches using that. End of the day I have the latest GCC C cross-compiler for whatever I code generate for.

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 1:48 pm

Heater wrote:
Fri Jan 10, 2020 9:06 am
In this marathon series of live streamed coding by Per Vognsen, bitwise: https://www.youtube.com/watch?v=Oeqeqw4OHPE&t=5s, he writes a compiler for a language, Ion, which is basically C but with it's syntax streamlined to make it easy to write a compiler for.
That's pretty much the model for any 'invent a new self-bootstrapping programming language in a day' venture. Define the new language to be as simple as possible, only supporting the bare minimum to make it usable - Integer and one dimensional integer arrays only, char is integer. Only globals, no locals, no functions, only subroutines, no subroutine parameters. Only IF-ELSE, WHILE-DO and subroutine calls. Plus some file handling, to read a byte, write a byte.

Using any existing language, write a compiler which can convert source in the new language to executable code. Only use things within the compiler which the invented programming language supports, so the only difference between the two is syntax.

Hand or machine translate the compiler to the new language. Compile that and one should then be able to continue developing in the new invented language using the compiler executable just built.

It's then ongoing one-two steps of adding support for something to be added in the new language, compiling the compiler to support it, then updating the compiler source to use it.

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 5:09 pm

jcyr wrote:
Fri Jan 10, 2020 3:47 pm
The modern notion that everything should be simplified (dumbed down) in order for all to understand and navigate, is a crock
You might be right, but what about that skunkworks project which just received funding from GCHQ to develop a mirai-bug-free firmware for straw-fiber routers? They are using Scratch, now ranked 5 slots on TIOBE above Rust, so everyone and their cat can audit the code.

My claim, though perhaps not clear, was concerning the importance of a compiler simple enough that it is at least humanly possible to audit for correctness. Such a tool would be useful for confirming the correctness of executables produced by complicated optimising compilers, to guard against the unwitting propagation of supply-chain malware and to create a secure environment in which to develop and bootstrap more advanced software.

As far as I can tell, with the notable exception of neural-networks, software does not become more reliable as complexity increases. This, in my opinion, is likely one of the reasons C is still as popular as it is.

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:05 pm

hippy,
I am beginning to think that when I said I comprehended the problem I hadn't.
I think you comprehend the situation very well.

C++ is quite usable for programming micro-controllers. As the experiment I described above demonstrates it can generate exactly the same code for the same functionality as if one had written it in C.

ejolson is right in that one probably does not want to be using exceptions or perhaps virtual method dispatch. But heck if you were doing that in C then C++ could probably do it better.
That's pretty much the model for any 'invent a new self-bootstrapping programming language in a day' venture. Define the new language to be as simple as possible, only supporting the bare minimum to make it usable - Integer and one dimensional integer arrays only, char is integer. Only globals, no locals, no functions, only subroutines, no subroutine parameters. Only IF-ELSE, WHILE-DO and subroutine calls. Plus some file handling, to read a byte, write a byte.
That pretty much describes the toy language I defined and wrote a very simple compiler for years ago after being inspired by Jack Crenshaw's "Let's build a compiler" articles.

I did not get as far as arrays but I did have local variable, signed and unsigned bytes words and longs (8, 16, 32 bit). I had 'if', 'while', 'for' and functions. It generated grossly inefficient code for x86 and Parallax Propeller MCU.

It occurred to me that I could continue iterating on that as you describe and build an ever more capable language that compiled itself. But hey, life is too short for that and I was happy as a sandboy that I could convert text into executable code. Job done.

It occurs to me recently that if ones aim is to build a compiler for a language that can bootstrap and host itself then modeling the language after C/Pascal etc is the wrong way to start. When building a compiler the input is a string, a lot of processing is all about symbols, stings, the output is likely assembler language, more strings. Why not design that ultra simple base language to only have one data type strings? Well, characters as well I guess. One can always do arithmetic on numeric strings.
Memory in C++ is a leaky abstraction .

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:07 pm

jcyr,
I'm here to dispel the myth that C++ cannot provide efficient and clear solutions targeted to embedded and micro architectures.
Exactly.

If you scour YouTube you will even find a presentation by a guy demonstrating how he programmed a 6502 in C++.
Memory in C++ is a leaky abstraction .

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:17 pm

ejolson,
what about that skunkworks project which just received funding from GCHQ to develop a mirai-bug-free firmware for straw-fiber routers? They are using Scratch
Do you have a link to that? It's the most bizarre thing I have heard this year.

I would not put to much weight on what GCHQ does. They even paid me to write code for a crypto project years ago. Oh, I'm not allowed to talk about that.
As far as I can tell, with the notable exception of neural-networks, software does not become more reliable as complexity increases.
I'm sure that is true.

I'm not sure neural-networks are an exception. The were many articles out last year discussing how unreliable they are. Nobody knows what they are doing anyway.

The most complex neural networks I'm aware of are those in the human brain. Which in my experience is anything but reliable. Especially my own personal neural network (PNN). I can never tell what dumb idea that thing is going to think next, or if it is going to remember the right thing at the right time. It's not even a good calculator. It takes longer and longer to boot up in the morning as the years go by. Hopeless.
Memory in C++ is a leaky abstraction .

emma1997
Posts: 581
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:38 pm

Heater wrote:
Fri Jan 10, 2020 2:30 am
LdB,
OOP as is mandated by C++ is a drop dead on many microcontrollers.
OOP support adds major complexities the concept of the self pointer, virtual method table and object code and data blocks.
I guess it depends on how much OOP you want.

Zero is a nice number for me. I HATE the stuff! At least for most of what I do. Forced to use it (Java, JS, Lua, Python, C++, etc) but don't have to like it.

They don't call it OOPS for nothing!
jcyr wrote:
Fri Jan 10, 2020 3:47 pm
I'm here to dispel the myth that C++ cannot provide efficient and clear solutions targeted to embedded and micro architectures.

The modern notion that everything should be simplified (dumbed down) in order for all to understand and navigate, is a crock of sh&t.

Complicated things are... well, complicated (as in harder to understand)!
Contradiction? OOPS are both complicated AND dumbed down. Each in the worst way possible. Just plain nasty. I love the way fans try to convince there is no bloat or obfuscation at all. Like the guys who say ASM has no size or performance benefit over HLL. lol

Hey Heater,
Have you considered going back to 'proper' quoting instead of that creative shortcut? Makes it difficult to verify and hard to see who you refer to and big trouble trying to quote your quotes. Sometimes takes more than a few PREVIEWs to get it right.

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:45 pm

jcyr wrote:
Fri Jan 10, 2020 6:25 pm
ejolson wrote:
Fri Jan 10, 2020 5:09 pm
As far as I can tell, with the notable exception of neural-networks, software does not become more reliable as complexity increases. This, in my opinion, is likely one of the reasons C is still as popular as it is.
There is no doubt that complexity increases the chance of errors. But one must distinguish between complexity of problem and complexity of the language used to solve it. A complex problem, with a complex solution, is more likely to contain errors regardless of the language used.

As for CGHQ using Scratch... It's got to be a joke... You can always count on the Brits! :D
My guess is that the router project is a spin-off from

https://www.gchq.gov.uk/information/octapi-goes-school

The main difficulty, aside from the use of Scratch, seems related to maintaining a quantum-coherent state along a fiber made of straw, especially as that orange cat keeps winding it up into a ball and choking on it.

As for booting a neural network in the morning, I find unsweetened Mayan-style chocolate drinks work better than coffee. My stomach, however, dictates turmeric be substituted for the chillies, which seems a reasonable trade.

As this thread hasn't been moved to off-topic yet, I wonder how difficult it would be to write an IOT chocolate-drink making program in C so a Raspberry Pi could automatically boot the neural network in the morning.

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:50 pm

jcyr,
Proof of correctness is incredibly hard to achieve even for simple algorithms. I don't believe any compiler will ever be proven correct.
You remind me. Years ago on that crypto project GHCQ wanted us to run our source code through some analysis tool called MALPAS. I don't know what level of sophistication MALPAS had achieved at the time, it was before any of the projects that used MALPAS mentioned here: https://en.wikipedia.org/wiki/MALPAS_So ... is_Toolset

So I set about trying to do that.

Were were using Intel's PL/M 86 language. It turned out MALPAS could not digest our source at all until I made some tweaks to it.

I made the observation that this was totally pointless, the code it was then analyzing was not the same code would be running.

That was the end of the requirement to use MALPAS.

They did though have folks look over the assembler generated by the PL/M compiler to check nothing untoward was going on.
Memory in C++ is a leaky abstraction .

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 6:57 pm

jcyr wrote:
Fri Jan 10, 2020 6:54 pm
emma1997 wrote:
Fri Jan 10, 2020 6:38 pm
OOPS are both complicated AND dumbed down. Each in the worst way possible. Just plain nasty.
Ok, we've got your opinion. Would you care to substantiate it with facts or examples?
Why spoil a good rant with facts ?
No one else has provided any any so picking on someone who disagrees with you is rather transparent !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 7:34 pm

jcyr wrote:
Fri Jan 10, 2020 7:03 pm
PeterO wrote:
Fri Jan 10, 2020 6:57 pm
No one else has provided any any so picking on someone who disagrees with you is rather transparent !
Actually, I did provide a factual example of a high performance embedded application implemented in C++.
I would never use high performance and cable modem in the same sentence. But I suspect the lack of performance here is related more to marketing strategies by communication companies rather than any specific property of C++ being unfit for purpose.

As a C programmer, I've always wanted to like C++. However, except for a certain program that computes big Fibonacci numbers using an operator-overloaded arithmetic object based on the Karatsuba algorithm

https://github.com/ZiCog/fibo_4784969/t ... er/c%2B%2B

I've never seen a truly useful example of object-oriented programming.

I suspect one reason for this, other than spending too much time grading C++ programs written by CS students, is that C++ was designed for creating graphical interfaces and the only GUI I ever found useful was named xterm.
Last edited by ejolson on Fri Jan 10, 2020 7:35 pm, edited 1 time in total.

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 7:35 pm

emma1997,
I love the way fans try to convince there is no bloat or obfuscation at all.
I am no fan of OOP or any particular language much. But there is provably no bloat involved in using classes and objects in C++ over doing the same thing in C. As I said above, I once made an example of such in C++ and C and the generated code was byte for byte the same. Sadly I don't have that example anymore.

The issue with OOP in C++, as far as I can tell, is that C++ gives one a lot of low level facilities to do OOP but it can be used in a really tortuous, unintelligible and unmaintainable way. It has been misused a lot. Like goto in other languages. There are whole books on the subject.

If you want evidence as to how efficient C++ can be, check out this micro-controller project: http://cliffle.com/p/m4vga/.
Like the guys who say ASM has no size or performance benefit over HLL. lol
No LOL about it.

It is very hard for a human programmer to write assembler that can beat the optimizations of a modern day compiler. Impossible for large projects.

Even if they pull it of they will be dismayed when a new architectural feature arrives that a quick recompilation can make use of and produce superior performance.

And then, if you want the code to run on a different architecture, say ARM instead of x86, the performance of assembler drops to zero.

Really there is no competition.

Last year a forum member was making similar assertions as to the performance benefits of assembler. We arrived at a simple challenge task that we could all code up in our preferred language so that he could demonstrate his point. He dropped out of the race.

If you like we can have a little HLL vs assembler challenge so that you can prove your point. Nothing too complicated or time consuming to write.
Hey Heater,
Have you considered going back to 'proper' quoting instead of that creative shortcut?
Probably not. Eliding fluff and quoting the main point has been a common practice since forever. Saves a lot of wasted space.

Which quote is giving you problems in particular? I don't intend to change the meaning of anything anyone has said.
Memory in C++ is a leaky abstraction .

User avatar
rpdom
Posts: 16311
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 7:41 pm

Heather wrote:
Fri Jan 10, 2020 7:35 pm
Which quote is giving you problems in particular?
I don't think it is about the contents of the quotes, just attributing them correctly to the quotee.

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 7:47 pm

rpdom,
I don't think it is about the contents of the quotes, just attributing them correctly to the quotee.
Ah, I see.

I normally address my replies to the person whose post I'm replying to. By putting their name at the top. As in this post.

As such including their name in all the their quotes is redundant. A waste of space. Is it not?

Is there a case where I failed to do that?
Memory in C++ is a leaky abstraction .

emma1997
Posts: 581
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 7:47 pm

jcyr wrote:
Fri Jan 10, 2020 6:54 pm
emma1997 wrote:
Fri Jan 10, 2020 6:38 pm
OOPS are both complicated AND dumbed down. Each in the worst way possible. Just plain nasty.
Ok, we've got your opinion. Would you care to substantiate it with facts or examples?
I love the way fans try to convince there is no bloat or obfuscation at all.
Not sure what you mean by obfuscation in this context. Bloat... Only a poor carpenter blames his tools.
Like the guys who say ASM has no size or performance benefit over HLL. lol
It actually doesn't, for anything other than trivial problems.

Admittedly an opinion so less need for hard facts. But the OP indicating Language Of The Year was not OOPs and hasn't been for decades is a hint.

Certainly has a place but not often in MCU world where I live. Some of my peers working in teams on business and medical systems would not be well advised to employ GWBASIC or ASM. Maybe Pi stuff lies somewhere in between.

I think we may have had similar discussion before. Did you have an avatar photo once upon a time? Reading your posts, like most here, much smarter and definitely more experienced than me in so I will again bring up the concept of Reverse Kruger-Dunning. Often we assume others have same IQ and experience or just showing off. I suspect you might consider manned mars flight or new Windows level OS from scratch to be 'trivial problems'. :)

Most of my programs a few hundreds lines or there about and compile to few kbytes so we are not on the same level. However I will say a few creations did make it to market. One interpreter I wrote for AT90S1200 (look up resources on that puppy!) sold hundreds of thousands. A few not quite so successful but still...

I'm not even going to bring up the subject of what we do for FUN. There are those here who enjoy the challenge of new language just for the sake of new language. The more complicated and obscure the better. Used to be me but not anymore. I'm not even going to mention that hobby aspect. lol

So we will have to agree to disagree on the meaning of 'trivial'. In any case worth mentioning again that Programming Language of the Year 2019 was not Java or Python or C++ or...

PS above rpdom quoted heater as heather. Hahaha, I wonder why?

emma1997
Posts: 581
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 7:54 pm

Heater wrote:
Fri Jan 10, 2020 7:47 pm
I normally address my replies to the person whose post I'm replying to. By putting their name at the top. As in this post.

As such including their name in all the their quotes is redundant. A waste of space. Is it not?

Is there a case where I failed to do that?
Yes. It's often not clear whether you are addressing somebody or labeling a quote source. I find it much easier (and clearer) to just hit the quote button. Then you don't need to type anything extra. And that red stands out. IMO this is one of the better formats for that.

Another big subject of discussion online is to put the reply before or after the quote. I see a clear best practice for this but not all agree. However if these are the biggest things to worry about here we're doing ok.
Last edited by emma1997 on Fri Jan 10, 2020 8:01 pm, edited 2 times in total.

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 8:01 pm

ejolson,
As a C programmer, I've always wanted to like C++.
Amen brother.

I have come to the conclusion, after all these decades, that it was not me missing the point. I rarely even need OOP and the complexity of C++ is insane.

I'm with Occam and his razor. Why would I introduce all that ontology into my programs when it is not required?
However, except for a certain program that computes big Fibonacci numbers using an operator-overloaded arithmetic object based on the Karatsuba algorithm

https://github.com/ZiCog/fibo_4784969/t ... er/c%2B%2B

I've never seen a truly useful example of object-oriented programming.
Wow, thank you.

I'm sure most C++/OOP gurus would sneer at that code as being a horrible hack!
Memory in C++ is a leaky abstraction .

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 8:12 pm

emma1997 wrote:
Fri Jan 10, 2020 7:54 pm
Yes. It's often not clear whether you are addressing somebody or labeling a quote source.
I would never have suspected that is not clear. All my life we have been starting notes and letters and emails with the name of the person we are addressing.

As it happens, it's both, addressing someone and by implication labeling their quotes.
emma1997 wrote:
Fri Jan 10, 2020 7:54 pm
I find it much easier (and clearer) to just hit the quote button. Then you don't need to type anything extra. And that red stands out. IMO this is one of the better formats for that.
You mean like that?

That is hard work. I have to remove the quote from me you have in your post. Then I have to remove those parts of your post I'm not replying to so that what I say makes sense under it. Then I have to split the thing up and add extra quote tags.

Don't like it.

It goes much easier on other forums where you can highlight part of someones text and hit the 'quote' button that pops up, it then opens a reply message box with that part in there as a quote. One can then do the same to pull in other quotes to the same reply.
Memory in C++ is a leaky abstraction .

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 8:27 pm

Heater wrote:
Fri Jan 10, 2020 7:35 pm
Last year a forum member was making similar assertions as to the performance benefits of assembler. We arrived at a simple challenge task that we could all code up in our preferred language so that he could demonstrate his point. He dropped out of the race.
On the other hand, since that challenge involved a well-known problem for which an assembly-optimized subroutine library called GMP already existed, it's also worth mentioning that GMP was more than an order magnitude faster than any of the hand-coded solutions written in higher-level languages.

One forgets, sometimes, when using a high-level language the crucial role optimised assembler plays behind the scenes in standard runtime and subroutine libraries. For example, every time a 64-bit division is performed by a C program compiled using the default installation of gcc on Raspbian, a call is made to an ARMv6-optimised assembler routine in the runtime. What's interesting in this case is the significant performance increase that results by rebuilding the complier to use an ARMv7-optimised assembler runtime. On the other hand, if the 64-bit division had been directly coded in C using 32-bit shifts and additions, it would run much slower. Of course switching to 64-bit mode is also possible, however the focus here is on the important role assembler plays behind the scenes in all software.

Other examples of subroutine libraries containing hand-optimized assembly include FFTW, OpenBLAS, OpenCV, Intel Math Kernel Library, Boost, IBM ESSL, MPrime, Atlas, FFmpeg and almost every other library important enough to be used by many people.

It's fine to focus on writing high level code, but it is dangerous for a politician who uses a car and mobile phone every day in a country protected by a military based on technology to be advised by an expert who discounts the importance of training assembler programmers needed to accomplish really important stuff.

jahboater
Posts: 5171
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 9:06 pm

ejolson wrote:
Fri Jan 10, 2020 8:27 pm
One forgets, sometimes, when using a high-level language the crucial role optimised assembler plays behind the scenes in standard runtime and subroutine libraries.
That may decline.

Recently some functions in the C math library (that were written in assembler) have been re-written in C.
This was done for speed, but has the obvious side benefit of easy maintenance and portability.
Compiler technology has moved on since those routines were written.

emma1997
Posts: 581
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 9:07 pm

Heater wrote:
Fri Jan 10, 2020 7:35 pm
Last year a forum member was making similar assertions as to the performance benefits of assembler. We arrived at a simple challenge task that we could all code up in our preferred language so that he could demonstrate his point. He dropped out of the race.
Reminds me of a contest I started on Freaks about 15-20 yrs ago at the start of the AVR revolution. Top hotshots there made similar claims and I posted a single word Avrasm program to blink an LED. They did get very upset and cried CHEAT but never managed to come even one order of magnitude close with Winavr or any other HLL. Still to this day all of them stay dropped out. Of course the smartest ones never entered the race to begin with.

Many years later on an RC forum similar challenge with same result. People a lot more experienced than me took up a the challenge. In fact I was able to beat the others at their own game using their fav flavor of GCC. Unfortunately they were not privy to exotic compiler directives that allow cutting startup and other crappy bloat that I encountered in my work with Optiboot toolset. So again I prevailed but this time code 100x bigger than blink.

Admittedly ASM is not practical for most application in general these days. Mainly because KISS principle has fallen to the wayside in modern times (along with objective truth as predicted by Orwell).
Last edited by emma1997 on Fri Jan 10, 2020 9:16 pm, edited 1 time in total.

emma1997
Posts: 581
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 9:19 pm

Totally true. Even faster is to cap the competitors chip and cook that lock fuse. Then crank them out like cookies. Just ask Shen Zhen IP Incorporated. lol

Heater
Posts: 14684
Joined: Tue Jul 17, 2012 3:02 pm

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 9:42 pm

emma1997,

I like your AVR example. A fine example of the awesome power of assembler.

Some years ago, just for giggles, the first program I wrote for the Parallax Propeller MCU was an emulator for the Intel 8080. Which in turn ran the CP/M operating system. Now, the Propeller is a weird machine, it has eight 32 bit cores, but you can only run native instructions from a 512 word memory/register space in each core. The challenge then was then to write the entire 8080 instruction emulation in 512 words. Amazingly I pulled it off, except for the DAA instruction which is quite big and complicated and I had to handle it with a kind overlay. Luckily DAA is never used in CP/M software so at the end of the day the whole thing ran almost as fast as the original 8080.

It made it to hackaday: https://hackaday.com/2009/12/27/zilog-in-a-matchbox/ where it is shown running on a tiny Propeller board. The smallest CP/M system in history!

Later it expanded to a Z80 emulator.

>> Mainly because KISS principle has fallen to the wayside in modern times (along with objective truth
>> as predicted by Orwell).

On the other hand KISS for me is the simplicity that HLLs offer by not having to do all that repetitive book keeping and paying attention to detail that I have to do in assembler. The simplicity of moving my code from architecture to architecture. The simplicity of people being able to read what I write and have some chance of understanding it in reasonable time. Including myself :)

I agree, though, I always have the sneaking feeling there is a lot of complexity in our systems today that need not be there. I can never quite put my finger on what it is exactly though. I'd start by removing Unicode and X Windows.

P.S. How do you like the old school quoting above? :)
Last edited by Heater on Fri Jan 10, 2020 10:41 pm, edited 1 time in total.
Memory in C++ is a leaky abstraction .

emma1997
Posts: 581
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Programming Language of the Year 2019 - according to TIOBE

Fri Jan 10, 2020 10:36 pm

Heater wrote:
Fri Jan 10, 2020 9:42 pm
emma1997,
I like you AVR example. A fine example of the awesome power of assembler.

P.S. How do you like the old school quoting above? :)
Cool, but I never said "I like you AVR example." which could be reply or quote (can't always make out that lite grey background ). Hey, we all have our own technique and I guess it's what makes these posts so distinctive. I.E. can tell one of yours from a mile away these days with the missing red quote link. lol

I am still obsessed with vintage 8080 and Z80 tech. Built and sold several Altair 8800 replicas (some aluminium aluminum, others dollar tree foamboard). Some with actual Zilog 40dip others with Atmel mega8 emulation. In fact before turning on the router this morning spent close to an hour flipping switches to prove possible to get a CPM patch in. I got fired up again by the paper tape thread here few days ago and mention of pdp8 panel, I think in this thread. Or maybe What Was Your 1st Computer one.

I actually bought an original Altair kit when the Popular Electronics article came out. Never got it to work. REALLY sorry I cannibalized that seeing how much those go for on Ebay now.

That parallax project was yours? I saw it long time ago and WOW! I had some propeller chips but never got up to speed.

Did you ever see 4fun's 4 chip $4 dealie? Being AVR nut that was my inspiration and I even managed to get it down to 2 chips. Unix was my first OS but then fell in love with CPM because it ran in a computer I could own. Then IBMDOS and GWBASIC came along and thought I died and went to heaven. No more PIP to just copy a file. And still my favorite (if less useful) HLL.

Return to “C/C++”