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 :)
Radiation-hardened quine
41–50 of 76 posts
Re: Radiation-hardened quine
#42Hard mode: flip bits in the interpreter's process memory as it's running.
Re: Radiation-hardened quine
#43 $ git clone the_quine
$ cd the_quine
$ ruby the_quine
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
# shit I don't have ruby
$ sudo apt-get install ruby1.9.1
# 200 bytes/s, terrible
# ... what's going on? Ah finally.
$ touch output
$ ruby rbquine.rb > output
$ diff rbquine.rb output
# nowtRe: Radiation-hardened quine
#44Re: Radiation-hardened quine
#45Earlier quoted context omitted.
Since we're being technical, Japanese does not have any alphabet as such; an alphabet has, by definition, a 1 to 1 correspondence between a single character and a sound. Japanese uses syllabaries ('kana' in Japanese), where almost all characters represent more than 1 sound. Hiragana is typically used to write Japanese words and grammatical particles, while katakana is typically used to write foreign words and for spe…
> an alphabet has, by definition, a 1 to 1 correspondence between a single character and a sound. Do any languages have an alphabet according to this definition?
Re: Radiation-hardened quine
#46Depends 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 :)
But reverting to the original source gives the program a stability property that will maintain functionality through multiple generations. Outputting the modified source would cause the program to accrue errors over time, meaning eventually entropy would win.
Re: Radiation-hardened quine
#47Fascinating exercise. "Deleting one character" seems a phenomenally unlikely outcome of radiation, though.
Re: Radiation-hardened quine
#48Interesting! Does anyone know of a language or operating system that uses Reed–Solomon error correction on every file? https://en.wikipedia.org/wiki/Reed–Solomon_error_correction 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. When I was doing Mac repair a few years b…
A while back, after losing some personal photographs to bit rot, I became curious about this and did some experimentation with RS. The biggest drawback I found was that even with a relatively fast processor it is slow compared to typical disk read/write speeds. I concluded that the ZFS approach of RAID + checksums would be preferable.
Re: Radiation-hardened quine
#49Here are the results up to 23 removals: http://i.imgur.com/PwWN7Z7.png
Re: Radiation-hardened quine
#50This 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: http://pablo.rauzy.name/research.html#imacc11.