Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

http://ideology.com.au/polyglot/ is a nice eight-language (Cobol, Pascal, Fortran, C, PostScript, Shell, x86, Perl) polyglot program.

Conveniently, it has a source viewer which will highlight relevant parts of the program's structure for a given language. For instance, the C compiler sees this: http://ideology.com.au/polyglot/c/



Check out this.

http://shinh.skr.jp/dat_dir/fizzbuzz7.gif

It is a valid GIF image file, but also a valid Fizz Buzz program in Ruby, Perl, Befunge, Z80 machine code, and x86 machine code.


Befunge makes it epic, but it could be polycode for the ages if the picture itself compiled to a FizzBuzz program in Piet (http://www.dangermouse.net/esoteric/piet.html)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: