4
1
This is the cops' thread, the robbers' thread is here
A polyglot is a program, that without modification, can run in multiple languages.
Allowed languages
Any language that was made before the challenge and isn't made for the purpose of the challenge, it is allowed, though discouraged, to use languages that are easy to recognize
Cops' Challenge
To write a non-empty program that does one of the following tasks:
- Adds two numbers from STDIN
- Prints "Hello, World!"
- Prints the first 20 terms of the Fibonacci sequence
Then, list the languages it works in (it must do the same thing in all languages). When you first post your answer, it is vulnerable, and robbers will try to find more languages it works in other than the ones you specified. If any robber finds a language, they comment on your question saying they cracked it. You should then edit your question saying it got cracked and list the languages you were missing.
If a week passes by and nobody cracked your submission, you can mark it as safe, no robbers can crack it.
Winning
Most upvoted safe answer is the winner.
Extra rules
Cops must know there is a language that the program runs in other than the ones they wrote, so that there's a guarantee that all answers are possible to crack.
And as always, standard loopholes apply.
You should define what sort of languages you are allowing. Can it be a language newer than the challenge? And it would probably be a good idea for the cop to be able to demonstrate it's a polyglot in yet another language to mark it as safe, so all solutions are crackable. – Okx – 2018-09-14T21:51:11.927
@Okx I will define what languages are allowed, but I don't understand the rest of your comment. – FireCubez – 2018-09-14T22:05:24.520
What is the winning criterion (i.e. how will answers be ranked after they are marked safe)? – Doorknob – 2018-09-14T23:21:41.973
@Doorknob Uhh, upvotes? – FireCubez – 2018-09-14T23:22:27.003
@dylnan Originally, no, but now that I think of it that's probably a good idea – FireCubez – 2018-09-14T23:32:43.200
@JoKing If a submission runs in any language, you can post it, and you should generally list all the languages you thought of except 1 of them – FireCubez – 2018-09-15T00:13:45.767
Different versions and different compilers are not different languages, correct? – Stephen – 2018-09-15T00:21:45.783
@Stephen Correct. – FireCubez – 2018-09-15T00:22:17.353
The 20th digit of the Fibonacci sequence is the 2 in 233. Is this what you intended? – Nitrodon – 2018-09-15T00:38:56.633
First time to see a CaR PopCon tbh. And maybe the 3rd task should be changd to "Prints the first 20 terms of Fibonacci sequence"? – Shieru Asakoto – 2018-09-15T01:06:30.343
@Nitrodon I meant the first 20 terms like Shieru said – FireCubez – 2018-09-15T10:07:00.863