Obscure differences between Kanji and Chinese characters

People who already know Chinese characters are often said to have the advantage of being able to pick up Japanese quickly. However, to learn it properly, in addition to the  difference between infix (English, Chinese) and reverse polish (Japanese) notations, it also comes with quite a bit of baggage. It’s the differences that requires work to observe, such as:

  • some made up ‘Chinese’ characters (和製漢語),
  • some are written slightly differently, including artistic variations
  • some has a completely different meaning,
  • some has opposite preferences for using which character in the pair when simplifying
  • and some has drastically different overtones despite they technically mean the same thing
  • the mixture of simplified and traditional characters, occasionally a character written like simplified Chinese means something totally different from traditional Chinese, such as 机(つくえ)which means desk vs 機(キ)which means machines or chances depending on the context.
  • the roles of historical and modern writings are randomly reversed

学習 is a good example. Modern Chinese considers 学 to be more colloquial (e.g. 学武功)and 習 to be more formal (e.g. 習武). Japanese is the other way round for 学ぶ and 習う。学ぶ has a more serious tone.


Actually, the kinds of variations mentioned above applies to regional differences in Chinese languages (such as Taiwanese, Cantonese and Mandarin). Most places agree to write Chinese in a way that can be read directly using Mandarin so that we can at least communicate on paper. So as time goes by, we lost the ability to write in Taiwanese and Cantonese. I hope it’ll change as both dialects are very colorful. Re-expressing them in Mandarin will take away all the flavors in them.

It’s evident that humans can pick up more than one language, so there is no reason to compromise dialects in the process of standardization. People advocating to kill other languages are simpletons who believe in the kind of logic supporting a competitive system: you find ways to make your peers do worse to stay ahead, instead of improving yourself.

Different regions occasionally have different preferences for character order in phrases. Basically we have to watch out for all kinds of combinations. Like 介紹 is used in the same order for Taiwanese/Cantonese/Mandarin to mean introduction, but it’s reversed 紹介(しょうかい) in Japanese. To make it a total mindfuck, Mandarin sticks with 客人 for guests, which is used the same way as Japanese’s 客人(きゃくにん), Taiwanese mostly says 人客, while Cantonese uses both with slight overtones: 客人 is usually used as a particular noun (e.g. 呢位客人) while 人客 is often used as a collective noun (e.g. 人客嚟齊未?), most likely because 客人 sounds more formal than 人客.


Putting traditional and simplified Chinese aside, different regions have different preferences for Chinese characters. I couldn’t tell the difference between traditional Chinese characters used in Hongkong/Macau (港澳繁體) and Taiwan (台灣正體) on Wikipedia, and later learned that it was because I’ve been randomly mixing both all along and nobody ever pointed it out.

裏/着 (Hongkong) vs 裡/著 (Taiwan) are good examples. For these two, modern Japanese sided with Hongkong in the character choices for 裏(うら) and 着(ちゃく). On the other hand, 峰(みね) in Japanese sided with the Taiwanese’s preferred writing 峰, while the 峯 is the ‘officially’ preferred writing in Hongkong.

I remember writing 峰 most of the time even when I was a kid and only used 峯 for names that specifically calls for it. We respect the original writing for names. This is the similar situation as in Japanese: 沢(さわ/たく) is used in most cases and reserve 澤(サワ) for names that specifically requests to be written in this form. The only difference is that I used the official character 峯 exclusively for names, while using the off-label 峰 for the rest.

Speaking of names, there are some similar-looking characters that has the same Japanese sound (かな) but are actually different in both writing and meaning. 斉藤 and 斎藤 are different, but they are easily confused for native Japanese speakers who don’t have any Chinese language background. Here’s the table for comparison:

齊/齐・斉 齋/齋・
Meaning Gathered, organized Plain, house, recitations
Cantonese chai (cai4) jaai (zaai1)
Taiwanese tsè tsai
Mandarin qi2 zhai1
Japanese (音読み:さい) 斉しい・等しく いつき・(潔斎)物忌み

The bottom line is: as language evolves, different regions have different preferences about what can they be sloppy about and what they must be meticulous about. They also reorder/tweak things to make them flow smoothly with their dialect. This means traps for for those learning a new language that are close to what they’ve already mastered.

I came across a document called 常用漢字表 released by the Agency for Cultural Affairs (文化庁) that explains all the quirks of Kanji that was carefully collecting on my own while taking the classes. Wish I had it back in the days. Here’s the link, but I also saved a local copy of 常用漢字表 just in case if their website moves around in the future.

Loading

Aging problem just from storage Working 6632B stored for 10 years has a failed tantalum cap

I fired up one of my 6632B stored for almost 10 years and smelled burned electronics, despite everything is functioning. I tested the unit immediately when I bought them a decade ago and it was working fine, so it’s an example where electronics can deteriorate by storing (even in temperature controlled, dry environment).

Since I see smoke, I turned everything off immediately and investigated. Turns out one of the tantalum capacitors in the processor/controller board gave in:

Loading

Wobbling rotary encoder in Agilent/HP/Keysight 6630B series 6631B, 6632B, 6633B, 6634B, 6634A, 6635A, 66332A*

6630 series system power supply is sturdy as a rock, but has a rotary encoder sticking out that it’s almost guaranteed to wobble if you buy it used.

I thought they would have known better to secure the rotary encoder with a nut so it won’t wobble (HP usually does a perfect job making their designs reliable. This one is a rare miss), so I opened it up to see what I can do about it.

My initial guess was that the solder joints were weakened as it was used to mechanically support external forces for users of the dial. But I was wrong. Here’s what I’ve found:

The weak metal strip retainers gave in and the whole rotary encoder is about to break loose! The encoder was actually still functioning before I opened the case up. So HP assumed their vendor for the mechanical rotary encoder did a good job withstanding frequent wiggling. Apparently their vendor completely failed them: the metal retainer design was hopelessly flimsy that I wouldn’t even consider using it even in light-usage applications! FAIL!

There’s a huge number of these high quality power supplies on the market because Motorola/Nokia closed down their massive operations, flooding the market with 6632Bs for years to come.

I’ll now strengthen (I came up with a solid technique to make sure the dial will never fall apart again) the 6632Bs I have for sale to businesses that needs a perfect unit (which I sell for $699/ea). If you are a hobbyist, feel free to send me a message and I’ll tell you how to do it, provided that you do not share it with anybody else (I’ll trust you). If you are a business, I can restore 6630B series to a professionally salable state starting at $499.


* Note that I included 66332A despite it’s a mobile communication DC source (66300 series) here because the guts of it is actually 6630 series. Every other 66300 series (3 Amps max) or less has a different form factor (that’s more like a 33120A) and the only odd one out of the series is 6632A (5 Amps max).

Loading

Explain XOR tricks succinctly with two properties Change detector, toggler

Most teaching materials on XOR starts from its straight definition then a bunch of recipes for exploiting XOR. It is not convenient to remember and not intuitive to come up with new tricks on our own. Instead, I’d like to describe XOR as two intuitive operations:

  1. Change detector (The logic definition itself)
  2. Toggling light switches (Flipping twice undoes it)

The second interpretation (toggling) is actually way more powerful and easy to remember than the first interpretation (definition).


With the toggling interpretation, you don’t have to think hard to come up with the four algebraic properties:

  1. Associativity and commutativity: we only care about whether the individual light switches (bits) are flipped odd (flipped) or even (not-flipped) number of times at the end of the day. When it happens in what order does not matter.
  2. Identity: flipping NONE of the switches (a mask of all 0) leaves it alone
  3. Inverse: pick only the switches that are already turned on (using itself as mask) and flip them (xor) guarantees to turn everything off (0)

The XOR swap trick can be constructed by exploiting the fact that flipping the same switch twice (at any point) reverts it back to where it started:

x y
Start x_0 y_0
Mix y_0 with x_0 x_1 = x_0 \oplus y_0 No info is lost, still have y_0 somewhere to undo if we wish.
The incumbent y_0 is used to cancel the y_0 inside x_1 to recover x_0 \begin{array}{rcl} y_2 & = & y_0 \oplus x_1 \\ & = & y_0 \oplus (x_0 \oplus y_0)\\ & = & x_0 \end{array} Since y_0 is already saved (mixed with) x_1, we don’t have to worry about losing it as long as we get to our main goal of putting x_0 in y, which will be used as a recovery key later.
Now use the x_0 stored in y_2 to unmix x_1 to recover y_0 \begin{array}{rcl} x_3 & = & x_1 \oplus y_2 \\ & = & (x_0 \oplus y_0) \oplus x_0\\ & = & y_0 \end{array}

Note that this trick is obsolete for modern computer architecture because

  • it enforces strict dependence that kills any predictive pipeline (speedup) in modern computer architecture, and
  • will yield zero all the time if you try to swap with itself in-place (same memory location), which is wrong because you expect the swap to do nothing.

Adding a check for the degenerate case (self-swap) slows the program down even further, making it worse than using a temporary storage for swapping. Therefore there’s no good reason to use it unless you have an exotic use case.

This is mainly used as a teaching device (or homework problem) to teach that XOR-ing even instances of the same variable in the chain cancels it.


 

Loading