Live data from Hacker News

Radiation-hardened quine

github.com

11–20 of 76 posts

Re: Radiation-hardened quine

#11

Exercise for the reader, make a quine that still works even if any one character is mutated (by 1 bit or 8?), rather than deleted.

That definitely wouldn't work with this strategy (two copies), because you wouldn't be able to tell which copy was the mutated one. Error-correcting codes to the rescue. :)

Re: Radiation-hardened quine

#12
i wonder how far this can be taken... e.g. flipping or setting a random string of bits that would be physically contiguous in hardware as if a real neutron came smashing into the memory... if doing it during run can be achieved etc.

how about a real native app with instructions? i'd never expect something as high level and wooly as ruby in systems that will be exposed to radiation. that's just asking for failure imo... how robust is the interpreter for instance?

Re: Radiation-hardened quine

#13

Fascinating exercise. "Deleting one character" seems a phenomenally unlikely outcome of radiation, though.

A harder task might be "Randomly delete, add or mutate a single character".

We had a few similar tasks on CGSE, e.g.

http://codegolf.stackexchange.com/q/4486/15

http://codegolf.stackexchange.com/q/18087/15

Re: Radiation-hardened quine

#14
post #12

i wonder how far this can be taken... e.g. flipping or setting a random string of bits that would be physically contiguous in hardware as if a real neutron came smashing into the memory... if doing it during run can be achieved etc. how about a real native app with instructions? i'd never expect something as high level and wooly as ruby in systems that will be exposed to radiation. that's just asking for failure imo.…

A friend of mine writes firmware for embedded devices like automatic door controls. Besides having very well designed and redundant hardware (multiple PSUs etc.) the software does a lot of things to keep itself running robustly. For example, the microcontroller regularly tests its own memory for bad blocks and compensates accordingly - similiar to what flash memory controllers do.

So yeah, even if you don't go into space or inside a nuclear reactor software can be written to tolerate a lot of harware failures.

Re: Radiation-hardened quine

#16
This would be much easier to understand if GitHub had proper ruby syntax highlighting. Just yesterday I was testing this, it appears they use very simplistic algorithm for parsing Ruby string interpolation - probably just regexes, which cannot handle nesting.

https://gist.github.com/tomprimozic/9113077

Re: Radiation-hardened quine

#17
post #15

Here's the google translate link to his blog post about it. My favorite part: "Ruby I terrible." http://translate.google.com/translate?sl=auto&tl=en&js=n&pre...

Japanese is Subject-Object-Verb order, so it was probably "My Ruby (is) terrible". But I don't know Japanese so I can't tell you for sure.

Chinese would also drop the verb in this case, so I'm assuming they might do that in Japanese as well.

Re: Radiation-hardened quine

#19
post #17
post #15

Here's the google translate link to his blog post about it. My favorite part: "Ruby I terrible." http://translate.google.com/translate?sl=auto&tl=en&js=n&pre...

Japanese is Subject-Object-Verb order, so it was probably "My Ruby (is) terrible". But I don't know Japanese so I can't tell you for sure. Chinese would also drop the verb in this case, so I'm assuming they might do that in Japanese as well.

Ruby is the subject in that sentence, not sure why gtranslate injects an "I". I'd translate it as "Ruby is scary, isn't it?"

Re: Radiation-hardened quine

#20
post #11

Exercise for the reader, make a quine that still works even if any one character is mutated (by 1 bit or 8?), rather than deleted.

That definitely wouldn't work with this strategy (two copies), because you wouldn't be able to tell which copy was the mutated one. Error-correcting codes to the rescue. :)

couldn't one make 3 copies and take the two that are equal as non-modified?
Post reply on HN