Hacker News new | ask | show | jobs
by naikrovek 1613 days ago
really? just 5 years or so earlier the sentiment among the majority of game developers that I spoke to was something like "today, real games are written in assembly, and toys are written in C, though that's changing."

for a long time, the only way to get performance out of code was to write the most-used bits in assembly. even today there are some things, just a few, which still need to be in assembly if you really want to squeeze out all the performance that you can. most people just make a tradeoff elsewhere to get the performance, rather than using assembly.

just 25 years ago the game industry was filled with people extremely knowledgeable in assembly. yet today it is viewed as a black art. sad.

1 comments

> just 25 years ago the game industry was filled with people extremely knowledgeable in assembly. yet today it is viewed as a black art. sad.

Why is that sad? It looks like progress to me.

Economizing on inputs is how productivity improvements look like. Human capital is an input like any other.

Similar considerations apply to more boring enterprise software development too: most developers these days could probably not write a hashtable from scratch. And that's good! We have libraries for that. Thus the industry is much more accessible to more people.

(I do understand the temptation of nostalgia.)

>> just 25 years ago the game industry was filled with people extremely knowledgeable in assembly. yet today it is viewed as a black art. sad.

> Why is that sad? It looks like progress to me.

It is progress, yes, and I wonder where compiler authors are going to come from in the future. If we forget how to write in assembly, we forget how to tell computers how to do it.

I think of it by way of analogy: I can buy bottles of water in the store, so why do I still want drinkable water from my tap? Bottled water is progress, and drinkable water from the tap is "the old way." The old ways are important. Especially when they are the foundations of our modern technical society like compilers are.

It is true that new people can learn assembly when it comes time for them to write a compiler, or contribute to one, and as the number of assembly authors falls, the fewer opinions we will have about things, and the more monolithic things will be. When lots of people are part of a community, there is great diversity of thought in that community. If it's just a few (hundred?) people who speak assembly, the diversity of thought, and thus innovation in compilers will be almost nil. It is literally better for everyone if there are more who can write assembly well.

Secondly, people are avoiding learning assembly because they are afraid of it, which makes some sense to me at first glance, and makes no sense to me after writing some assembly. There is literally nothing scary about assembly; it just SEEMS scary. It can be quite fun to see just how little it takes to do things, and then observing just how unbelievably fast those programs are when run.

Part of the sadness I mention above is just "old man yells at cloud," but some of it is, I believe, bad for us in the long term if assembly does truly become a black art.

I think it's more "old man yells at cloud" than you realize. Do you think people who manually input programs by moving wires around lamented bytecodes and assemblers? I would guess they did. The better C compilers get, the less there is to do in low-level code, and the less there is to innovate on that will be missed by no one knowing more than what's left. They can already compile themselves.

This lament draws a straight line back to concerns over books hurting memory and a culture of oral and visual teaching and storytelling. Books probably did have that effect, but the gain was worth it. There would have been no books to hold on to the progress of the ancients through the various rough patches Europe went through without books. "How much progress was lost because it wasn't written down?" and "how much progress was lost because the tools were inaccessible to the person with the right idea?" are the same question.

Assembly is fairly easy to learn (going by my few attempts) in the same way picking up the syntax for most languages is easy, but doing anything non-trivial is at least as involved as any other way of communicating with thinking sand.

Keep in mind that the industry has grown so much, that in absolute terms we might have more people who knew assembly than ever before, even if the relative proportion has gone down.

Btw, compiler writing has also improved a lot. Thanks to projects like LLVM, you don't need to know assembly to write a compiler for your new language.

Also: there's plenty of people with interest in obscure technologies and languages. Have a look at the demo scene where people still write new material for the Commodore 64. Or the trend of making new games for NES and the original Gameboy. There are plenty of people who work close to the bare metal, because it's fun.

Not your main point, but bottled water is not progress. Clean tap water is more sophisticated and efficient.
It's more efficient for many uses, but not all.

Eg bottles are more convenient when hiking. (Though there's no reason why you couldn't just put tap water in a bottle.)