Chain up the cops!
Thanks to Magic Octopus Urn for the original idea!
This is a combination between a answer-chaining and a cops-and-robbers challenge.
Your task is to create a program that, when run in language A outputs a program, that when run in language B outputs a program which runs in language C and so on, until the final program, which outputs the string
Game Over!*. You may use as many languages as you like, but each language may only be used once. Different versions of languages, or different compilers, do not count as different languages, i.e. Python 2 and Python 3 are the same language.
If using languages with different code pages, you should output the bytes that make up that program, not the characters. You should create a program that runs in at least 2 distinct languages. Languages must be free (as in beer) and be publicly available for anyone to use without paying.
Cops, you are to reveal the following things:
- The number of languages used
- The bytecounts of each program+
- The code to be run in language A, but not language A
When a robber links their cracking answer, please edit this into your solution to help further robbers.
If your answer has not been completely cracked after 14 days, it is safe and you should reveal the remaining languages and the codes in said languages. The submission which is safe and uses the most amount of distinct languages wins!
Your aim is to find out the languages the cops used. You can crack just one of the languages, or you can aim to find out the complete set of languages for any one cop, or anything in between. When cracking an answer, there are three possibilities:
- You crack the first layer: Create a new robbers post as a Community Wiki and edit in the first solution, along with your username, in the below format. Link the post to the Cops post.
- You crack an intermediary layer: edit your solution, and username, into the corresponding Robbers post and make sure that the cops is aware of the crack
- You crack the final layer: Notify the cop, and edit in your crack into the Robbers post, with the notice that it is the final program and that cops' run is over.
Each robber will have a score, defined somewhat as a league table. You get one point for every layer you crack, including the start and end cracks. However, if you singlehandedly crack an answer, you get one point for each language, plus 3 points. So, if you, by yourself, crack an answer with 4 languages, you get 7 points.
Meta notice: I'm having trouble deciding whether cracks have to be in the intended language or not. Thoughts?
When a robber crack a layer, they should comment below the cops post with the language, along with a way to test the current code. If the output is the same, but the language is different to the intended one, the crack is still valid (to prevent answers going in unintended directions). Obviously, if the language is correct, the crack is valid. However, a crack is only valid if the cop confirms it. I'm going to trust cops to not abuse this rule and turn down every guess and hope that the community will help deal with anyone who does.
Cops, please format your original answer as so:
# [N] languages
<Byte counts of the programs>
And, when a corresponding Robbers post is created and linked, please edit in
<link to Robbers post>
If your answer is safe, edit this into the title, along with the complete list of intended languages. Your program(s) can still be cracked until you do.
Robbers: Please add cracks to the correct answer in the following format, underneath previous cracks
## [N]. [Language], cracked by [username]
<Try It Online/interpreter>
N is the current depth of the cracks. The first crack should be that same, but have
# [Cop's programs](link)
at the top of the answer.
Let's walk through a quick example:
I create the following program that runs in Python:
When run in Python (3), this outputs
This can be run in ><> and outputs
Which, when executed by Foo, outputs the desired phrase,
Game Over!. All I reveal to the Robbers however, are the number of languages (3), the original code (
print("""'"!revO emaG"'>o<""")) and the byte counts of the 3 submissions (
30, 18 and 12).
The robbers then guess that the first language is Python, so I'd edit that in, and change the code to the output of the Python program. The next guess is Perl, which I tell them is incorrect, before they quickly guess that the answers were ><> and Foo, and my answer has been completely cracked.
My cop answer, at this point would look lien the following:
# 3 languages, [completed](link)
And the Robbers post would look like this:
# [Cop's post](link), done
## Python, cracked by user1
## ><>, cracked by user2
## Foo, cracked by user1
*: Should I change the final task? I chose the phrase as I doubt many languages have this as a builtin.
+: Thoughts on revealing the intended bytecounts? I feel as though it is a good way for robbers to verify their guesses without the cops, before commenting.
Any other questions/clarifications/dupe targets?