Questions tagged [polyglot]

For challenges involving code that runs in multiple programming languages.

Filter by
Sorted by
Tagged with
14 votes
13 answers
2k views

Write a Program in Disguise [closed]

The challenge is to create a program that solves any one of the HQ9+ problems while looking like another language. Note: This is not a golf challenge. Rules: The program must perform one of the ...
Kevin Cox's user avatar
  • 451
20 votes
1 answer
809 views

Golf you a Double Quine for greater good!

Good Evening Ladies and Gentleman. Tonight - we have a code challenge. A competition that will be defined not in the amount of points (a la Asteroids) but simply whether you can finish it (a la ...
lochok's user avatar
  • 3,189
14 votes
9 answers
3k views

Build a polyglot for Hello World

Produce a text file that prints "Hello World!" in as many programming languages as possible when compiled/interpreted, while also being as short as possible. The score for your submission is ...
Joe Z.'s user avatar
  • 34.7k
71 votes
17 answers
6k views

Write a polyglot that prints the language's name

Your task is to write a program that executes in as many languages as possible, with as few characters as you can. To avoid trivial solutions, the program must print the name of the language it was ...
vsz's user avatar
  • 8,117
30 votes
2 answers
5k views

What code compiles in the most number of languages? [closed]

Excluding trivial programs, what code compiles in the most number of languages? (By "trivial" I mean to exclude answers such as the empty program or text that will be echoed directly.) The following ...
shamp00's user avatar
  • 1,251
7 votes
3 answers
825 views

Acrostic polyglot programming [closed]

The challenge is to write an acrostic piece of code. When read normally (horizontally), the code should take an input string and remove all but the first character on each line. For example, the ...
Pubby's user avatar
  • 1,249
40 votes
17 answers
4k views

Golf a mutual quine

Using two languages of your choice, write the smallest “mutual quine” you can. That is, write a program P in language A that outputs the source code for a program Q in language B, such ...
dan04's user avatar
  • 6,581

1 2
3