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 – 2017-05-30T23:49:32.620
@Mego Whoops - forgot to mention that. Yes. – dkudriavtsev – 2017-05-30T23:51:48.937
Well, "proper quine" isn't the right term since they're not quines, but it seems you understood what I meant. – Mego – 2017-05-30T23:53:01.787
@Mego Yeah. I'll fix that now – dkudriavtsev – 2017-05-30T23:53:36.067
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 – 2017-05-30T23:56:14.187
@Phoenix Two different versions of a programming language are still one programming language. I should edit that in. – dkudriavtsev – 2017-05-30T23:56:54.730
To confirm: after I remove
n
chars from program 1, should it output the second program, or the second program minusn
chars? – Stephen – 2017-05-31T00:18:35.477@StephenS Second program. – dkudriavtsev – 2017-05-31T00:19:02.587
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 – 2017-05-31T01:55:09.847
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 – 2017-05-31T18:01:35.777
@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 – 2017-05-31T19:17:27.850