10
Challenge
Write two programs that:
- run in two different programming languages.
- These may not be two versions of one language.
- when one program is run, it outputs the second program, and vice versa.
- The two programs must be different (no polyglots).
Here's the catch though:
- The programs must be radiation hardened.
- This means that when any set of $n$ (defined below) characters is removed from either of the two programs, their functionality is unaffected.
- $n$ is defined as the number of characters that may be omitted with your program's functionality unaffected.
- $n$ must be at least $1$.
Rules
- Standard loopholes are disallowed.
- Your programs must be proper cyclic quines. They may not read their own source code.
- Scoring is performed as follows:
- Your score is $\frac{S_1+S_2}n$…
- where $S_1$ and $S_2$ are the size of your first and second programs respectively…
- and $n$ is as defined above.
- This is a code-challenge, lowest score wins.
Reward
As this challenge is difficult to answer, I will be giving a bounty to the first person to answer.
Must the programs be proper quines? – Mego – 8 years ago
@Mego Whoops - forgot to mention that. Yes. – dkudriavtsev – 8 years ago
Well, "proper quine" isn't the right term since they're not quines, but it seems you understood what I meant. – Mego – 8 years ago
@Mego Yeah. I'll fix that now – dkudriavtsev – 8 years ago
Does "Two different programming languages" allow for the use of e.g. Python 2 and Python 3? What about Python 2.5 and Python 2.7? – Pavel – 8 years ago
@Phoenix Two different versions of a programming language are still one programming language. I should edit that in. – dkudriavtsev – 8 years ago
To confirm: after I remove
n
chars from program 1, should it output the second program, or the second program minusn
chars? – Stephen – 8 years ago@StephenS Second program. – dkudriavtsev – 8 years ago
10Personally, I don't think this really adds much to the semiquine and radiation-hardening quine challenges we've already had; both categories have already been thrown together in so many combinations that it's extremely hard to come up with a truly original combination. – ETHproductions – 8 years ago
2You should probably add some kind of reward for answering this. I feel like it's too extremely difficult for many people to want to try. I saw this had no answers and I was thinking "ooh a quine challenge, I love those!" but then I read ALL THE RULES and it completely deterred me. – MD XF – 8 years ago
@MDXF The description of the challenge is "radiation hardened multi-language cyclic quine". The list of rules is there to establish scoring and stop rule breaking, and to prevent the question from being closed as unclear. – dkudriavtsev – 8 years ago