1. 17

  2. 3

    I’m a frontend web developer by trade […] Rustaceans use fancy words and acronyms […] and I feel bad for not being able to follow the discussions because I don’t know what any of that stuff is.

    The author should really not feel bad about this at all. The idea that anyone can know everything from processor opcodes up through front-end web development is nuts. I’ve met plenty of front-end devs who have no idea what the difference is between the stack and the heap. And I’ve met C programmers who probably couldn’t tell me what the DOM is. Kudos to the author for taking the trouble to learn assembly like this, that’s great. But specialization is necessary, and there’s no reason to feel bad about it.

    1. 2

      This is fantastic, and addresses a major beef I have with the Crenshaw tutorial. Crenshaw clearly has a plan for most of his compiler when he shows his first, one-line compiler in chapter 2. But we never get to see the big picture. The peephole view he uses throughout hides much of what goes on in designing a compiler, IMO. OP, on the other hand, shows the big picture for each platform in a couple of screens. Kudos!

      OP could still be slightly clearer. For x86 it does a good job of pointing out that the array pointer in r12 stitches individual instructions together. For ARM, though, it pulls out a bit of a rabbit out of a hat when it uses two registers for an analogous purpose. A single well-placed sentence would clear things up immeasurably. Similarly, a sentence calling out what iovec is for when first mentioning what it is. Stuff like that.

      Of course, OP has one advantage over Crenshaw: a simpler source language. But that seems a reasonable thing to hold tutorials to account for.

      1. 1

        The part near the beginning is by far the best introduction to x86 assembly I’ve read - As someone who currently knows nothing about it.