Trolling programmers
1
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!!";
};
2
Name:
Anonymous
2012-09-04 22:48
Hack my Anonymous Unix System
3
Name:
Anonymous
2012-09-04 22:50
Look how horrible python and php look compared to the C version.
#include <stdio.h>
int main(void) {
(rand()%1000 + 1 > 500) ? puts("HAX MY ANUS!!") : puts("HAX MY ANUS!!");
return(0);
}
4
Name:
Anonymous
2012-09-04 22:55
I am continueing troll post with Javascript
function __dbg_hax__() {
console.log('HAX MY ANUS');
}
var hax = Math.random() * 1000;
if (hax < 500) {
__dbg_hax__();
} else {
__dbg_hax__();
}
5
Name:
Anonymous
2012-09-05 4:33
>>3
Ugh
#include <stdio.h>
int main()
{
puts(rand() % 1000 + 1 < 500 ? "HAX MY ANUS!!" : "HAX MY ANUS!!");
return 0;
}
6
Name:
Anonymous
2012-09-05 15:42
>>5
OPTIMIZATION
.data
anus:
.ascii "HAX MY ANUS!!\n\0"
.text
.globl _start
_start:
pushl $anus
call puts
addl $4, %esp
pushl $0
call exit
7
Name:
Anonymous
2012-09-05 16:17
Honestly, I'm surprised more people don't try to fuck with programmers. It seems to me it should be easy enough to make a huge fucking mess of code that is really meaningless and will waste their time. Yet I never see that happen.
8
Name:
Anonymous
2012-09-05 16:20
>>7
Just overload the ";"
operator
Yeah Perl6, i'm looking at you.
9
Name:
Anonymous
2012-09-06 0:02
trolling /prog/
Isn't it easier to just say "SICP + Sepples FTW" or something?
10
Name:
Anonymous
2012-09-06 0:09
>>9
No because that doesn't work because it's too plainly obvious, and doesn't affect them in any way.
11
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
12
Name:
Anonymous
2012-09-06 0:26
>>11
#define define undef
13
Name:
Anonymous
2012-09-06 1:17
#!/bin/bash
#helloworldchecker.sh
./helloworld.sh >> helloworldlog.txt
for (( ; ; ))
do
grep "Hello World" helloworldlog.txt
done
------------------------------------------------------
#!/bin/bash
#helloworld.sh
for (( ; ; ))
do
function X() {
cat /dev/urandom| tr -dc '[a-z][A-Z][0-9]-_!@#$%^&*()_+{}|:?='|head -c 1
}
H=$(X)
E=$(X)
L=$(X)
L2=$(X)
O=$(X)
W=$(X)
O2=$(X)
R=$(X)
L3=$(X)
D=$(X)
function Y() {
(shuf /usr/share/dict/words 2>/dev/null | grep "$H$E$L$L2$O" 2>/dev/null| head -n 1 2>/dev/null)
}
A=$(Y)
function Z() {
(shuf /usr/share/dict/words 2>/dev/null | grep "$W$O2$R$L3$D" 2>/dev/null| head -n 1 2>/dev/null)
}
B=$(Z)
for i in $A; do A2=`echo -n "${i:0:1}" | tr "[:lower:]" "[:upper:]"`;
echo -n "${A2}${i:1} "; done
for i in $B; do B2=`echo -n "${i:0:1}" | tr "[:lower:]" "[:upper:]"`;
echo -n "${B2}${i:1}"; done
done
14
Name:
Anonymous
2012-09-06 1:31
The ultimate troll code!
if (var != NULL)
...
15
Name:
Anonymous
2012-09-06 9:53
<h1>Hello anus!</h1>
16
Name:
Anonymous
2012-09-06 12:56
document
.createElement("h1")
.appendChild(
document.createTextNode("nyaaan!")
);
17
Name:
Anonymous
2012-09-06 13:52
Sigh. Let's get some Java in here /prog/migos.
public class haxAnus
{
public static void main(String args[])
{
do
{
System.out.println("HAX MY ANUS!");
}while(1==1);
}
}
18
Name:
Anonymous
2012-09-06 13:56
19
Name:
Anonymous
2012-09-06 15:42
20
Name:
Anonymous
2012-09-06 17:28
>>18
Good thing that's not Java then
21
Name:
Anonymous
2012-09-06 18:37
>>17
do while
Back to le hacker news, please!
22
Name:
Anonymous
2012-09-07 23:02
#include <iostream>
#include <rand>
void main(void) {
unsigned int anus = (rand() % 1000) + 1;
if (anus < 500) {
cout << "HAX MY ANUS" << endl;
} else {
cout << "HAX MY ANUS" << endl;
}
return 0;
}
The ultimate troll program!
23
Name:
Anonymous
2012-09-08 1:30
Let's get some DOS up here!
echo HAX MY ANUS
24
Name:
Anonymous
2012-09-08 1:32
Fight with the autists on freenode's ##c.
25
Name:
Anonymous
2012-09-08 2:01
Reading ##c is the fastest way to realize that C is never the answer.
26
Name:
Anonymous
2012-09-08 2:09
\r\n|yes