Live data from Hacker News

Radiation-hardened quine

github.com

1–10 of 76 posts

Re: Radiation-hardened quine

#8
post #5

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?

I 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.

Re: Radiation-hardened quine

#9
post #5

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?

Yes, 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.

Post reply on HN