4 ms·
I can't read this code at all, but, does this code basically contain the same code twice, so if something from the first half is removed the second half saves i
by Cthulhu_ 13y ago
I can't read this code at all, but, does this code basically contain the same code twice, so if something from the first half is removed the second half saves it?
- joi_degn 13y agoI didnt look at the code and am not knowledgeable in this kind of coding but unless I am wrong, if the program simply would contain the same code twice each of these 2 codes would have to contain the same code twice ad infinitum.
- notimetorelax 13y agoIf we follow your reasoning than quine itself is not possible.
- hrjet 13y agoYes, Line 15: /#{eval eval if eval==instance_eval}}/.i rescue##/ They are checking the two instances and rescuing the corrupted one. But how exactly it works is beyond me.
- jonmrodriguez 13y agoAlso, in line 17, I think it's running whichever of the two codes is longer (since the longer one is the one that didn't have a byte deleted) eval eval"[eval||=9,instance_eval||=9].max_by{|s|s.size}#"##" See the max_by ... size part
- Schwolop 13y agoYes, and I was thoroughly disappointed by this result. So - new challenge: a radiation hardened quine in less than two times the characters of the equivalent non-radiation hardened version.