3 ms·
Writing is almost never the issue. It's debugging that is the absolute nightmare, because it is so tedious to reconstruct what happened in terms of low-level th
by titzer 4y ago
Writing is almost never the issue. It's debugging that is the absolute nightmare, because it is so tedious to reconstruct what happened in terms of low-level things. Without names, data structures, functions, human memory quickly becomes overwhelmed.
The most complicated assembly I've written recently is a fast Wasm interpreter. The only way I could tackle it effectively was to write the implementation of just one or two bytecodes at a time, test them thoroughly and in isolation. We're talking about writing only a handful of instructions per commit. There's just no way you can debug much more than that at a time. You need to build little bricks of fully-working code and stack them, ratcheting up the progress, so that when something breaks, most of the things you don't need to debug.
- artemonster 4y agoI find debugging assembly a breeze IF you have a full trace of all registers (ie in a simulation)
- dmoy 4y agoWell, and you remember what all the registers do. I once burned a couple hours on a microcontroller because I had transposed bits 5 & 4 on some register that dictated a certain i/o behavior and caused things to be really weird. One register out of like 11 registers that affected how that i/o operated, one bit transposed, whole thing was inscrutable.
- MichaelZuo 4y agoIt seems like having a diagram would help a lot, maybe some kind of 2D AutoCAD with a visual representation and their logical relationships? Or a Verilog for software?
- emrah 4y ago> Writing is almost never the issue. It's debugging that is the absolute nightmare, because it is so tedious to reconstruct what happened in terms of low-level things. Without names, data structures, functions, human memory quickly becomes overwhelmed. People claim GPT is creative and when I disagree, they say mixing to come up with a new combo is creative and that humans do it for creativity too While that might be true, what's even better is if GPT could read assembly code, find things that can be fixed and optimized and write new more optimal better code. Of course this can be done in any language. If we could get GPT to optimize our code libraries to reduce code size, memory footprint etc that would be a huge win for humanity and also show creativity. In short, it should tackle the "why is hello world app in X language taking up 100MB" problem :)
- deleted 4y ago[deleted]
- emodendroket 4y agoYes, now that LLMs have been invented we can finally write programs in something other than assembly language and then allow computers to convert the program into machine language for us.
- deleted 4y ago[deleted]