code-golf / code-golf

A game designed to let you show off your code-fu by solving problems in the least number of characters.
https://code.golf
MIT License
1.13k stars 101 forks source link

Polyglot Golfing #78

Open AlexDaniel opened 5 years ago

AlexDaniel commented 5 years ago

Please add a mode where you should write code that will work in two different languages at the same time.

somebody1234 commented 5 years ago

why :|

primo-ppcg commented 5 years ago

You know I'd be game.

JRaspass commented 5 years ago

@primo-ppcg Ah it burns! I was just thinking of doing Perl 5 & 6, "C, Perl, PHP, Python, Ruby" is impressive!

primo-ppcg commented 5 years ago

If the scoring was done as length / #langs, I'm pretty sure PHP + Perl would usually win. Perl 5 and Perl 6 are too dissimilar 😜

JRaspass commented 5 years ago

Ooo I hadn't even thought how to score this yet, I guess you might want to enter nCr solutions per hole! So we could just have dynamic leaderboards container every combination of langs.

primo-ppcg commented 5 years ago

I think the leaderboards would be rather scant if every language combination were listed separately. Another reasonable scoring system could be ranked first by the number of languages, and second by the length of the code.

JRaspass commented 5 years ago

@primo-ppcg I like it! So there's always an incentive to go for one more language.

JRaspass commented 5 years ago

/me hopes @AlexDaniel wasn't shooting for an April Fools, because I'm actually coming round to this idea!

AlexDaniel commented 5 years ago

@JRaspass if you're interested, here's the discussion that lead to this ticket:

RustemB commented 4 years ago

maybe it can be as a trophy, something like: solve one task that with the same code can work in two (or three, or four..) languages