TIOBE's Language-Popularity Index Sees A New Top 10 Language: Assembly (tiobe.com)
TIOBE's "Programming Community Index" measures the popularity of languages by the number of skilled engineers, courses, and third-party vendors. Their July report indicates that Assembly has become one of the 10 most popular languages:
It might come as surprise that the lowest level programming language that exists has re-entered the TIOBE index top 10. Why would anyone write code at such a low level, being far less productive if compared to using any other programming language and being vulnerable to all kinds of programming mistakes? The only reasonable explanation for this is that the number of very small devices that are only able to run assembly code is increasing. Even your toothbrush or coffee machine are running assembly code nowadays. Another reason for adoption is performance. If performance is key, nobody can beat assembly code.
The report also noted that CFML (ColdFusion) jumped from #102 to #66, Maple from #94 to #74, and Tcl from #65 to #48. But Java still remains the #1 most-popular language, with C and C++ still holding the #2 and #3 positions. Over the last five years, C# and Python have risen into the #4 and #5 spots (made possible by PHP's drop to the #6 position) while JavaScript now holds the #7 position (up from #9 in 2011). Visual Basic .NET came in at #8, and Perl at #9.
The report also noted that CFML (ColdFusion) jumped from #102 to #66, Maple from #94 to #74, and Tcl from #65 to #48. But Java still remains the #1 most-popular language, with C and C++ still holding the #2 and #3 positions. Over the last five years, C# and Python have risen into the #4 and #5 spots (made possible by PHP's drop to the #6 position) while JavaScript now holds the #7 position (up from #9 in 2011). Visual Basic .NET came in at #8, and Perl at #9.
If you want speed, assembly is the ONLY option.
Finally
The only reasonable explanation for this is that the number of very small devices that are only able to run assembly code is increasing. Even your toothbrush or coffee machine are running assembly code nowadays.
Wait, my toothbrush or coffee machine is capable of running assembly code? Normally, they only run bytecode that's been compiled from assembly code. I got my toothbrush for ten bucks with a charger, that's awesome! What's in there, an assembler or an interpreter? Either way, it must have a seriously overkill microcontroller.
These ratings are based on search results. Pardon my skepticism. From what I can tell, more and more microcontrollers are being programmed in C these days.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
I've been involved in firmware development for implantable medical devices as well as other devices and it's simply not true that assembly has much use this day in age. Unless you are coding for one of the small memory footprint AVR or PIC devices you are not going to get better results working in assembly.
They are machine dependent.
X86, ARM, AVR, IBM360, PDP8, or what? Just saying 'assembly' is not all that interesting. Processor architecture(s) would be interesting to know.
I love assembler programming - in fact it was it was the second language I learnt after basic. If I could get a job in assembly* I would be in heaven. Unfortunately I've seen almost exactly zero evidence that this "trend" is real.
*x86 or z80 ideally, but I'm not fussy, and new processors aren't hard to pick up.
... or are they mixing assembly up with web-assembly?
That would explain a thing or two.
We suffer more in our imagination than in reality. - Seneca
Huge drop for Objective-C... 6 to 15
It's called bullshit
The fact that assembly went up a bit isn't particularly interesting. The much bigger news, IMO, is that Ruby jumped up quite a bit, Groovy went way up, and Objective-C went way down. Groovy's vector really is quite impressive.
"Why would anyone write code at such a low level, being far less productive if compared to using any other programming language and being vulnerable to all kinds of programming mistakes?"
...More productivity down the drain.
A) Why don't you ask them and learn?
B) I politely disagree that they are automatically "far less productive". I am an embedded programmer and have only used tiny amounts of assembly over the last decade. However, if I had more tiny projects, and my bosses weren't akin to cats chasing flashlight spots to where I could stick with the same processor for more than a year, I'd consider it for sure. Why? Because I never seem to get to just "code and go" anymore. As an example, last week I had to reinstall my multi-gigabyte Eclipse IDE for the SECOND time this past year (this time due to a debugger corruption). In such IDEs, all the higher libraries (and their paths) need to be in place, and compiled too (which doesn't always go perfectly). Whereas my former officemate would open any text editor (his was Corel Word Perfect(!)) to write his assembly, then compile on the command line, then upload the binary.
I don't know how many hours I've spent learning and fixing IDEs. Then, a year to two later, the IDE changes again after the chip's OEM "upgraded" it!
People are going actually have to learn how to program a computer. The horror! What will happen to all the millennials now?!
Old farts to the rescue! Stand aside, kid. I'll fix it!
Oh, Assemblyman! How can we ever repay you?
Tune in next week, when COBAL battles the FORTRAN Godzilla in Silicon Valley..
Modern CPUs are complex beasts. The timing and pipelining of instructions makes it very difficult for a human to best-optimize their code, all while solving a much larger problem. And then there's the competency of the programmer to consider: An uber coder can do it, but your average programmer will spit out something that limps along. So unless you have a genuinely speed-dependent problem and are allocated a lot of money in your project budget to throw at that particular problem, let the compiler do it.
Here's a electric toothbrush reference design from Texas Instruments.
Here's the MSP430G22x0 microcontroller used in the design.
Here's a list of software tools for that microcontroller. The list includes something called "GCC", which they say is an "Open Source Compiler for MSP Microcontrollers".
Here's a page from Renesas about electric toothbrush designs.
Here's a list of software tools for Renesas processors; they list C compilers for the R8C and RL78 microcontrollers, as mentioned in the previous page.
So don't assume all the code in your toothbrush was written in assembler language; some of it may have been written in C, although some of the low-level library routines might be written in assembler (or an asm in the C code).
Straight up binary is where the action is. Everything else is salad dressing...
I wanted to take assembly language in college. The dean wanted to teach the course. But I was the only student who showed up for the class. One student doesn't prevent a class from being cancelled. Since this wasn't a required course for graduation, I couldn't take it as a special studies project.
Every CPU only executes "assembly code" (ie, machine code. It makes no difference whether it is a coffee pot, phone, PC, or even a supercomputer.
They all run machine code only, and the way to express machine code that is human readable is called Assembly Language.
... I wanna see a human beat any modern-day compiler to optimizations.
The other argument might be valid, but this one is not.
3x faster than C, 10x faster than Java, many orders of magnitude more compact than either.
You don't use asm if you have choices, but if you have fixed hardware and still need more performance or more compact code there aren't any other good options.
Though Forth will give asm a run for it's money in some circumstances - the problem with Forth is the bills from keeping the programmers in a suitable frame of mind are probably excessive ;)
You may be right for some VERY small and trivial applications, but sometime in the early 90's optimizing C compilers FAR outstripped hand-coded assembly for any larger project. These days it isn't even a contest. A good optimizing compiler like the Intel C/C++ compiler can crank out code that is anywhere from 3 to 10 times faster than what you can do by hand. I should know, I did PLENTY of Assembly, and worked with some LARGE assembly-language applications back in the 80's. ALL of them were totally rewritten in C before 1995, and I'm talking about RTOS kernels and stuff, things where one clock cycle matters. There may be some few very specific 'inner loop' interrupt handling logic and such that is still written in assembler, mostly because that sort of code is idiosyncratic and can't really be safely optimized, but we're talking a very few lines of code, maybe 500 out of 500k SLOC.
I can buy the idea that there are 'IoC' things out there with extremely minimal processing power, basically little 8 bit devices with a few K bytes of RAM and Khz CPU clocks that you really CANNOT code in an HLL. Of course the amount of code that you write for that thing is obviously also extremely minimal. We're talking "blast this fixed length 802.11 frame out there every 2 seconds with these 12 bytes holding the RAW bit values from the ADC and the 3 discretes to a broadcast address" kind of thing.
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
It's not unreasonable to imagine that the ongoing proliferation of embedded doodads would spur that on, but it's a stretch to imagine that it's for devices for which there is nothing but an assembler.
For systems using a 6502 family CPU, there is a C compiler. But it doesn't optimize much, and the 6502 architecture isn't well suited for efficient execution of C anyway. That's why even though a few modern-day NES games are written in C, most are written in assembly language.
What you say may be true of x86, x86-64, ARMv4-7, and AArch64, which get the most attention from compiler authors. On an 8-bit microcontroller, assembly tuned specifically for a particular ISA's available addressing modes can handily beat C++. Some ISAs, such as 6502, prefer a set of parallel arrays instead of an array of structures.
If you are on an 8 Bit MCU, speed is not that critical, or you would use a larger and faster MCU.
When you want to add a new feature to hundreds of thousands or even millions of devices in the field, have fun recalling them to install "a larger and faster MCU."
Say, when were we supposed to get unicode support?
As soon as it's possible to prevent all current and future directionality override control characters from fuccing with the layout.
I think they're talking about projects whose source code is in assembly language, where a work's "source code" is defined as "the preferred form of the work for making modifications to it" (GPLv2, GPLv3). That is, something like the Pently audio player (which uses a preprocessor written in Python but is otherwise in 6502 assembly) or the video games RHDE: Furniture Fight and Nova the Squirrel .
In fact, Java is becoming more popular if the data is to be believed. Is Oracle paying attention? Likely not.
I'm surprised to see Rust on this list and not Go.
The smallest device I have written code for is a PIC with 512 bytes of RAM and 256 bytes of ROM. It had a C compiler. It is also lacking in connectivity for making trendy IoT devices. So what are all these devices that can only run assembly code?
I think a more likely explanation is that fad languages come and go, and now that globalization has driven the value out of programming, and kids are leaving the industry, they are mostly going, leaving only the languages that have stood the test of time behind.
A lot of comments talking about the speed of assembly, but if you enjoy puzzles like sudoku, coding up a small executable in assembly can be much more challenging and rewarding. You have to work with a large number of variables in your head, keep track of memory locations, remember how the system calls work, etc. Not great if you're just trying to get things done, but it's definitely a good mental exercise.
Then there's also the popularity of retro computers and consoles. There is an increasing number of indie/amateur developers developing for these machines as a hobby.
During the last few months I have been uploading my Z80 assembly code to GitHub myself (a game for MSX computers), and many other developers are doing the same.
My site
finally! thank you.
if someone still thinks this index measures programming language popularity they must be delusional.
the only thing this index measures is how often search engines - mainly google - index the term "$lanuage programming". nice time series but useless in regards to anything programming language
People suck at macro optimizations in assembly. If your assembly program is more than 25 instructions, you're probably not going to do a better job than a compiler.
Good assembly language programmers are not trying to out-optimize the compiler at instruction scheduling. Good assembly language programmers are leveraging information that can not be communicated to the compiler.
In the day of viable superoptimizers or superoptimizer-generated peephole optimizers and viable evolutionary/exploratory/search-based compilers, you should need to know assembly even less than ever before. Remember, the machine can try out new things both faster than you and cheaper than you.
Contrary to popular myth C/C++ code can be written in ways that favor one architecture over another. One reason to understand the architecture, assembly language, is to write better C/C++ code for your target.
And then there is debugging.
My 300Euro coffee machine runs no code at all.
Neither does my plastic tooth brush.
And by the way: Assembly is not a language. 68k Assembly might be one assembly language. x86 another one. Both have not much in common.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Where the good assembly language programmer beats the compiler is usually not in the instruction scheduling. It is more typically leveraging knowledge that can not be communicated to the compiler about the desired implementation. High level programmers are constrained by their respective languages. The assembly language programmer is not so constrained.
Furthermore the architectural differences are sometimes a bogus complaint. For example where I last wrote non-trivial amounts of assembly was to get a few more fps out of a couple of video games. This was only necessary for low end machines, not the most recent architecture. If my optimizations were not needed on the more recent architectures that was not a problem, those systems were just fine performance wise. FYI I benchmarked this assembly code over several generations of x86 architecture over the years. While the performance benefits of assembly decreased over the generations it was always still a win, I did not have to update it. However when the original architecture that needed the assembly was no longer a supported target I turned off the assembly and let the C/C++ implementation get compiled so that maintenance would be easier (i.e. I would not be needed).
This is a silly claim. Assembly is not a language, but a wole load of different languages. Knowing Z80 assembler wont get you far in programming 64 bit ARM systems. They are as different as Algol68 and Scala.
If anything, the possible gain are bigger now.
Perhaps THOBE is mistaking the fact the NASA put up the full assembly code for the Apollo 11 guidance computer on Github and the interest in that (6000+ stars) for a revival of the language instead of a historical artefact.
Check it out here and don't forget to start it, together we can confuse THOBE and make Assembly the #1 language of the world again! ;-)
https://github.com/chrislgarry...
Judging from the fact that Assembly is in the top 10, I would think not.
First of all, many, if not most, computers run software so trivial on microcomputers so small, installing a compiler for them would just be _way_ more effort than to just code to program in C. Typical examples are the microcontrollers in electric toothbrushes or other smaller embedded systems. It's hard to get your software running on a 4 bit microcontroller as modern C makes assumptions like having your memory addressible at a byte level.
Then there is another, in my opinion more important, point. Assembler is a great teaching aid. It shows you what the computer actually does. Understanding things like pointers is trivial in Assembler so you can learn a lot from it. Also in Assembler every control structure hurts, as you need to keep track of it yourself. This nudges you towards writing simpler code, away from thousands of nested if statements and functions with hundreds of lines. Those are desirable traits in all programming languages.
No language is suitable for everything, but most languages have at least one are where they are really useful.
Do you mean using ambient volume as a trigger, with some means of gain control to make activation independent of overall playback volume? This would perform very poorly, as it would react to room noises and react to noises in the soundtrack that aren't in sync with the action.
Better performing options need an MCU. One is for the video to encode vibrator instructions in audio steganography, which would need a DSP to extract. Another, as used in Teddy Ruxpin toys, is to encode timing on a separately transmitted channel. For a vibrator, this would probably be RF of some sort, such as Bluetooth.
to know it is a bullcrap index. 1986: Ada as #2. Really? Lisp as #3? Really? The world was COBOL and C back then with FORTRAN (caps then) and assembly thrown in. Was there hype around both Ada and Lisp? Yes, very much so. There wasn't even an official standard until the early 80s but Ada and Lisp were going to be "the future." Perhaps more believable is the 1991 #3 as that is when DOD briefly mandated Ada use.
To call either Ada or Lisp "popular" at any time is really a reach. Hype/astroturfing is not popularity. Even tracking "how to I learn ..." searches does not measure popularity. They are measures of interest. Popularity can only be based upon job requirements, number of projects, even (broadly) loc metrics. Popularity is reflected by use/consumption, not what is talked about.
popular: 1. liked, admired, or enjoyed by many people or by a particular person or group. 2. (of cultural activities or products) intended for or suited to the taste, understanding, or means of the general public rather than specialists or intellectuals.
Of def 2, substitute "general programmer" (ie, Java, C, C++) with 'specialists/intellectuals' being those involved with Haskell, D, etc.
...it's not terribly surprising that so many don't really know what programming really is. Programming is a (hopefully) logical description of the solution to a problem or a need. The language used is simply a tool. And once we had higher level languages to work with the process went something like this:
1) write program in language of choice (I still like FORTRAN, COBOL and Pascal, use the right tool for the job)
2) convert to assembly language appropriate for the machine (step one of the compile)
3) convert that to binary image (step two of the compile)
4) link that to the hardware (step three of the compile)
5) execute your runnable program on that hardware
For those of us that fingered in a program directly to memory using switches on the front panel, assembly languages (and then higher level languages) were a wonderful innovation. Or course, I'm relatively new to this stuff, I only started in the mid 70's. Since then the proliferation of languages and assorted tools has really made a mess of things. And the NIMBY thought process has really mucked things up rather badly. Don't like the way something works... don't try to fix it, just create a brand new something or another to replace it. There's a stellar XKCD to describe this: http://xkcd.com/927/
Old isn't always bad and new isn't always an improvement. Some change is good but change for the sake of change (most often the case) is rarely a good thing.
Joining this thread a bit late, but I thought I had to mention this.. Security hasn't yet been mentioned as a reason for using assembly. Let's say you need a hardened general computing device with a handful of basic apps running on it. Start with the device's BIOS, and then move on to HW components' firmware (e.g., SSD drive). Then audit the OS (e.g., minimalist version of a Linux distro), and finally begin coding the app(s) of interest with an assembly compiler you trust (not trivial!). Huge, inefficient undertaking... realistically one within the domain of only gov't entities. But this is unfortunately what is needed in today's era of compromised BIOS, firmware, operating systems and even compilers that automatically insert "beacons" and countless other crap. In 1985 my father threw an x86 assembly book on my desk after I complained I couldn't run Sierra's Kings Quest series on his rig optimized for AutoCAD with a Hercules monographics card (i.e., only CGA, EGA and VGA supported by Sierra). So I learned assembly, and it took me months to display my first pixel in "graphics" mode. Point being: going through this exercise, I was able to count and account for every byte in the .exe or .com executables.
Without a microcontroller, how would it implement the TCP/IP stack needed to send user statistics to the central server to be data mined?
You're correct, C itself is simply a way to tell a compiler to generate SOME SORT of instructions that accomplish X. If X is possible in environment Y, then C COULD be used in that environment. Practically speaking you could take a compiler that targets your instruction set, use a libc version with that and a cstart.o with that which are tailored to the specific environment and do what you're suggesting.
Of course in some very resource constrained environments that MAY not be worth the bother, and optimizers are certainly less effective when they have very few options to choose between. It may also be that in many cases only a small subset of C constructs CAN be effectively translated to a really limited environment.
So, there's a SMALL set of cases where you may have no choice but hand assembling code. These are going to be extremely resource constrained. Things like embedded sensors that run on ambient power (thermal, vibration, etc) or the energy of a wi-fi signal they're picking up. This is where you get into nano-watt power budgets and 'processors' that have only a couple registers, a few dozen bytes of RAM, and a tiny amount of ROM. Usually their ONLY function is to do some Analog to DIgital conversion and dump the results in a fixed format to a radio or other similar interface. This kind of 'code' is really just replacing a bunch of custom fixed-function electronics with a very basic progammability for design flexibility reasons. No real decisions are made in code, etc. These days anything that incorporates any significant control laws, etc is going to be on a control system that's talking to such sensors, and that will be in 99.99% of cases at least a 16-bit controller. Heck, embedded military systems all went 32-bit 20 years ago now. These things are all programmed in PL/1, PL/M, ADA, or some other HLL.
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
Assembly language programming is still alive and in good health even for x86 processors.
And there are projects written entirely in assembly language. Get some links:
FASM assembler.
FASM clone for ARM.
Advanded RAD IDE for FASM. (and FreshLib portable library)
RWASA - High performance, scalable web server.
MiniMagAsm - Small content management system (CMS).
AsmBB - High performance lightweight web forum software.
Kolibri OS - small and very fast operating system with GUI interface
I am not counting the small exercise projects here and there. I am not counting mixed language projects where assembly language is used together with high level languages.
"Premature optimization is the root of all evil." Said some sage. It was either Fred Brooks or Donald Knuth, I forget. Google it.
TIOBE results doesn't makes much sense. They are using general web searching to rank their list. It seems Redmonk, http://redmonk.com/sogrady/201..., is more accurate which is basd on github and stackoverflow. I hope they also publish their new analysis soon.
Be like shadow in the light or darkness.KMZ
Are you sure it is popular because people are coding in assembly, or is it popular because people are reverse engineering binaries? I do a lot of work reverse engineering x86, x86-64, arm, powerpc, and mips binaries so I have to know all of those languages. Doesn't mean I code in them.
that lets you do ANYTHING the machine is capable of doing, with maximum resources and performance.
All other languages compile down to assembly at some point and are therefore not capable of better performance, and anything you do in any other language can by definition be done in assembly, including object-oriented and structured coding.
Languages other than assembly provide the benefit of ease for programmers, allowing them to trade run-time benefits for greater programmer productivity. There is, by definition, no way for a high-level coder to beat the run-time performance of assembly or reduce the resource requirements below those of assembly. Assembly is perfectly readable and maintainable to those who code in it, but less easily portable.
Haven't seen it mentioned yet. Another reason to learn assembly (why I am right now) is for debugging closed source apps to earn bug bounties.
You have a few different groups of apps to target, with different rewards and challenges.
Web apps, open source apps, closed source programs.
Looking for bug bounties, the first pays less and there's tons of people looking for the same bugs. The second group is usually not going to pay unless you're looking at the Linux kernel or a specific server. You can use many source code analysis tools on these. The closed source apps are where the real money is at. Browser escapes, media player RCE, OS exploits, you'll need assembly skills to debug these and see what's going on internally. This is where you find $100,000 bug bounties.
Cwm, fjord-bank glyphs vext quiz
You have just admitted that standard C cannot do these things, so there are work-arounds to permit people to revert to chunks of assembly inserted into their C code.
Those of us who have written tons of embedded code know this of course, but many coders who work on the PC or Mac and mostly write big applications in high-level code, sometimes having a fear of the voodoo called "assembly language", do not seem to know it. I guess most CS programs do not teach this stuff these days?
Incidentally, some C compilers seem to do the work-around like you cited, sort of faking CPU registers to be C variables and then handling them with C syntax, and sometimes requiring inefficient things like binary operators deal with things like the SR and Z,C,S and V flags, there are some that just provide a mechanism to just blatantly type native assembly right into the code of a standard C function wrapper.
It does not really matter if you kluge-in some assembly or if you hack-in access to registers and bits, it's all just an indirect admission that there are things you sometimes need to do on the hardware that the high-level language cannot natively do, but that can easily be done in assembly.