CodyIT@programming.dev to Programmer Humor@programming.dev · 2 months agothe beautiful codeprogramming.devexternal-linkmessage-square158fedilinkarrow-up1269arrow-down11
arrow-up1268arrow-down1external-linkthe beautiful codeprogramming.devCodyIT@programming.dev to Programmer Humor@programming.dev · 2 months agomessage-square158fedilink
minus-squaregmtom@lemmy.worldlinkfedilinkarrow-up1·2 months ago All programs can be written with on less line of code. All programs have at least one bug. The humble “Hello world” would like a word.
minus-squareAmberskin@europe.publinkfedilinkarrow-up3·2 months agoJust to boast my old timer credentials. There is an utility program in IBM’s mainframe operating system, z/OS, that has been there since the 60s. It has just one assembly code instruction: a BR 14, which means basically ‘return’. The first version was bugged and IBM had to issue a PTF (patch) to fix it.
minus-squareDaPorkchop_@lemmy.mllinkfedilinkarrow-up1·2 months agoOkay, you can’t just drop that bombshell without elaborating. What sort of bug could exist in a program which contains a single return instruction?!?
minus-squareAmberskin@europe.publinkfedilinkarrow-up1·2 months agoIt didn’t clear the return code. In mainframe jobs, successful executions are expected to return zero (in the machine R15 register). So in this case fixing the bug required to add an instruction instead of removing one.
minus-squarephx@lemmy.calinkfedilinkarrow-up1·2 months agoYou can fit an awful lot of Perl into one line too if you minimize it. It’ll be completely unreadable to most anyone, but it’ll run
minus-squareSchadrach@lemmy.sdf.orglinkfedilinkEnglisharrow-up2·2 months agoQrpff says hello. Or, rather, decrypts DVD movies in 472 bytes of code, 531 if you want the fast version that can do it in real time. The Wikipedia article on it includes the full source code of both. https://wikipedia.org/wiki/Qrpff
The humble “Hello world” would like a word.
Just to boast my old timer credentials.
There is an utility program in IBM’s mainframe operating system, z/OS, that has been there since the 60s.
It has just one assembly code instruction: a BR 14, which means basically ‘return’.
The first version was bugged and IBM had to issue a PTF (patch) to fix it.
Okay, you can’t just drop that bombshell without elaborating. What sort of bug could exist in a program which contains a single return instruction?!?
It didn’t clear the return code. In mainframe jobs, successful executions are expected to return zero (in the machine R15 register).
So in this case fixing the bug required to add an instruction instead of removing one.
You can fit an awful lot of Perl into one line too if you minimize it. It’ll be completely unreadable to most anyone, but it’ll run
Qrpff says hello. Or, rather, decrypts DVD movies in 472 bytes of code, 531 if you want the fast version that can do it in real time. The Wikipedia article on it includes the full source code of both.
https://wikipedia.org/wiki/Qrpff