this post was submitted on 21 May 2024
1605 points (98.8% liked)

Programmer Humor

32360 readers
854 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
(page 3) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 27 points 5 months ago (4 children)

I recently took a class on ARM assembly, and yet I don't even know half of these x86 instructions.

load more comments (4 replies)
[–] [email protected] 127 points 5 months ago (18 children)

Just yesterday I ran into some chucklehead here on Lemmy that had convinced themselves that the average person would interpret "crypto" to mean SSL rather than cryptocurrency.

load more comments (17 replies)
[–] [email protected] 19 points 5 months ago (1 children)

Now I want to know what int3 does.

[–] [email protected] 23 points 5 months ago* (last edited 5 months ago) (5 children)

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.

load more comments (5 replies)
[–] [email protected] 23 points 5 months ago (2 children)

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

load more comments (2 replies)
[–] [email protected] 35 points 5 months ago (3 children)

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

[–] [email protected] 11 points 5 months ago (3 children)

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.

load more comments (2 replies)
[–] [email protected] 4 points 5 months ago* (last edited 5 months ago) (1 children)

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.

[–] [email protected] 3 points 5 months ago (4 children)
load more comments (4 replies)
load more comments (1 replies)
[–] [email protected] 5 points 5 months ago (7 children)

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.

load more comments (7 replies)
[–] [email protected] 7 points 5 months ago (3 children)

I'm missing the joke... would anyone be so kind to help me understand?

[–] [email protected] 19 points 5 months ago (1 children)

The people in the picture are so used to working with assembly language, that even though they know the average person doesn’t know much about assembly, they assume the average person knows a little, which is already way more than the average person actually knows.

[–] [email protected] 10 points 5 months ago* (last edited 5 months ago)

I speak fluent x86, I've been writing xor eax, eax before rax was a thing and you had to wonder whether you shouldn't be using xor rax, rax (you shouldn't), I figured out how to write linux binaries in pure assembly before arch was a thing, just don't throw sse or something arcane like aaa at me. But damned if I know a single opcode.

Reverse engineers are a whole different kind of breed. And apparently they hate rust.

load more comments (1 replies)
[–] [email protected] 137 points 5 months ago (6 children)

One of the most useful concepts ever:

the Curse of Knowledge.

Explaining something to someone? Zoom out. Back up. What if that person were an alien, how much more context would you need to explain?

The curse of knowledge is a cognitive bias that occurs when an individual, who is communicating with others, assumes that others have information that is only available to themselves, assuming they all share a background and understanding. This bias is also called by some authors the curse of expertise.

[–] [email protected] 43 points 5 months ago (2 children)

what's it called when you try to be aware of this and inadvertently say stuff that comes off as condescending, umm, asking for a friend

[–] [email protected] 23 points 5 months ago (4 children)

ooooof

I know for men who are equal opportunity overexplainers it can still be seen as “mansplaining” when overexplaining to women.

But in general, if your tone of voice is right and it’s still happening, perhaps communicating your intention and a safeguard would work, at least sometimes?

May I try to explain this? If I start too basic, and overexplain so it feels condescending, please stop me so I can dig into it more technically.

load more comments (4 replies)
load more comments (1 replies)
[–] [email protected] 50 points 5 months ago (1 children)

My friend really needs to learn about this. He works for Intel and does some really involved stuff, I on the other hand am a moronic jackass factory worker.

No friend, I haven't the slightest idea what you're trying to tell me you did if you keep using technical terms.

[–] [email protected] 16 points 5 months ago (3 children)

If you said something like “if I were a marketing intern…” or “if I were a college freshman majoring in English, how would you explain it?”

…would he not know how to clearly communicate still? :)

Maybe get him with the “is this a curse of knowledge situation?” (along with a link to Wikipedia) heh

load more comments (3 replies)
load more comments (4 replies)
[–] [email protected] 19 points 5 months ago* (last edited 5 months 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."

[–] [email protected] 29 points 5 months ago (2 children)

I mean I'm only missing int3

[–] [email protected] 2 points 5 months ago

I think it is 0xCC, or in long form 0xCD03

[–] [email protected] 35 points 5 months ago (1 children)

I didn't even know they released int2

[–] [email protected] 22 points 5 months ago (3 children)
[–] [email protected] 7 points 5 months ago (1 children)

It's one of my six dump stats.

load more comments (1 replies)
[–] [email protected] 14 points 5 months ago

I rolled a 14, so I have a +2 modifier.

[–] [email protected] 4 points 5 months ago

I've got intelligible but that's about it

[–] [email protected] 30 points 5 months ago (1 children)

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

[–] [email protected] 4 points 5 months ago

Just looked this up and subscribed to the channel.

[–] [email protected] 31 points 5 months ago (1 children)
[–] [email protected] 10 points 5 months ago (1 children)

I feel like I skipped right over this comment.

[–] [email protected] 11 points 5 months ago (1 children)
[–] MuAraeOracle 6 points 5 months ago

I'm more in a JNZ mood.

[–] [email protected] 27 points 5 months ago

of course nods along

[–] [email protected] 40 points 5 months ago (1 children)
[–] [email protected] 15 points 5 months ago (2 children)

0x90^0x90^0x90^0x90^0x90^0x90^0x90^0x90^0x90^0x90^

[–] [email protected] 8 points 5 months ago

IDS will catch that. You need a logical sled that does effectively nothing but isn’t actually composed of NOPs.

load more comments (1 replies)
[–] [email protected] 66 points 5 months ago (2 children)

Isn't there a version about mineralogy?

[–] [email protected] 104 points 5 months ago (1 children)
[–] [email protected] 31 points 5 months ago

Oh, OP got me fooled, I thought this is original xkcd, well done on photoshop.

[–] [email protected] 33 points 5 months ago (2 children)

"So this here is a rock"
"Uhh, in english please?"

[–] [email protected] 27 points 5 months ago

"Oy! Guv! This here's a rock, innit?"

[–] [email protected] 77 points 5 months ago (1 children)

All the code I know is stackoverflow search results.

[–] [email protected] 38 points 5 months ago

Things said by Github copilot.

load more comments
view more: ‹ prev next ›