3 ms·
> can't even begin to write an assembler An assembler is a 1-1 mapping. If you can read some text, and you can write some bytes, then you can write an assemble
by chrisseaton 4y ago
> can't even begin to write an assembler
An assembler is a 1-1 mapping. If you can read some text, and you can write some bytes, then you can write an assembler. Everything in between is just a case of reading the manual! It's just some ifs - if the user's written this instruction name, then emit these bytes.
I work on compilers and I'm awe of people who work on web apps because they genuinely seem far more complicated than what I do.
- boardwaalk 4y agoI mean, there is usually a pass to resolve labels, right? So it's not quite that simple. But not far from it.
- saagarjha 4y agoThat depends on how fancy you want to be, you can definitely implement an assembler with relative branches and no labels.
- bsedlm 4y agofamiliarity is not the same thing as simplicity
- chrisseaton 4y agoNo I think we can look at simplicity/complexity absolutely to some degree. A compiler is a nice pure function - one array of bytes to another array of bytes. You need to use some algorithms and data structures in there to do that, but it's fundamentally simple. A web app is fundamentally complex - asynchronicity, interacting with other services, network connections, all kinds of chaos.