1
\$\begingroup\$

A polyglot is a program which can be run by several different language's interpreters/compilers without failing.

For example, the stackoverflow 404 page contains a polyglot which runs in Python, Perl, Ruby, C, brainfuck and befunge, each time printing 404 to stdout.

404

Now, my challenge is to create a polyglot which, when run as a certain language, will print:

Just Another #{Name Of Language} Hacker,

So, if you say that your program can be run as both JavaScript and ><>, when run in a JavaScript environment it should print

Just Another JavaScript Hacker,

and when run by a ><> interpreter,

Just Another ><> Hacker,

In your answers, you should list the number of languages which accept it as a valid program and produce correct output, as well as a list of those languages.

The program which runs under the most languages wins!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ @flawr it's an exact duplicate of the second dupe target though. If this was considered sufficiently different (which I don't think it is), I'd say the older challenge should be reopened. \$\endgroup\$ May 24, 2015 at 20:51

0

Browse other questions tagged or ask your own question.