• @[email protected]
    link
    fedilink
    1511 year ago

    There’s an old joke about two mathematicians in a cafe. They’re arguing about whether ordinary people understand basic mathematics. The first mathematician says yes, of course they do! And the second disagrees.

    The second mathematician goes to the toilet, and the first calls over their blonde waitress. He says to her, "in a minute my friend is going to come back from the toilet, and I’m going to ask you a question. I want you to reply, “one third x cubed.'”

    “One ther desque,” she repeats.

    “One third x cubed,” the mathematician tries again.

    “One thir dek scubed.”

    “That’ll do,” he says, and she heads off. The second mathematician returns from the toilet and the first lays him a challenge. “I’ll prove it. I’ll call over that blonde waitress and ask her a simple integration question, and see if she can answer.” The second mathematician agrees, and they call her over.

    “My friend and I have a question,” the first mathematician asks the waitress. “Do you know what is the integral of x squared?”

    “One thir dek scubed,” she answers and the second mathematician is impressed and concedes the point.

    And as she walks away, the waitress calls over her shoulder,

    “Plus a constant.”

    • @[email protected]
      link
      fedilink
      911 months ago

      I would not consider integration to be basic maths, honestly. Basic maths is addition and multiplication, and maybe vector geometry.

  • Philip
    link
    fedilink
    311 year ago

    I mean who hasnt watched “Assembly Language in 100 seconds” by Fireship

  • @[email protected]
    link
    fedilink
    English
    13
    edit-2
    1 year ago

    Is there any situation where you’d want to remember the opcodes? Disassemblers should give you user-friendly assembly code, without any need to look at the raw numbers. Maybe it’s useful to remember which instructions are pseudo instructions (so you know stuff like jz (jump if zero) being the same as je (jump if equal) making it easier to understand the disassembly), but I don’t think you need to remember the opcode numbers for that.

    Edit: Maybe with malware analysis where the malware in question may be obfuscated in interesting ways to make the job of binary analysis harder?

    • @[email protected]
      link
      fedilink
      41 year ago

      The important thing is to be important. Engineering has to deal with teammates that don’t have these problems, so they equalize.

  • Rose
    link
    fedilink
    341 year ago

    NOP is $EA, of course, and… um…

    …sorry, I’m just a Commodore 64 scrub, I don’t know nothing about this high and mighty Intel 8086 nonsense.

    [looking up]

    …it’s 0x90 on IA-32? WHAT? Someone told me every processor used 0xEA because that was commonly agreed and readily apparent. …guess I was wrong

    • Flying Squid
      link
      fedilink
      111 year ago

      My daughter told me the other day, “I bet I could figure out a Commodore 64 if I had one.”

      Good luck figuring out LOAD “*”,8,1 by yourself, kid.

    • palordrolap
      link
      fedilink
      4
      edit-2
      1 year ago

      Someone told me every processor used 0xEA

      Not sure if this is a riff on the joke or not.

      Back in the day I dabbled in 6510 code, and up until today hadn’t even bothered to look at a chart of opcodes for any of its contemporaries. Today I learned that Z80 uses $00 for NOP.

      Loth as I am to admit it, that actually makes sense. Maybe more sense than 65xx which acts more like a divide-by-zero has happened.

      The rest of the opcode table was full of alien looking mnemonics though, and no undocumented single byte opcodes? Freaky, man.

      But the point is that not even Z80 used $EA. If the someone was real they probably meant every 65xx processor.

    • idunnololz
      link
      fedilink
      1
      edit-2
      1 year ago

      I thought NOP was 0x90. Edit: oh I just read the rest of the comment.

  • @[email protected]
    link
    fedilink
    151 year ago

    Alt text: “How could anyone consider themselves a well-rounded adult without a basic understanding of silicate geochemistry? Silicates are everywhere! It’s hard to throw a rock without throwing one!”

    • @[email protected]
      link
      fedilink
      English
      11 year ago

      Silicates are everywhere! It’s hard to throw a rock without throwing one!

      If that’s all that’s needed to consider yourself having a basic understanding, then I already had it by the time I passed HS.

      Unfortunately, the Alt text doesn’t tell us the bar, so we can’t know how round we are.

  • @[email protected]
    link
    fedilink
    English
    241 year ago

    I’m pretty sure I’ve had this exact conversation. Took me a minute to understand what the point was.

  • @[email protected]
    link
    fedilink
    61 year ago

    there is an additional layer to this joke for those who understand turing completeness. And it elevates it to a whole other level of snark.

    • @[email protected]
      link
      fedilink
      211 months ago

      Are you implying that an assembly language consisting of just ret, int3 and jmp (and nop, of course) is turing-complete? …are you sure about that?

      • @[email protected]
        link
        fedilink
        1
        edit-2
        11 months ago

        Bookmarking your comment so I can come back to it in a couple hours, if I hopefully remember to.

        But yes, almost. I don’t think the interrupt is necessary and the return isn’t under certain architectures. I have a doc on my computer somewhere where I was investigating what the absolute minimum was to make a turning complete machine and, to my recollection, there was only 4-6 instructions that were absolutely necessary. The ones I remember off the top of my head are NAND, MOV, JUMPIF, and then I believe I included NOP in accordance with some principle. RET and INT were convenience features in this design.

        • Perhyte
          link
          fedilink
          English
          311 months ago

          Fun fact: apparently on x86 just MOV all by itself is Turing-complete, without even using it to produce self-modifying code (paper, C compiler).

        • @[email protected]
          link
          fedilink
          211 months ago

          The key here I think is the NAND. I know you can do practically anything with only NAND gates. But without it, and with just control structures, I don’t think there’s a way to perform computation unless there is some theoretical voodoo withcraft possible, something like nop-padded cellular automata given the infinite memory. But I don’t have any qualification to talk about this, I’m just some random dude who flunked out of the university but finished all Zachtronics games.

          • @[email protected]
            link
            fedilink
            111 months ago

            You’re remembering correctly, every other logic gate can be built from NAND gates, which is the foundation of this sort of minimal-instruction-set exercise. Beyond that, you need to be able to move data and change your program counter (jump, often conditionally). Then, if you want parity with modern instruction sets beyond just being turning complete, you need return and interrupt for control flow.

  • moosetwin
    link
    fedilink
    English
    471 year ago

    It’s insane how close that handwriting is to randall’s, did he make multiple versions of this comic or was this written by a professional forger?

    • @[email protected]
      link
      fedilink
      English
      111 months ago

      There was that one comic that Randall did (Lorenz) where you could choose one of several paths and write your own text in the last panel. In order to implement that Randall had to create a font of his own handwriting. I wouldn’t be surprised if OP just ripped the .woff file or similar.

      • Zagorath
        link
        fedilink
        301 year ago

        Holy shit. I remembered the original comic, but didn’t remember what the subject matter of it was. So if you hadn’t left this comment, I would have just gone on believing that the OP’s version was Randall’s version.

        • Captain Aggravated
          link
          fedilink
          English
          511 months ago

          Yeah, I’ve seen people riff on xkcd comics before but they usually do a bad job of matching the handwriting/font (I don’t know if Randall hand-letters these or if he types in a handwritey font). It’s often a deliberately bad job, because indicating that they are changing the original is a part of the message/artistic expression. Like when a word is covered with a black bar with white letters in it in a different font, an obvious revision, it’s like hearing a different voice interrupt.

  • @[email protected]
    link
    fedilink
    English
    1811 months ago

    Here’s the source:

    https://xkcd.com/2501/

    And the alt text:

    How could anyone consider themselves a well-rounded adult without a basic understanding of silicate geochemistry? Silicates are everywhere! It’s hard to throw a rock without throwing one!

  • @[email protected]
    link
    fedilink
    18
    edit-2
    1 year ago

    “oh you laughed at that joke despite the fact that the bridge followed the falling action instead of preceding the punch word? Amateurs shouldn’t be allowed to watch comedy.”

    • A Basil Plant
      link
      fedilink
      24
      edit-2
      1 year ago

      https://en.wikipedia.org/wiki/INT_(x86_instruction) (scroll down to INT3)

      https://stackoverflow.com/a/61946177

      The TL;DR is that it’s used by debuggers to set a breakpoint in code.

      For example, if you’re familiar with gdb, one of the simplest ways to make code stop executing at a particular point in the code is to add a breakpoint there.

      Gdb replaces the instruction at the breakpoint with 0xCC, which happens to be the opcode for INT 3 — generate interrupt 3. When the CPU encounters the instruction, it generates interrupt 3, following which the kernel’s interrupt handler sends a signal (SIGTRAP) to the debugger. Thus, the debugger will know it’s meant to start a debugging loop there.

      • @[email protected]
        link
        fedilink
        21 year ago

        Hey thank you!

        Not what I thought it was for sure 😃

        How does it work if an instruction gets replaced by the INT3 though?

        • A Basil Plant
          link
          fedilink
          4
          edit-2
          1 year ago

          Excellent question!

          Before replacing the instruction with INT 3, the debugger keeps a note of what instruction was at that point in the code. When the CPU encounters INT 3, it hands control to the debugger.

          When the debugging operations are done, the debugger replaces the INT 3 with the original instruction and makes the instruction pointer go back one step, thereby ensuring that the original instruction is executed.