4 ms·
It is clear that the article simply translates K&R exercise into runes without a consideration, but I should note that reversing a codepoint (or rune) sequence
by lifthrasiir 5y ago
It is clear that the article simply translates K&R exercise into runes without a consideration, but I should note that reversing a codepoint (or rune) sequence is not identical to reversing the human-readable text. The hiragana example is outright wrong because no Japanese would think `ゃき` (codepoint-wise reversal of `きゃ` kya) as a meaningful Japanese text.
- ynfnehf 5y agoHow is that any different than reversing the English digraphs? "th", "ch", "wh", etc. Reversing English doesn't usually produce something meaningful either.
- lifthrasiir 5y agoYou are entirely correct that that K&R exercise is flawed in the first place. I'm more concerned about the language-specific rules for (somehow) reversing a text therefore.
- nerdponx 5y agoSome languages consider (or used to consider) "ch" as a single "letter".
- donatj 5y agoCan you explain further, I’m not sure I understand the objection. Doesn’t any language backwards become unintelligible to its readers? Doesn’t seem specific to Japanese. How would you wish `ゃき` to reverse if not `きゃ`? https://emoji.boats/s/きゃ https://emoji.boats/s/きゃ Seeing as they are both are normal runes with no modifiers attached, I don’t know what alternative there would be?
- lifthrasiir 5y agoI think my usage of the word "meaningful" was very much generous. Let me clarify my intention then: the "correctly" (that is, preferred by speakers) reversed text is unlikely to have a meaning, but it is still likely to adhere the language's phonotactic rules. ゃ (small ya, as opposed to ordinary や ya) is something you never expect to be the first character because it modifies the preceding syllable. The use of such small characters (すてがな sutegana) as the first character in words is very limited in Japanese.
- thewakalix 5y agoI don’t think English is such that every sequence of letters is a valid encoding of phonemes, either.
- charcircuit 5y agoI think it is only you who have a problem with it. Writing Japanese horizontally has only been a thing for about 100 years. About 100 years ago the direction Japanese was written horizontally was mixed between left to right and right to left. Writing Japanese reversed aka right to left isn't a weird concept.
- lifthrasiir 5y agoI'm aware that RTL Japanese was a thing. In fact, what you have described is not really RTL; its inline direction is top to bottom and its block direction is right to left [1] while what we typically refer to RTL is about the inline direction. RTL Japanese is actually a specific variation of this TTB/RTL writing where the line itself only consists of a single character. Very rare (typically signages), but it did exist. But that doesn't mean your RTL text should be preemptitively reversed in the memory, which is exactly what the exercise asks you to do. Historically this was the case for some early character encoding, where the reversed text is called the "visual order" opposed to the "logical order". This caused enough problems that Unicode is now primarily the logical order only, except for a few scripts where the historical visual order is retained (e.g. Thai). [1] See https://www.w3.org/TR/css-writing-modes-4/#text-flow https://www.w3.org/TR/css-writing-modes-4/#text-flow for more information.