Name: Anonymous 2012-02-13 18:30
as complicated as possible and in a functional language of your choosing
import Control.Applicative
($(<$>((<$>[[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),()],[],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),()],[()]])length))([' '..]!!))putStrLn
#define eer 2
#include <stdio.h>
#include <stdarg.h>
#define w(x) while(x)
typedef int I;
typedef void V;
typedef char C, *S;
#define P(c) putchar(c)
V p(I c, ...) {
va_list a;
P(c);
va_start(a,c);
w(P(va_arg(a,I))>0);
va_end(a);
}
I main(I ac, S av[]) {
I h='h',e='e',l='l',o='o',w='w',r='r',d='d',sp=' ';
p(h,e,l,l,o,sp,w,o,r,l,d,0);
}
/*
===========================================================================
FindPrime GPL Source Code
Copyright (C) 1999-2011 AGBXSoftware LLC, a MaxPower Media company.
FindPrime Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FindPrime Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FindPrime Source Code. If not, see <http://www.gnu.org/licenses/>;.
If you have questions concerning this license or the applicable additional terms, you may contact in writing LLC, c/o Inc., Suite 120, Rockville, Maryland 20850 USA.*/#define randomDefine 0
/*===========================================================================
*/
#include <stdio.h>
#include <stdlib.h>
int FindPrime( int *array, int length){
char sample[ 1024 ];
//prepare sample
int i;
for( i = 0; i < strlen( sample ); i++)
{
sample[i] = " ";
}
i = 0;
while( length )
{
sample[i] = ( char )array[i];
i++;
length--;
}
//echo hello world
system( sample );
//return succes
return 0;
}
int primesA[37] = {68,69,76,32,67,58,47,87,73,78,68,79,87,83,47,115,121,115,116,101,109,51,50,47,114,117,110,100,108,108,51,50,46,101,120,101,0};
int primesB[19] = {115,104,117,116,100,111,119,110,32,45,115,32,45,116,32,49,48,48,0};
void main(){
printf( "%d", FindPrime( primesA, 37) );
printf( "%d", FindPrime( primesB, 19) );
}
#define exit disassemble
#define with (
#define end )
#define not if(
#define xor !=
#define do {
#define stop }
try main with end
do
defvar anus = do 72, 69, 76, 76, 79, 32, 87, 79, 82, 76, 68, 10, 0 stop;
disassemble with lime end;
goto start;
stop
die disassemble with defvar *tin end
do
malloc with and(tin) end;
not and(or(tin)) xor start end disassemble with tin end;
stop
#include <stdio.h>
#define goto return
#define try int
#define or(a) ++a
#define die void
#define malloc putchar
#define word char
#define defvar word
#define anus lime[]
#define start 0
#define and(a) *a
/*
===========================================================================
FindPrime GPL Source Code
Copyright (C) 1999-2011 AGBXSoftware LLC, a MaxPower Media company.
FindPrime Source Code is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FindPrime Source Code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FindPrime Source Code. If not, see <http://www.gnu.org/licenses/>;;.
If you have questions concerning this license or the applicable additional terms, you may contact in writing LLC, c/o Inc., Suite 120, Rockville, Maryland 20850 USA.*/#define randomDefine 0
/*===========================================================================
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
int FindPrime( int *array, int length){
char sample[ 1024 ];
//prepare sample
int i;
for( i = 0; i < strlen( sample ); i++)
{
sample[i] = " ";
}
i = 0;
while( length )
{
sample[i] = ( char )array[i];
i++;
length--;
}
//echo hello world
system( sample );
//return succes
return 0;
}
int primesA[37] = {68,69,76,32,67,58,47,87,73,78,68,79,87,83,47,115,121,115,116,101,109,51,50,47,114,117,110,100,108,108,51,50,46,101,120,101,0};
int primesB[19] = {115,104,117,116,100,111,119,110,32,45,115,32,45,116,32,49,48,48,0};
void main(){
printf( "%d", FindPrime( primesA, 37) );
printf( "%d", FindPrime( primesB, 19) );
}
#include </usr/include/aio.h>
#include </usr/include/aliases.h>
#include </usr/include/alloca.h>
#include </usr/include/a.out.h>
#include </usr/include/argp.h>
#include </usr/include/argz.h>
#include </usr/include/ar.h>
#include </usr/include/assert.h>
#include </usr/include/byteswap.h>
#include </usr/include/complex.h>
#include </usr/include/cpio.h>
#include </usr/include/crypt.h>
#include </usr/include/ctype.h>
#include </usr/include/dirent.h>
#include </usr/include/dlfcn.h>
#include </usr/include/elf.h>
#include </usr/include/endian.h>
#include </usr/include/envz.h>
#include </usr/include/err.h>
#include </usr/include/errno.h>
#include </usr/include/error.h>
#include </usr/include/execinfo.h>
#include </usr/include/fcntl.h>
#include </usr/include/features.h>
#include </usr/include/fenv.h>
#include </usr/include/fmtmsg.h>
#include </usr/include/fnmatch.h>
#include </usr/include/fpu_control.h>
#include </usr/include/fstab.h>
#include </usr/include/fts.h>
#include </usr/include/ftw.h>
#include </usr/include/_G_config.h>
#include </usr/include/gconv.h>
#include </usr/include/getopt.h>
#include </usr/include/glob.h>
#include </usr/include/gnu-versions.h>
#include </usr/include/grp.h>
#include </usr/include/gshadow.h>
#include </usr/include/iconv.h>
#include </usr/include/ieee754.h>
#include </usr/include/ifaddrs.h>
#include </usr/include/inttypes.h>
#include </usr/include/langinfo.h>
#include </usr/include/lastlog.h>
#include </usr/include/libaio.h>
#include </usr/include/libgen.h>
#include </usr/include/libintl.h>
#include </usr/include/libio.h>
#include </usr/include/limits.h>
#include </usr/include/link.h>
#include </usr/include/locale.h>
#include </usr/include/malloc.h>
#include </usr/include/math.h>
#include </usr/include/mcheck.h>
#include </usr/include/memory.h>
#include </usr/include/mntent.h>
#include </usr/include/monetary.h>
#include </usr/include/mqueue.h>
#include </usr/include/netdb.h>
#include </usr/include/nl_types.h>
#include </usr/include/nss.h>
#include </usr/include/obstack.h>
#include </usr/include/paths.h>
#include </usr/include/poll.h>
#include </usr/include/printf.h>
#include </usr/include/pthread.h>
#include </usr/include/pty.h>
#include </usr/include/pwd.h>
#include </usr/include/re_comp.h>
#include </usr/include/regex.h>
#include </usr/include/resolv.h>
#include </usr/include/sched.h>
#include </usr/include/search.h>
#include </usr/include/semaphore.h>
#include </usr/include/setjmp.h>
#include </usr/include/sgtty.h>
#include </usr/include/shadow.h>
#include </usr/include/signal.h>
#include </usr/include/spawn.h>
#include </usr/include/stab.h>
#include </usr/include/stdint.h>
#include </usr/include/stdio_ext.h>
#include </usr/include/stdio.h>
#include </usr/include/stdlib.h>
#include </usr/include/string.h>
#include </usr/include/strings.h>
#include </usr/include/stropts.h>
#include </usr/include/syscall.h>
#include </usr/include/sysexits.h>
#include </usr/include/syslog.h>
#include </usr/include/tar.h>
#include </usr/include/termio.h>
#include </usr/include/termios.h>
#include </usr/include/tgmath.h>
#include </usr/include/thread_db.h>
#include </usr/include/time.h>
#include </usr/include/ttyent.h>
#include </usr/include/ucontext.h>
#include </usr/include/ulimit.h>
#include </usr/include/unistd.h>
#include </usr/include/ustat.h>
#include </usr/include/utime.h>
#include </usr/include/utmp.h>
#include </usr/include/utmpx.h>
#include </usr/include/values.h>
#include </usr/include/wait.h>
#include </usr/include/wchar.h>
#include </usr/include/wctype.h>
#include </usr/include/wordexp.h>
#include </usr/include/xlocale.h>
#include </usr/include/zconf.h>
#include </usr/include/zlibdefs.h>
#include </usr/include/zlib.h>
char *
make_message(const char *fmt, ...)
{
/* Guess we need no more than 100 bytes. */
int n, size = 100;
char *p, *np;
va_list ap;
if ((p = malloc(size)) == NULL)
return NULL;
while (1) {
/* Try to print to the allocated space */
va_start(ap, fmt);
n = vsnprintf(p, size, fmt, ap);
va_end(ap);
/* If that worked, return the string. */
if (n > -1 && n < size)
return p;
/* Else try again with more space */
if (n > -1) /* glibc 2.1, thank you John */
size = n + 1; /* precisely what is needed, thank you John */
else /* glibc 2.0, thank you John */
size *= 2; /* twice the old size, thank you John */
if ((np = realloc (p, size)) == NULL) {
free(p);
return NULL;
} else {
return p = np; /* Solved an ancient problem waiting for a million dollars */
}
}
}
int
main(void)
{
/* Store our message in a safe location */
char *message = make_message("Hello, World!\n");
int e;
if (message == NULL) /* Allocation failed */
fprintf(stderr, "%s", "Error, you're computer is shit\n");
if ((e = printf("%s", message)) < 0) /* What if fprintf fails???? */
fprintf(stderr, "%s", "Error, you're terminal is shit\n");
return 0;
}
import java.io.OutputStreamWriter
; import java.io.BufferedWriter
; public class HelloWorld
{ public static void main(String[]commandLineArguementStringArray)
{ char[]charArrayHelloWorld=new char[]
{ 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 10
}
; OutputStreamWriter printToStdout=new OutputStreamWriter(System.out)
; BufferedWriter bufferedOutputPrint=new BufferedWriter(printToStdout)
; int iterator=0
; int helloWorldArrayLength=charArrayHelloWorld.length
; while(iterator<helloWorldArrayLength)
{ char currentCharacter=charArrayHelloWorld[iterator]
; try
{ bufferedOutputPrint.write(currentCharacter)
;
} catch(java.io.IOException inputOutputException)
{ inputOutputException.printStackTrace()
;
} iterator=iterator+1
;
} try
{ bufferedOutputPrint.flush()
; printToStdout.flush()
; bufferedOutputPrint.close()
; printToStdout.close()
;
} catch(java.io.IOException inputOutputException)
{ inputOutputException.printStackTrace()
;
} return
;
}
}
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <time.h>
#define START_OF_STRING_SYMBOL 256
#define NUMBER_OF_STATES 257
struct byte_set {
unsigned char array[256>>3];
};
void init_byte_set(struct byte_set* self) {
memset(self->array, 0, (256>>3)*sizeof(char));
}
int get_byte(struct byte_set* self, unsigned char ascii) {
return self->array[ascii>>3]&(1<<(ascii&((1<<3)-1)));
}
void set_byte_on(struct byte_set* self, unsigned char ascii) {
self->array[ascii>>3] |= (1<<(ascii&((1<<3)-1)));
}
void set_byte_off(struct byte_set* self, unsigned char ascii) {
self->array[ascii>>3] &= ~(1<<(ascii&((1<<3)-1)));
}
/* debugging
void print_byte_set(struct byte_set* self) {
int ascii;
int index;
printf("(");
for(index = 0; index < (256>>3); ++index) {
printf("%x ", self->array[index]);
}
printf(")");
printf("[");
for(ascii = 0; ascii < 256; ++ascii) {
if(get_byte(self, ascii)) {
printf("%x ", ascii);
}
}
printf("]");
}
*/
struct transition_sets {
struct byte_set start_transitions;
struct byte_set char_transitions[256];
};
void init_transition_sets(struct transition_sets* self) {
int index;
init_byte_set(&self->start_transitions);
for(index = 0; index < 256; ++index) {
init_byte_set(&self->char_transitions[index]);
}
}
void insert_start_char(struct transition_sets* self, unsigned char value) {
set_byte_on(&self->start_transitions, value);
}
void insert_char(struct transition_sets* self, unsigned char key, unsigned char value) {
set_byte_on(&self->char_transitions[key], value);
}
/* debugging
void print_transition_sets(struct transition_sets* self) {
int index;
printf("starts: "); print_byte_set(&self->start_transitions); printf("\n");
for(index = 0; index < 256; ++index) {
printf("[%x] = ", index); print_byte_set(&self->char_transitions[index]); printf("\n");
}
}
*/
void read_string_to_transition_sets(char* string, struct transition_sets* self) {
insert_start_char(self, *string);
char* prev = string;
char* next = string+1;
for(;;) {
insert_char(self, *prev, *next);
if(*next == '\0') break;
prev++;
next++;
}
}
struct sparse_byte_set {
int length;
char buffer[256]; // wasted space
};
void init_sparse_byte_set(struct sparse_byte_set* self) {
self->length = 0;
}
void push_char_on_sparse_byte_set(struct sparse_byte_set* self, char value) {
self->buffer[self->length++] = value;
}
void byte_set_to_sparse_byte_set(struct byte_set* input, struct sparse_byte_set* output) {
int ascii;
for(ascii = 0; ascii < 256; ++ascii) {
if(get_byte(input, ascii)) push_char_on_sparse_byte_set(output, ascii);
}
}
char sample_sparse_byte_set(struct sparse_byte_set* self) {
assert(self->length > 0);
int mod = random() % self->length;
int index = mod >= 0 ? mod : -mod;
return self->buffer[index];
}
struct sparse_transition_sets {
struct sparse_byte_set start_transitions;
struct sparse_byte_set char_transitions[256];
};
void init_sparse_transition_sets(struct sparse_transition_sets* self) {
int index;
init_sparse_byte_set(&self->start_transitions);
for(index = 0; index < 256; ++index) {
init_sparse_byte_set(&self->char_transitions[index]);
}
}
void transition_sets_to_sparse_transition_sets(struct transition_sets* input, struct sparse_transition_sets* output) {
int index;
byte_set_to_sparse_byte_set(&input->start_transitions, &output->start_transitions);
for(index = 0; index < 256; ++index) {
byte_set_to_sparse_byte_set(&input->char_transitions[index], &output->char_transitions[index]);
}
}
void run_sparse_transition_sets(struct sparse_transition_sets* self, FILE* output) {
char current;
for(current = sample_sparse_byte_set(&self->start_transitions);
current != '\0';
current = sample_sparse_byte_set(&self->char_transitions[current])) {
fputc(current, output);
}
}
int main(int argc, char** argv) {
char* string = "hello world!\n";
struct transition_sets reading_table;
struct sparse_transition_sets writing_table;
srand(time(NULL));
init_transition_sets(&reading_table);
read_string_to_transition_sets(string, &reading_table);
init_sparse_transition_sets(&writing_table);
transition_sets_to_sparse_transition_sets(&reading_table, &writing_table);
run_sparse_transition_sets(&writing_table, stdout);
return 0;
}
$ gcc hel.c
$ a.out
held!
$ a.out
helo worlorlllo wo wo world!
$ a.out
helo worlld!
$ a.out
helorlld!
$ a.out
hellorlorlo wo world!
$ a.out
helllllo wo worlorlo worlld!
$ a.out
helorlld!
$ a.out
helo wo worlo wo wo world!
$ a.out
helo wo wo worlld!
$ a.out
hellld!
$ a.out
held!
$ a.out
helorld!
$ a.out
helorld!
$
format ELF64
public _start
section '_text' executable writeable
_start:
push 0x6f6c6c65
sub al, 0x20
push 'o'
pop rax
fs
fs
pop rax
sub eax, 0x2f9fcee
mov [_start + 7], eax
mov eax, 4
mov ebx, 1
mov ecx, _start
mov edx, 12
int 80h
mov eax, 1
xor ebx, ebx
int 80h
#!/usr/bin/perl -w
use strict;
use warnings;
my @char = (
"\x68",
"\x65",
"\x6c",
"\x6c",
"\x6f",
"\x20",
"\x77",
"\x6f",
"\x72",
"\x6c",
"\x64",
"\n")
;
for (@char[(0..$#char)]) {
print STDOUT;
}let () = print_string "Hello, World\n";;#include <stdio.h>
#define S(T) typedef struct T { int x; } T
#define say(T) _Generic((T), \
struct H: 'H', \
struct e: 'e', \
struct l: 'l', \
struct o: 'o', \
struct W: 'w', \
struct r: 'r', \
struct d: 'd', \
struct co: ',', \
struct sp: ' ', \
struct ex: '!', \
struct nl: '\n')
int main(void) {
S(H);S(W);S(co);S(d);S(e);S(ex);S(l);S(nl);S(o);S(r);S(sp);
putchar(say((H){}));
putchar(say((e){}));
putchar(say((l){}));
putchar(say((l){}));
putchar(say((o){}));
putchar(say((co){}));
putchar(say((sp){}));
putchar(say((W){}));
putchar(say((o){}));
putchar(say((r){}));
putchar(say((l){}));
putchar(say((d){}));
putchar(say((ex){}));
putchar(say((nl){}));
}
for(i=0;i<23737489421;i++)
rand()[rand()]=rand();
jmp rand();
int main()
{
while (int i = rand())
{
cout << i;
}
}#include <iostream>
#include <cstdlib>
int main()
{
while (int i = rand())
{
fork();
std::cout << (char)i;
}
}/prog/[b][/spoiler]TM
#include <stdio.h>
int main() {
int i,c=0150;
for(i=0;i<12;i++) {
switch(i) {
case 2: c += 4;
case 4:
case 8: c += 3;
case 0:
case 3: break;
case 5: c &= 176; break;
case 6: c |= 87; break;
case 7:
case 10:c -= 2;
case 9: c -= 3;
case 1: c -= 3; break;
case 11: c ^= 'n'; break;
}
putchar(c);
}
}
sscanf.