231 points · by epsylon · 12y ago · 71 comments
Here are the results up to 23 removals: http://i.imgur.com/PwWN7Z7.png
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: http://pablo.rauzy.name/research.html#imacc11.
They are checking the two instances and rescuing the corrupted one. But how exactly it works is beyond me.
eval eval"[eval||=9,instance_eval||=9].max_by{|s|s.size}#"##"
See the max_by ... size partWe had a few similar tasks on CGSE, e.g.
My favorite part: "Ruby I terrible."
http://translate.google.com/translate?sl=auto&tl=en&js=n&pre...
"I didn't really think I'd be able to write this [program], but somehow I was able too. Ruby is scary, isn't it? I wonder if you could write this in another language?"
Chinese would also drop the verb in this case, so I'm assuming they might do that in Japanese as well.
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...
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 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.
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.
Imagine how stable a Reed–Solomon computer would be..
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.
The downside is that all those checks are slow.
Even if you're not into hardware it's worth a look, lots of cool tips.
$ 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
# nowtWe have a few crashes that I can't figure out (but am putting in the test suite).
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?
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.
this is the primary reason afaik for things like ecc and encasing your hardware in boro-silicate glass...