|
|
ShineFusion
Professor
|
|
I never understood that joke either.
|
|
|
|
|
|
El Zilcho
Professor
|
|
Yeah... but at least this time I didn't screw up, the writers did.
|
|
|
|
|
|
El Zilcho
Professor
|
|
It's not 20 SWEET HOME, just 20 SWEET. In any case, in yours the END comes after the GOTO, so wouldn't it just keep GOING TO?
|
|
|
|
|
|
|
chickuaua
Crustacean
|
|
In Mother's day, there are also some programming language jokes.. A sign says: REPEAT { LOVE MOM } WHILE 1>0; This is probably Pascal, because in C there is no repeat..while loop. This code would just make an infinite loop not doing anything, since { LOVE MOM } is a code comment. Also, another sign says: CHR$(77) => "MANY THINGS SHE GAVE ME" Although this doesn't make sense in any programming language, CHR$(77) means (in BASIC) ASCII character number 77, 'M' Jokes like this should all really just be funny and not logical And, yes, I'm a programmer 10 SIN 20 GOTO HELL This isn't stupid, it's just funny It's no conditional jump, so, from this code, you'd just sin and go to hell 10 HOME 20 SWEET 30 GOTO 10 This really should make an infinite loop, just look at recursive names like "PHP: PHP Hypertext Preprocessor" and "GNU: GNU's Not Unix" B-)
|
|
|
|
|
Mr. Mxyzptlk
Crustacean
|
|
I figured that was what it meant but everyone seems to think that joke was amazing.....guess you have to be a programmer.....that joke is nothing compared to Fry missing the button in the middle of the target in "A Big Piece Of Garbage"...."oops"
|
|
|
|
|
SQFreak
Professor
|
|
|
« Reply #11 on: 07-02-2003 14:56 »
« Last Edit on: 07-02-2003 14:56 »
|
|
REPEAT is probably Pascal, but if they had used do...while, that can be C(++). The infinite loop is part of the joke. Only CompSci people would get it, and if you get it, it is really funny. Wasn't there an infinite loop joke in "I Dated a Robot"? At a camp I went to, it's a tradition to make class T-shirts. The Artificial Intelligence class's t-shirt was: How to make an infinite loop: see other side on both sides of the shirt. If they'd had extras, I would have bought one. The real reason that BASIC is written 10 STATEMENT ONE 20 STATEMENT TWO 30 STATEMENT THREE
(in increments of ten) is so that a programmer can come back in later and add, say, a line 25 without having to redo all the numbers.
|
|
|
|
|
|
|
|
El Zilcho
Professor
|
|
Originally posted by chickuaua: CHR$(77) => "MANY THINGS SHE GAVE ME"
Although this doesn't make sense in any programming language, CHR$(77) means (in BASIC) ASCII character number 77, 'M' "M is for the many things she gave me..."
|
|
|
|
|
El Zilcho
Professor
|
|
|
« Reply #16 on: 07-02-2003 17:56 »
« Last Edit on: 07-02-2003 17:56 »
|
|
Originally posted by canned eggs: Some people I know in a computational linguistics course wrote a program to identify ellipsis called VIEWIC. VIEWIC stands for: "VIEWIC Identifies Ellipsis When It Can." I always thought that was real clever. Sounds like a Dilbert joke. "What does TTP stand for?" " The TTP Project. " EDIT: Dammit, sorry for the double post. I was gonna paste this one into my first one.
|
|
|
|
|
|
Sil
Professor
|
|
If you look at the number of Bender and Fry's apartment door, I think it's something like 00100100 , but I can't remember off the top of my head. In any case, and I don't know whether it's been said before, but in the ASCII, that number means $.
Well I thought it was funny.
|
|
|
|
|
|
PCC Fred
Space Pope
|
|
Originally posted by Chriswell: It's funny only if you're familiar with Basica programming.
Notice in I, Roomate the sign:
10 HOME 20 SWEET HOME 30 GOTO 10
Of ocurse it's flawed with that it'll make HOME SWEET HOME an infinite loop. Would've made more sense if it went:
10 HOME 20 SWEET HOME 30 GOTO 10 40 END
-cs
That wouldn't work either, because line 30 causes it to return to line 10, and the prgram never reaches line 40, and therefore never ends. However the following program WILL work. 10 FOR N = 1 TO 2 20 PRINT "HOME" 30 IF N = 1 THEN PRINT "SWEET" 40 NEXT N 50 END Now if you want to see a BASIC program with some chest hair on it, click on the following link: http://teral.netfirms.com/PEEL/fred/Ff12003.zip
|
|
|
|
|
Sil
Professor
|
|
Originally posted by JDHannan: Sil> I am a dead horse, stop beating me.
I didn't know it had been said already, or I wouldn't have posted it at all.
|
|
|
|
|
chickuaua
Crustacean
|
|
Is it just me, or is BASIC a problem to you guys ? :P Please don't make up any programs that would work, because that really doesn't make sense since that stuff in futurama is meant to be a joke and not supposed to work! :P
|
|
|
|
|
SQFreak
Professor
|
|
How about we do this in C++?
for (int i = 0;i <= 1;i++) { cout << "HOME"; if (i == 0) { cout << "SWEET"; } }
(I used the AP Subset - assume <iostream.h> is included.)
|
|
|
|
|
|
Tjoppen
Delivery Boy
|
|
call sin jmp hell :>
|
|
|
|
|
|
Tjoppen
Delivery Boy
|
|
HOME and SWEET are subroutines. It doesn't print anything(unless the subs themselves do). In C/C++:
for(;;) { Home(); Sweet(); }
|
|
|
|
|
chickuaua
Crustacean
|
|
or better yet ... void Home ( void ) { Sweet (); } void Sweet ( void ) { Home (); }
|
|
|
|
|
|
|
SQFreak
Professor
|
|
...but that's not infinite... I don't know enough BASIC to change it, but if you infinitize it, you should be able to mod I by 3 and choose a message.
|
|
|
|
|
Tjoppen
Delivery Boy
|
|
chickuaua: No compiler will accept that code(although I guess you knew that) SQFreak: The void parameter is optional in the function prototype, however I would recommend not omitting them since it makes code oh so much more readable Also, here's the code for a 23 byte ASM program that prints the HOME SWEET inf. loop: org 0x100 mov dx, string mov ah, 09h loop1: int 21h jmp loop1
string db "HOME",13,10,"SWEET",13,10,"$" What one could do with Yorokobi's program is this: 5 OPTION BASE 0 10 DIM MSG$(3) 20 LET MSG$(0)="HOME" 30 LET MSG$(1)="SWEET" 40 LET MSG$(2)=MSG$(0) 50 I = 0 60 PRINT MSG$(I) 70 I = (I + 1) MOD 3 80 GOTO 60 <Leela> Sigh.. I need coffee. </Leela>
|
|
|
|
|
SQFreak
Professor
|
|
Tjoppen: Sure a compiler will accept the code if you pre-declare the functions (write function prototypes before writing the functions, like you do in header files of classes.). BTW, AP Subset does not allow void parameters. Strange. I didn't know they existed.
|
|
|
|
|
|
Tjoppen
Delivery Boy
|
|
Well, we cooked our shoes in the dryer and got bored...
|
|
|
|
|
|
SQFreak
Professor
|
|
But it's still not infinite and the other one was much more readable. I prefer to sacrifice number of lines (and source code size) for readability. Tjoppen's is my favorite (the infinite BASIC program).
|
|
|
|
|
|
|