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

Programmer Humor

31324 readers
25 users here now

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

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] casual_turtle_stew_enjoyer@sh.itjust.works 5 points 1 month 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.

[–] drathvedro@lemm.ee 2 points 1 month ago (4 children)

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?

[–] casual_turtle_stew_enjoyer@sh.itjust.works 1 points 1 month ago* (last edited 1 month ago) (3 children)

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@lemmy.world 3 points 1 month 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).

load more comments (2 replies)
load more comments (2 replies)
load more comments (4 replies)