These kinds of "multi-lingual" programs are known as "polyglots" and there is relatively small collection at The Polyglot List.
It's not on the list, but I like this eight-language polyglot; it runs in Bash, Perl, Tcl, C++, ANSI C, Python and Literate Haskell. It's not valid Whitespace, but it is valid in a similar language which has a naughty name.
1 comment:
These kinds of "multi-lingual" programs are known as "polyglots" and there is relatively small collection at The Polyglot List.
It's not on the list, but I like this eight-language polyglot; it runs in Bash, Perl, Tcl, C++, ANSI C, Python and Literate Haskell. It's not valid Whitespace, but it is valid in a similar language which has a naughty name.
Post a Comment