Futurama   Planet Express Employee Lounge
The Futurama Message Board

Design and Support by Can't get enough Futurama
Futurama chat

PEEL - The Futurama Message Board    General Futurama Forum Category    Re-Check/Weird Scenes    10 sin, 20 go to hell « previous next »
 Topic locked! 
: 10 sin, 20 go to hell  (Read 15563 times)
: [1] 2 Print
Mr. Mxyzptlk

Crustacean
*
« : 07-01-2003 23:29 »

10 sin
20 go to hell

alright....i know it's something to do with programming in BASIC....but I still don't get the joke....i figure if anyone can help me out this is the place to come!
El Zilcho

Professor
*
« #1 : 07-01-2003 23:37 »
« : 07-01-2003 23:37 »

10 Sin: Tells program to run a "Sin" subroutine.
20 Goto Hell: Tells program to go to a "Hell" label.

BASIC code is typed like that. 10 is the first line, 20 is the second, and so on. The program performs line 10 first, then goes to line 20. another example is
10 Home
20 Sweet
30 Goto 10
which means that line 30 goes back to line 10, making the whole thing read "Home Sweet Home."

If none of that made sense, then 10 Sin: 20 Goto Hell means "If sin, Then Goto hell."

P.S. I love that username!
ShineFusion

Professor
*
« #2 : 07-01-2003 23:44 »

I never understood that joke either.
beck

Bending Unit
***
« #3 : 07-01-2003 23:50 »

El Zilcho
 
Quote
10 Home
20 Sweet
30 Goto 10
which means that line 30 goes back to line 10, making the whole thing read "Home Sweet Home."
Wouldnt that rather be an endless Home Sweet Home Sweet Home Sweet...  :)
El Zilcho

Professor
*
« #4 : 07-01-2003 23:55 »

Yeah... but at least this time I didn't screw up, the writers did.
Chriswell

Bending Unit
***
« #5 : 07-01-2003 23:55 »

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
El Zilcho

Professor
*
« #6 : 07-01-2003 23:58 »

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?
JDHannan

Bending Unit
***
« #7 : 07-02-2003 01:17 »

yeah, u guys almost all suck
if you REALLY wanted it to work and have a loop you'd have to have something like
10 loop=0
20 Home
30 if loop = 1 then END
40 Sweet
50 loop = loop+1
60 goto 20
(that was really hard to write cuz its so stupid)
beck

Bending Unit
***
« #8 : 07-02-2003 02:10 »
« : 07-02-2003 02:10 »

JDH
 
Quote
that was really hard to write cuz its so stupid
Did you mean, that it was really hard to write in spite of the fact that it's so stupid? I think, it'd give a better idea of what kind of  person you are.  :)  :D
chickuaua

Crustacean
*
« #9 : 07-02-2003 07:37 »

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  :D

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"

 :D :D B-)
Mr. Mxyzptlk

Crustacean
*
« #10 : 07-02-2003 12:02 »

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
*
« #11 : 07-02-2003 12:56 »
« : 07-02-2003 12: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:
 
Quote
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
 
Quote
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.
canned eggs

Space Pope
****
« #12 : 07-02-2003 13:28 »

 
Quote
Originally posted by chickuaua:
This really should make an infinite loop, just look at recursive names like "PHP: PHP Hypertext Preprocessor" and "GNU: GNU's Not Unix"

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.
JDHannan

Bending Unit
***
« #13 : 07-02-2003 13:48 »

no i did not mean in spite of the fact that its so stupid.  Its hard to write that because its so stupid.  Any normal person would write
10 Home
20 Sweet
30 Home
END
Amorpheus

Delivery Boy
**
« #14 : 07-02-2003 14:17 »

But that wouldn't be funny, would it?  :rolleyes:

And yeah, there was a loop joke in I Dated A Robot: "Oh dear, she's stuck in an infinite loop and he's an idiot. Oh well, that's love for you..." One of my favorites.  :D
El Zilcho

Professor
*
« #15 : 07-02-2003 15:54 »

 
Quote
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
*
« #16 : 07-02-2003 15:56 »
« : 07-02-2003 15:56 »

 
Quote
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.
canned eggs

Space Pope
****
« #17 : 07-02-2003 17:40 »

VIEWIC is cool because "VIEWIC Identifies Ellipsis When It Can" contains ellipsis.  Also, it's antecedent-contained ellipsis, so it forms another infinite loop.
Sil

Professor
*
« #18 : 07-03-2003 08:40 »

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.
JDHannan

Bending Unit
***
« #19 : 07-03-2003 10:36 »

Sil> I am a dead horse, stop beating me.
El Zilcho> THANK YOU.  i've been trying to figure that one out, its not lessthan/equalto its a pointer
M points to (or "is for" ) the many things she gave me!!!
YES!
PCC Fred

Space Pope
****
« #20 : 07-04-2003 03:28 »

 
Quote
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
*
« #21 : 07-04-2003 11:01 »

 
Quote
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
*
« #22 : 07-04-2003 13:21 »

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
*
« #23 : 07-04-2003 13:32 »

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.)
PCC Fred

Space Pope
****
« #24 : 07-04-2003 18:11 »

 
Quote
Originally posted by chickuaua:
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

Don't interrupt me when I'm showboating, dammit!
Tjoppen
Delivery Boy
**
« #25 : 07-04-2003 20:10 »

Code: [Select]
call sin
jmp hell

:>
chickuaua

Crustacean
*
« #26 : 07-05-2003 08:34 »
« : 07-05-2003 08:34 »

for ( ;; ) { cout << "HOME\n" << "SWEET\n" }
  :p  :p
Tjoppen
Delivery Boy
**
« #27 : 07-05-2003 10:15 »

HOME and SWEET are subroutines. It doesn't print anything(unless the subs themselves do). In C/C++:
Code: [Select]
for(;;)
{
Home();
Sweet();
}
chickuaua

Crustacean
*
« #28 : 07-05-2003 13:05 »

or better yet ...

void Home ( void ) {
  Sweet ();
}

void Sweet ( void ) {
  Home ();
}

 :p :p :p
SQFreak

Professor
*
« #29 : 07-05-2003 13:55 »
« : 07-05-2003 13:55 »

Nice catch, Tjoppen.

chickuaua: Something has to call Home(). And why is there a "void" parameter? Is that just a stylistic choice, or is there a syntactical reason?
Yorokobi

Bending Unit
***
« #30 : 07-05-2003 14:33 »

10 DIM MSG$(3)
20 LET MSG$(1)="HOME"
30 LET MSG$(2)="SWEET"
40 LET MSG$(3)=MSG$(1)
50 FOR I=1 to 3
60 PRINT MSG$(I)
70 NEXT I
SQFreak

Professor
*
« #31 : 07-05-2003 15:07 »

...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
**
« #32 : 07-05-2003 15:49 »

chickuaua: No compiler will accept that code(although I guess you knew that)  :p

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:
Code: [Select]
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:
Code: [Select]
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
*
« #33 : 07-05-2003 22:22 »

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.
chickuaua

Crustacean
*
« #34 : 07-06-2003 04:09 »

You guys are making this joke seem very very stupid, that is, the attempts to make something like that work are really   :puke:
Tjoppen
Delivery Boy
**
« #35 : 07-06-2003 07:03 »

Well, we cooked our shoes in the dryer and got bored...
PCC Fred

Space Pope
****
« #36 : 07-06-2003 16:21 »

I think I can tighten up my earlier code:

10 FOR N=1 TO 2:PRINT "HOME":IF N=1 THEN PRINT "SWEET"
20 NEXT N: END
SQFreak

Professor
*
« #37 : 07-06-2003 16:40 »

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).
Bones

Bending Unit
***
« #38 : 07-07-2003 16:07 »

my head hurts
Yorokobi

Bending Unit
***
« #39 : 07-07-2003 16:33 »

Well, obviosly the

10 HOME
20 SWEET
30 GOTO 10

is a simplification, so you can read it, get the joke, and continue watching the episode.

It's still interesting to dig up this truely moldy knowledge (for me anyway) and have a go at what it should say.

As with all programming languages, we see the prefernces of the programmer in the various code examples that have been offered.

And as will all programming lanugages there are about as many ways to approach it as there are people offering opinions.

Heck we could go nuts and read hex code that corrisponds to the ASCII codes of each of the characters, and read that out of a seperate data file....  and so on...
: [1] 2 Print 
 Topic locked! 
« previous next »
:  

SMF 2.0.17 | SMF © 2019, Simple Machines | some icons from famfamfam
Legal Notice & Disclaimer: "Futurama" TM and copyright FOX, its related entities and the Curiosity Company. All rights reserved. Any reproduction, duplication or distribution of these materials in any form is expressly prohibited. As a fan site, this Futurama forum, its operators, and any content on the site relating to "Futurama" are not explicitely authorized by Fox or the Curiosity Company.
Page created in 0.229 seconds with 179 queries.