Post your best C++ jokes, poems, stories, etc.

Pages: 123456
Aug 19, 2009 at 1:48am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int main() {
    father.release();
    mother.get(pregnant);
    char** baby = new char* [BABY_LIFE_MAX];

    myBaby Baby;
    while (!Baby.is_born)
        Baby.add(cells);

    int i = 0;

    if (Baby.is_born)
        while (!Baby.eof())
            baby[i] = 0x1;
    return dead;
Last edited on Sep 5, 2009 at 10:27pm
Aug 29, 2009 at 3:03am
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
double shitAmount;
bool toiletEmpty=true;
bool refreshed=false;
void wipeAss() {
toiletpapersheets-=5;
refreshed=true;
};
void flush() {
wipeAss();
shitAmount=0.0;
toiletEmpty=true;
};
void takeaShit() {
refreshed=false;
shitAmount=999999.0;
toiletEmpty=false;
refreshed=true;
cout<<"Ahhhhh...."<<endl<<"Much better."<<endl;
cin.get();
};
takeaShit();
flush();
cout<<"Yay!!! I have an auto-asswiping toilet!!! :D"<<endl;
cin.get();
return 0;
}
Aug 29, 2009 at 7:27pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
I=you=love.stranger.not();
I.knowsRules=you.knowsRules=1;
I.think(commitment::FULL);
//otherGuy.think(commitment::FULL);

I.tell(I.feeling,you);
I.make(&Person::understand,you);

while (0)
	I.giveUp(you);
while (0)
	I.letDown(you);
while (0){
	I.runAround();
	I.desert(you);
}
while (0)
	I.make(&Person::cry,you);
while (0)
	I.sayGoodbye();
while (0){
	I.lie();
	I.hurt(you);
}
Last edited on Aug 29, 2009 at 7:28pm
Aug 30, 2009 at 1:53am
LOL
Well played, Helios!
Sep 14, 2009 at 12:23pm
It's Python but whatever.

How to fly:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import flylib

def takeOff():
    i = 0
    while i < flylib.amt_of_engines:
        if flylib.engines(flylib.engine[i].start):
            print("Engine %d successfully started" % i)
        i += 1

    flylib.wing1.flaps.go(down)
    flylib.wing2.flaps.go(down)

    print("Flaps down")

    flylib.take_off()

    from antigravitylib import antigravity

    antigravity.init(antigravity.ANTIGRAVITY_INIT_EVERYTHING)

    from flylib import jet

    jet.take_off = true

    jet.flying = true

def fly():
    if flylib.engines(FLYIB_INIT_ENGINES):
        print("Engines initialized")

    there = false

    while not there:
        jet.stay_up()
        if flylib.distance < 1:
            there = true

def land():
    print("Landing")

    jet.land()
    jet.flying = false

    jet.wheels.down()

    flylib.wing1.flaps.go(up)
    flylib.wing2.flaps.go(up)

    jet.brake()

    print("Landing successful.")

def main():
    takeOff()
    fly()
    land()
    return 0

main()
Last edited on Sep 14, 2009 at 7:40pm
Sep 15, 2009 at 10:34pm
Programming in C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off!
Sep 15, 2009 at 11:04pm
Sep 16, 2009 at 5:23am
It's quite off-topic, but I think it's funny. I just love black humor.

File system Hardlinks Block journaling Case sensitive File change log Murders your wife
VMFS3 Yes No Yes No No
Lustre Yes Yes Yes No No
HFS Plus Partial No Partial Yes No
ReiserFS Yes Yes Yes No Yes


EDIT: Interestingly, the first Google result for "Murders your wife" is directly related to ReiserFS.
EDIT2: Actually, all the results are either directly related to ReiserFS or to a certain edit to a Wikipedia article.
Last edited on Sep 16, 2009 at 5:38am
Sep 16, 2009 at 11:56am
(NOTE: I'm treating \n as "slash N" here, '*' is "star", and < is "is less than")

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
using namespace std;
#include <string.h>

int main(int argc,
	char** argumentv)
{	cout << "Haiku time!";

cout << "\nThis "
<< "is quite challenging\n";
int i = 5;

for(i = 1;
i<32;
i+=1) {

cout << int(i) << '*'
<< "***\b\b"
<< '\n' << "***";}

cout << "Done\n"
<<"We make no more you are best.";
cin.ignore();

i=argc;
i=i+7;
return int(0);}


EDIT: That python code could be simplified to:
1
2
import antigravity
antigravity.enable()
Last edited on Sep 16, 2009 at 11:58am
Sep 16, 2009 at 4:18pm
closed account (S6k9GNh0)
I have a joke: Microsoft Windows virus counter-measures.
Last edited on Sep 16, 2009 at 4:18pm
Sep 16, 2009 at 5:14pm
I liked the haiku. Pretty good.

More flying:

Fast:

Python
1
2
3
4
5
6
from flylib import plane
plane.engines(start)
plane.take_off()
plane.fly()
plane.land()
# Execution time: ~3 seconds. 


Faster:

C
1
2
3
4
5
6
7
8
#include <plane.h>

int main() {
    struct plane* plane;
    memmove(plane->plane, plane->destination, sizeof(plane));
    return 0;
}
/* Execution time: <= 1 second */


C++
1
2
3
4
5
6
7
8
9
10
#include <plane>

int main() {
    plane plane;
    plane.takeOff();
    plane.fly();
    plane.land();
    return 0;
}
// Execution time: <= 1 second 


Fastest:

ASM
1
2
3
4
5
6
7
8
.intel_syntax noprefix

jmp start

start:
    mov destination, plane
    int 0x21
; Execution time: 0.1 seconds


I also have a confession to make.
I am a cracker.

Yes. That is right. Let that sink in.

I split long hydrocarbon molecules into shorter ones.
I am sorry.
Last edited on Sep 17, 2009 at 3:47pm
Sep 27, 2009 at 6:29pm
People should accept command line arguments:

"Hi, could you tell me where the meeting is?"
"Over there."
"Err... Hi, could you tell me where the meeting is? --verbose"
"Found input on stdin...
Parsing input, please wait...
Processed input; searching database...
Acquired suitable response:
Go along the hall there, take a left, and the meeting room is on your right."
"Thanks!"
Sep 28, 2009 at 2:45am
A bunch of command-line jokes, not really C++-related: http://www-users.cs.york.ac.uk/susan/joke/unix.htm

Most of them don't work unless you're using csh, some of them don't work unless you're using a specific flavor of UNIX.

EDIT: Also this, sort of related to C++: http://www-users.cs.york.ac.uk/susan/joke/c.htm

EDIT2: And this, actually related to C++: http://www-users.cs.york.ac.uk/susan/joke/cpp.htm
Last edited on Sep 28, 2009 at 3:19am
Sep 28, 2009 at 5:14am
^^^ WOW! Those are funny! Gotta send those to my programming friends now...
Sep 29, 2009 at 11:54am
An old one I've always enjoyed:

There are 10 kinds of people in the world. Those who know binary and those who don't.
Sep 29, 2009 at 12:03pm
I like that one too.
Sep 29, 2009 at 3:47pm
There are 10 kinds of people in the world — those who understand trinary, those who don't understand trinary and those who mistake it for binary.

http://www.gnu.org/fun/humor.html
Last edited on Sep 29, 2009 at 3:47pm
Sep 29, 2009 at 6:31pm
I mistook it for binary =[
I'm guessing 10 in trinary means 3...
Sep 29, 2009 at 6:40pm
The digit system works the same no matter what the base.

In binary you have two digits: 0 and 1
0 - zero
1 - one
10 - two == binary's "ten"

In trinary you have three digits: 0, 1, and 2
0 - zero
1 - one
2 - two
10 - three == trinary's "ten"

Etc.
Sep 29, 2009 at 6:41pm
I have a text file somewhere I wrote a year ago... let me find it.

Hmmm can't find it. It was a conversion table for Decimal, Octal and binary. I think I might have made it on my laptop actually... it had 1-10 in the three bases.
Last edited on Sep 29, 2009 at 6:46pm
Pages: 123456