Polyglot
Jump to navigation
Jump to search
A polyglot is a program that is acceptable to the specifications of more than one programming language. Usually, when executed, a polyglot does exactly the same thing in every language in which it can be run.
There's also special form of polyglot, which is a mixture of polyglot and quine: a polyglot quine. Polyglot quines are mostly more complicated to write than normal polyglot programs due the nature of a quine. Naturally polyglot quines need to produce the exactly same output in every language part of the polyglot quine.
External resources
- The Polyglot List - Contains a selection of polyglots.
- Esoteric 7 language polyglot - Works in Malbolge, Brainfuck, Whitespace, Spoon, Asdf, 123 and EXCON.
- Esoteric 5 language polyglot (from the Wayback Machine; retrieved on 4 November 2006) - Prints Hello, world! in Befunge, Brainfuck, Chef, Kipple and ORK.
- PPCG's answer chaining polyglot (451 languages as of 2024-09-11)
- An introduction into quines and polyglots - Contains a nice Polyglot Quine written in C, Python and Shellscript
- 4 esolang + Python polyglot is a simple polyglot that works in Befunge, brainfuck, Deadfish~, oOo CODE and Python.
- 7 esolang + Python polyglot prints
404
in BFFuck, Python, Brainfuck, Befunge-93, PlusOrMinus, Deadfish, Alphuck, and oOo CODE.