Aesthetic Hacking

A few aesthacking examples

A RPN Calculator in many languages by Frederik

A RPN calculator in 30 languages:, Ada, Assembler (MC68000), AWK, Bash, Brainfuck, C, C#, C++, Chef, Common Lisp, Emacs Lisp, Erlang, Fortran, Haskell, Io, Java, JavaScript, K, O’Caml, Pascal, Perl, PHP, PostScript, Python, Ruby, Scala, Scheme, Sed, Standard ML, TCL.

Polyglot program, by Kevin Bungard, Peter Lisle, and Chris Tham

Can be compiled in the 7 following langages: ANSI COBOL, ISO Pascal, ANSI Fortran, ANSI C, PostScript, Bourne shell script, and is a binary for 8086 machine language. A few examples:

% cp polyglot polyglot.c
% gcc polyglot.c
polyglot.c:
 1: warning: data definition has no type or storage class
% ./a.out
hello polyglots
% cp polyglot polyglot.sh
% chmod 755 polyglot.sh
% ./polyglot.sh 
hello polyglots
...

C palindrome, unknown author and date

A C palindrome program.

Ultimately cyclic ASCII art C program

To see the behaviour of this wonderful program that combines the art of ASCII images and of C programming, type the following lines in a shell:

% gcc dhyang.c
% ./a.out > 1.c
% cat 1.c
% gcc 1.c
% ./a.out > 2.c
% cat 2.c
% gcc 2.c
% ./a.out > 3.c
% cat 3.c
% gcc 3.c
% ./a.out > 4.c
% diff 4.c 1.c

Programming Langages & Formats

Leave a Reply

Your email address will not be published. Required fields are marked *