Live data from Hacker News

Radiation-hardened quine

github.com

21–30 of 76 posts

Re: Radiation-hardened quine

#21
post #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

Addition and deletion anywhere but the end seems overwhelmingly unlikely.

Re: Radiation-hardened quine

#23
post #20
post #11

Earlier quoted context omitted.

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?

So like above said, error correction for at most one error.

Re: Radiation-hardened quine

#24
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.

Chinese and Japanese grammar have very little relation to each other - about as much as Chinese and English. (The alphabets are, of course, very similar, as the Japanese adopted Chinese characters.)

Re: Radiation-hardened quine

#25

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

Granted it's not "deleting" a character but here, if you haven't seen it: https://blogs.oracle.com/ksplice/entry/attack_of_the_cosmic_...

That seems to be a flipped bit, by far the most likely kind of problem due to radiation.

Re: Radiation-hardened quine

#27
post #13

Earlier quoted context omitted.

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

Addition and deletion anywhere but the end seems overwhelmingly unlikely.

Depends on how the code is stored in memory ... with ropes addition or deletion anywhere could happen.

Re: Radiation-hardened quine

#29
post #19
post #17

Earlier quoted context omitted.

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?"

Could also be 'surprising'. With the context of the sentence before it is basically, "I thought this would be hard to write. Ruby is surprising."

Also, the author is a contributor to ruby on github, so I doubt he is negative towards the language.

http://jisho.org/words?jap=%E6%81%90%E3%82%8D%E3%81%97%E3%81...

Re: Radiation-hardened quine

#30
post #27

Earlier quoted context omitted.

Addition and deletion anywhere but the end seems overwhelmingly unlikely.

Depends on how the code is stored in memory ... with ropes addition or deletion anywhere could happen.

True! But:

1) it's still less likely - most of the data is almost certainly characters of content, not sizes;

2) it's unlikely to be robust against flipped bits in pointers in the rope structures (even if implemented as indexes);

and 3) there is no reason to expect it to be limited to one byte (if an addition or deletion happens, "more than one byte" is far more likely than "one byte").

Post reply on HN