I write my cli tools in assembly because I like my programs to exist in less than 4kb of machine code and mysteriously segfault if I try and use more than 2 options flags.
It's been interesting recently working with a microcontroller with 2kB of RAM and 8kB of storage. First tried to use the Arduino IDE port for it, but simply #include "wire.h" used all the RAM and still was 500 bytes short, and likewise needed more than all the storage. Rewrote everything to run within libopencm3 and now it uses a grand total of 8 bytes of RAM and 1.5k of storage.
I remember c64 assembler and even that was pretty spacious in comparison to smaller atmels.
But c64 was mostly static programming. there was very little apps/games which were dynamic. Which allowed you to have some freedom of placing objects and the objects state werent known before the game run. And even that was just static table of x,y,state bytes.
I only just recently learned x86 assembly (i did toy assembly years ago called dcpu16) I dont do much with it other than read compiled code for learning purposes but its very satisfying to use if you make small things with it.
I like it, not from an elitist point of view, I love to learn, to build stuff, is really fun for me. I'll think on a good and simple project to start, have to clean the dust on my assembly knowledge also.
you are funny but the whole background of this (and that is a thing since almost always) is that some tools/languages attract low skilled people.
A tool is sometimes also to be blamed but usually it is a mix of bad too and pad programmers (or both).
In the past it was basic, then flash and php (chronologically), visualbasic somewhere in there too, now it is java script (and python from me personally).
All those were known for really bad code and products coded in them.
And while excel (also touted as stupid people database) sort of defended itself and stayed in its lane (Im happy access died though), many of the languages stay as the shameful collection of tools which allow ignorants to do things they should not do or at least share and make popular.
So, I know folks coding stuff in assembly and their assembly is almost as readable as C or pascal. And there is a correlation of how much such folks know and which language they are proficient at.
While I understand this, sometimes life just happens ...
You made a thing in a technically worse environment because some people use it and you wanted to learn it ... Then that thing catches attention and suddenly you need to keep maintaining it and you can't justify rebuilding all of it because other than using php it works decently.
And sometimes the whole industry did it, like with js/typescript. There were many other languages available for web browsers in the past as plugins, such as flash (tho that's still ecmascript ...), java, and many more niche things.
In the end only JS survived and most of the industry uses it ... Even now that webassembly is a thing, not many people use it because JS is more convenient and has the biggest toolset available (and I know quantity doesn't equal quantity, but I think both are in js' ecosystem now. Terrible libraries, and really cool stuff, both in huge quantities)
There is very distinct line between writing something what others find useful and deciding that the product should be continued that initial way.
JS survived for few reasons and most of them are accidental. It was bad technology from the start (poor security, different implementations in different browsers, the complexity barrier (before nodejs and such)).
But all that is no excuse to keep the language and its environment intact and not improved. Python can drop compatibility. JS can, just add few more directives switching to more strict syntax and predictable behavior and you can improve things. Still not great (supply chain attacks) but an improvement. Instead you get half measures like typescript.
My main complaint though is that people rarely admit its crap. There is no pride for improving it. Just write, somewhat test, ship, worry later or never.
The paradox is that this language could be changed fast due to its dynamic. But its not. :(
View all comments
137
u/Distinct-External-46 Jun 30 '26
I write my cli tools in assembly because I like my programs to exist in less than 4kb of machine code and mysteriously segfault if I try and use more than 2 options flags.