I was curious how well this quine would withstand having more than one character removed, so I performed a test. I did 1000 iterations removing 2 characters each time, then 1000 more removing 3 characters each time, and so on.<p>Here are the results up to 23 removals: <a href="http://i.imgur.com/PwWN7Z7.png" rel="nofollow">http://i.imgur.com/PwWN7Z7.png</a>
Nice!<p>This reminds me of a work I did as an undergrad which landed in a paper called "Can a Program Reverse-Engineer Itself?". The idea is to take any program/function and make it a quine so you can retrieve its original code even if it has been obfuscated. You can find the paper here: <a href="http://pablo.rauzy.name/research.html#imacc11" rel="nofollow">http://pablo.rauzy.name/research.html#imacc11</a>.
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?
Here's the google translate link to his blog post about it.<p>My favorite part: "Ruby I terrible."<p><a href="http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fd.hatena.ne.jp%2Fku-ma-me%2F20140219" rel="nofollow">http://translate.google.com/translate?sl=auto&tl=en&js=n&pre...</a>
Depends on how you define "works." The program continues to output the original source code after the deletion, and ceases to be a quine. Still a very cool trick though :)
Interesting! Does anyone know of a language or operating system that uses Reed–Solomon error correction on every file?<p><a href="https://en.wikipedia.org/wiki/Reed–Solomon_error_correction" rel="nofollow">https://en.wikipedia.org/wiki/Reed–Solomon_error_correction</a><p>Or to top that, imagine a computer where the entire memory space, perhaps shared with persistent flash memory, was encoded in this manner, so that even the filesystem was protected against bit flips.<p>When I was doing Mac repair a few years back, the majority of the PowerMac G5s that came through the doors died premature deaths for two reasons: the ram was in a bad spot which caused the board to bend and crack on insertion, and the ram was non-ECC so it was notoriously difficult to isolate a bad ram chip. It was the most unreliable Mac I ever diagnosed, by perhaps an order of magnitude.<p>Contrast that with the Mac Pro, which used ECC and was so much more reliable that I don't remember seeing a single Mac Pro fail in the 3 years I was there.<p>Imagine how stable a Reed–Solomon computer would be..
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.<p><a href="https://gist.github.com/tomprimozic/9113077" rel="nofollow">https://gist.github.com/tomprimozic/9113077</a>
same author wrote a 50 language quine:
<a href="https://github.com/mame/quine-relay" rel="nofollow">https://github.com/mame/quine-relay</a>
I recommend reading specs for low power digital radio protocols like WSPR for ideas around basic error correction. Just something I did recently and was fun.
I looked at his git profile, I recognised the name: Yusuke Endoh - multiple IOCCC winner. Here is one of my favourites:<p><a href="http://www.ioccc.org/2012/endoh1/hint.html" rel="nofollow">http://www.ioccc.org/2012/endoh1/hint.html</a>
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.<p>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?