Idea - kenrube/Esopoly GitHub Wiki
In programming, a polyglot is a kind of program correctly written simultaneously in several programming languages. As a rule, its output doesn't depend on the interpreter of which particular language from the set it executes. In extreme cases, the output is built according to a certain pattern. You can see examples of such programs in Wiki.
The esoteric polyglot differs from the rest only in that it doesn't contain programs in normal languages. Only esoterics, only hardcore! Hell yeah :)
Polyglot, written by me in 2013, performs a very simple job: prints the phrase %language_name% program
, but it looks (I hope) intriguingly. It's written in 7 languages, including Malbolge, which some people consider to be the most complex programming language in the world.
If you think about it, the way of writing a simple esoteric polyglot lies on the surface. All used languages have a syntax consisting of single-character instructions. The main task with this approach is to ensure that the sources in individual languages remain correct as a whole. Malbolge spoils everything. The source code written on it can contain any printable characters from ! up to ~. Since the characters used to write programs in other languages are included in this range, then any instruction in any other language should be the correct instruction for Malbolge. It is he who sets the general rhythm, so let's start with him.