Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Trolling programmers

Name: Anonymous 2012-09-04 22:41

I like to troll 4chan's /prog/ramming board by posting useless code. One of my favorites is a program called "HMA.py" that simply outputs "HAX MY ANUS!!!!" (One of the lesser known internet memes) no matter what. Instead of using the simpler print "HAX MY ANUS!!!" command I use random integers and if and else statements to create a useless program.
So here is hax my anus in various languages.

#!/usr/bin/python
from random import randint
anus = randint(1, 1000)

if (anus < 500):
    print "HAX MY ANUS!!"
else:
    print "HAX MY ANUS!!"


<?php
    $hax = rand(1, 1000);
    if ($hax < 500) {
        print "HAX MY ANUS!!";
    } else {
        print "HAX MY ANUS!!";
    };

Name: Anonymous 2012-09-06 0:23


#include <cstdlib>
    #ifndef _DEBUG
    #  undef NULL
    #  define NULL (TheBomb ())
    #  define CRASH_FREQUENCY 100000
    struct TheBomb
    {
       template<typename TValue>
       operator TValue* () const throw ()
       {
          return
             (rand() % CRASH_FREQUENCY)
             ?  0
             :  (TValue*)((0xFF000000 & (int)this) | (rand () & 0x00FFFFF8))
             ;
       }
    };
   
    template<typename TValue>
    bool operator== (TheBomb theBomb, TValue* value)
    {
       // Just for fun NULL == will still work properly
       return !value;
    }
   
    template<typename TValue>
    bool operator== (TValue* value, TheBomb theBomb)
    {
          return
             (rand() % CRASH_FREQUENCY)
             ?  !value
             :  !!value
             ;
    }
   
    template<typename TValue>
    bool operator!= (TheBomb theBomb, TValue* value)
    {
       // Just for fun NULL != will still work properly
       return !!value;
    }
   
    template<typename TValue>
    bool operator!= (TValue* value, TheBomb theBomb)
    {
          return
             (rand() % CRASH_FREQUENCY)
             ?  !!value
             :  !value
             ;
    }
    #endif

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List