Radiation-hardened quine
51–60 of 76 posts
Re: Radiation-hardened quine
#52Earlier quoted context omitted.
The Japanese use Chinese characters. The Japanese also have alphabets. (At least two.) But Chinese characters aren't exactly an alphabet and the Japanese don't use Chinese characters directly as an alphabet, though many characters are based on Chinese ones.
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…
While you're correct that the Japanese writing system is not an alphabet, I feel like your definition here is so vague it almost contradicts your point. After all, each kana character has a much closer correspondence with a particular "sound" than many actual alphabets.
So to clarify, the characters of an alphabet (notionally) correspond to particular phonemes.
Re: Radiation-hardened quine
#53Earlier quoted context omitted.
> 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?
Korean?
Re: Radiation-hardened quine
#54Earlier 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
#55Earlier quoted context omitted.
> 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?
Korean?
Re: Radiation-hardened quine
#56Earlier quoted context omitted.
The Japanese use Chinese characters. The Japanese also have alphabets. (At least two.) But Chinese characters aren't exactly an alphabet and the Japanese don't use Chinese characters directly as an alphabet, though many characters are based on Chinese ones.
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…
When using some strict definition of "related" (e.g. "neither language is a strict descendent of the other"), that may be true, but anybody that's studied both languages has probably noticed that there's an eery similarity between the two, even if it's merely the result of many centuries of cross-pollenization....
My own experience is not so great, I've only studied Korean a bit, but I did study it in Japanese (which I know fairly well), and the similarity made it a lot easier, because so many things corresponded 1-to-1... However Korean friends that are fluent in Japanese constantly rave about how easy it was for them to learn, not just because of the huge amount of shared Chinese-derivative vocabulary (many words are completely identical, with formulaic changes in pronunciation), but because the whole structure of grammar, sentence/conversation-planning, idioms, etc, is so similar that a huge proportion of their Korean instincts pretty much just work as-is in Japanese.
Re: Radiation-hardened quine
#57Here'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...
"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?"
Re: Radiation-hardened quine
#58Interesting! 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…
Re: Radiation-hardened quine
#59I 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?
Yes, Line 15: /#{eval eval if eval==instance_eval}}/.i rescue##/ 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 partRe: Radiation-hardened quine
#60I 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. Here are the results up to 23 removals: http://i.imgur.com/PwWN7Z7.png