206 votes

Trick or Treat polyglot

Python / Windows Batch, 25 bytes print"trick"#||echo.treat Everything after the # is interpreted as a comment by python, while the || is an OR in batch, saying ...
cure's user avatar
  • 1,741
171 votes
Accepted

When was this language released?

A Brief History of 2D Programming Languages: 16 (+2) years ...
Martin Ender's user avatar
159 votes

Trick or Treat polyglot

Whitespace / Starry, 135 bytes Here's to a clear night sky on Halloween! + + + + + + * + +* + * + * + + +* + +* + . + . + +* +...
0																												''s user avatar
  • 3,741
154 votes
Accepted

Trick or Treat polyglot

2sable / pl, 8 bytes 0000000: 74 72 65 61 74 93 d0 cb treat... Both programs have been tested locally with the same 8 byte file, so this ...
Dennis's user avatar
  • 210k
153 votes

The Versatile Integer Printer

15 languages, 68 66 65 bytes / 15^3 = 0.019... Retina, Starry, Prelude, ETA, Axo, Labyrinth, Hexagony, Foo, Brian & Chuck, Gol><>, evil, Whitespace, Fission, ><> and GolfScript. After a ...
Martin Ender's user avatar
140 votes

Trick or Treat polyglot

Linux ELF x86 / DOS .COM file, 73 bytes ...
ninjalj's user avatar
  • 3,116
140 votes

Determine your language's version

Python 3.0 and Python 2, score 6 (12 bytes, 2 versions) print(3/2*2) Try it Online: Python 2 Python 3 Relies on the fact that Python 3+ uses float division by ...
fireflame241's user avatar
  • 16.2k
119 votes

When was this language released?

15 years, Python Versions: 0.9.1, 2.0.0, 2.2.0, 2.2.2, 2.5.0, 2.5.1, 3.0.0, 3.1.0, 3.1.3, 3.2.1, 3.3.0, 3.3.3, 3.4.0, 3.5.0 and 3.6.0a4. Versions not linked can be found on the downloads page. The ...
Sp3000's user avatar
  • 61.7k
104 votes

Trick or Treat polyglot

evil / ZOMBIE, 109 bytes Another spooky answer ! ...
Aaron's user avatar
  • 3,809
100 votes
Accepted

The Versatile Integer Printer

30 languages, 248 bytes, \$\frac {248} {30^3} = 0.009185\$ ...
Sp3000's user avatar
  • 61.7k
98 votes

Calculate a square and a square root!

C and C++, 68 65 bytes #include<math.h> float f(float n){auto p=.5;return pow(n,2-p*3);} Original answer: ...
Dave's user avatar
  • 8,451
96 votes

Trick or Treat polyglot

Python / Perl, 28 bytes print([]and"trick"or"treat") Explanation Since [] is an ArrayRef in Perl, it's truthy, but it's an ...
Dom Hastings's user avatar
  • 22.9k
87 votes

Add a language to a polyglot

Note: If you see this first, you might want to sort by oldest 17. Julia (128 bytes) ...
Sp3000's user avatar
  • 61.7k
70 votes

Determine your language's version

Java, 400 bytes, 17 versions, score = 23,52 Supported versions: 1.0, 1.1, 1.2, ...
Olivier Grégoire's user avatar
64 votes

Hello World in Multiple Languages

16 languages, 1363 bytes ...
Adalynn's user avatar
  • 6,092
61 votes

Rock, Polyglot, Scissors

Python, brainfuck and JavaScript, 103 99 bytes Yay under 100 bytes! ...
xenia's user avatar
  • 8,102
56 votes

Add a language to a polyglot

23. Hexagony, 186 bytes Sorry if this messes up plans... ...
MercyBeaucou's user avatar
  • 3,061
55 votes

When was this language released?

Short and sweet; the three APLs (K, J201, Dyalog 7.1) in 8 bytes 1993+1^2 1993 plus... K: the first 1 integer {0} except {2}, i.e. {0}; 1993 – Try it online! J: ...
Adám's user avatar
  • 29.9k
55 votes

Calculate a square and a square root!

Python 2 & Python 3, 23 21 bytes lambda n:n**(1/2or 2) Python 2.x produces n^2, Python 3.x produces ...
Dave's user avatar
  • 8,451
49 votes
Accepted

Calculate a square and a square root!

Jolf and MATL, 1 byte U Square root in Jolf, square in MATL. Try it online! (MATL) Try the Jolf code. Only works on Firefox. These are both 1 byte, as MATL and ...
Riker's user avatar
  • 7,800
48 votes

Trick or Treat polyglot

PHP / JavaScript, 32 30 bytes Displays trick in PHP and treat in JS. ...
Arnauld's user avatar
  • 188k
47 votes

When was this language released?

10 years, 12 languages, 2430 bytes This answer is a collaboration between myself and user 1000000000. A brief language list: ...
Wheat Wizard's user avatar
  • 96.5k
44 votes

The Versatile Integer Printer

Python 1.x, 2.x and 3.x, 32 bytes / 3^3 = 1.1851... import sys print(sys.version[0]) Prints the first number of the version, which is ...
sweerpotato's user avatar
  • 2,497
41 votes

Rock, Polyglot, Scissors

Python 2, Ruby, Retina, 90 83 bytes -7 bytes thanks to Value Ink s=['rock','paper','scissors'] print s[s.index((0and gets or input()))+(0and-2or-1)] Try it ...
math junkie's user avatar
  • 7,227
41 votes

This code errors on *this* and *that*, is it really written in them?

Python 2 / Python 3, 60 bytes print("This program errors out in Python %d :P"%(3/2*2))*1;a Python 2 got ...
tsh's user avatar
  • 34k
40 votes

Add a language to a polyglot

37. C++ (gcc), 776 bytes ...
Chance's user avatar
  • 5,414
40 votes
Accepted

Hello World in Multiple Languages

23 Befunges, 713 bytes The only language I really know is Befunge, so instead of multiple languages, I've just gone with multiple implementations of Befunge. I believe this is still valid under PPCG ...
James Holderness's user avatar
39 votes

Trick or Treat polyglot

HTML / HTML+JavaScript, 53 bytes treat<script>document.body.innerHTML='trick'</script> treat is the document´s text ...
Titus's user avatar
  • 14.6k
39 votes

Polyglot the OEIS!

26 languages: C, C++, Cubically, rk, what, Bash, Morse, Ook!, str, Charcoal, Commercial, S.I.L.O.S, memescript, Forked, TRANSCRIPT, Braingolf, Fission, Arcyou, Beam, Beatnik, Cood, COW, Emoji, ><>, ...
MD XF's user avatar
  • 13.8k

Only top scored, non community-wiki answers of a minimum length are eligible