4 ms·
Not sure why HN is saying it is obvious that assembly is relevant because compilers... The article's intent is around a programmer writing assembly. I'm sure t
by mjpuser 7y ago
Not sure why HN is saying it is obvious that assembly is relevant because compilers... The article's intent is around a programmer writing assembly. I'm sure there are niches but I can see web developers getting away without writing assembly in their professional career.
- jkoudys 7y agoMight see that flip in the coming years, if you consider web assembly (wasm) to be assembly. I do.
- pizlonator 7y agoWebAssembly is not assembly in the ways that the article talks about. Like, writing it directly doesn’t give you any special control or guarantees over timing.
- jkoudys 7y agoIt's assembly against a virtual machine, not a physical one. You're right it's not appropriate for an embedded system or some other RTS, but assembly doesn't stop being assembly when you target a virtual machine.
- pizlonator 7y agoIt kinda does in this case. Don’t kid yourself. In real assembly, the really interesting part is how to use a finite register file. WebAssembly has an infinite slab of variables available, in the sense that you get to say how big it is. That fundamentally changes the game.
- pjmlp 7y agoThere are real CPUs that are just like that. In fact, most mainframes have always made use of microcoded CPUs, with Assembly being referred as bytecode on the programming manuals. You just need to dive into IBM and Xerox PARC manuals, for starters.
- jkoudys 7y agoYep. I feel like most of HN's readership's asm education begins and ends with their 6502 class at uni.
- pizlonator 7y agoSounds like you’re saying those machines executed bytecode. Otherwise there isn’t a great limiting principle to your logic. Just because someone once built hardware that executes such a high level assembly that the manual referred to it as bytecode doesn’t mean that all bytecode formats are assembly.
- pjmlp 7y agoIndeed I am, the interpreter is the microcoded CPU. Even modern 80x86 Assembly is a low level form of bytecode, given that the micro-ops that are processed by the microcoded CPU are completly unrelated to 80x86 Assembly opcodes.
- mjpuser 7y agoWasm is different than assembly, so I don't think so.
- jkoudys 7y agoIt targets a virtual machine, not a physical one, but other than that it's "assembly-like" enough that learning some core ASM coding practices will help you.
- mjpuser 7y agoNot sure why you are sticking to your guns here. First, it's highly unlikely anyone would ever write wasm by hand. Second, the article rambles a bit but the most compelling argument for assembly is writing fast code for constrained hardware. At a high level, that's not what wasm is solving.
- saagarjha 7y agoWebAssembly is a bytecode format.
- jkoudys 7y agoBytecode is just the instructions, which is actually a level lower than asm, but for a virtual machine instead of a physical one. It's a direct enough abstraction that you can predict the bytecode you'd build from the asm you write.
- dang 7y agoOk, we've put programming in the title above to make this distinction clearer. The author is not writing about computer-generated assembly language, such as compiler back ends.