Monday, 24 September 2018

A silly telephone joke

I remember this joke told to me when I was a kid by my brother-in-law. It helps, but isn't essential, to know that the surname 葉 (or simplified 叶), is Yap in Hakka and Hokkien, Yip in Cantonese (and Ye in Mandarin).

A: Hello, is that Yip?
B: Yup!
A: Yap?
B: Yip!
A: Sorry?
B: Y.I.P!
A: I don't know why you pee.
 
I would like to call a wrong number, please

 

Saturday, 15 September 2018

4 versions of When Will You Return?


When the opening song came up in Crazy Rich Asians, I was overwhelmed by nostalgia. It was When Will You Return? (何日君再来) a song introduced by Chinese singer Zhou Xuan in a 1937 film. She was Shanghai based, an immensely popular singer and actress, perhaps the most of that era, and her songs were well known throughout Asia. When I was a kid this song was often heard and my father had an album of her songs. Her early death at 39 in 1957 may have inspired another wave of fandom when I was growing up.

The opening lines translate as:

Lovely flowers don't bloom often
Beautiful scenes aren't always there
Worries dissolve smiles
Memories of love bring back tears
After you leave tonight
When will you come back?

Zhou Xuan's version is in tango rhythm, the martial pace suggesting the dark days of the Japanese occupation of China. One imagines the singer addressing a lover who must leave imminently. The question may be rhetorical. After the PRC was established the song was censored for being too decadent.

Four decades later, Teresa Teng, a Taiwanese singer hugely popular throughout Asia, sang this version. She too had a troubled love life and died early at 40, which makes her interpretation poignant.

Lisa Ono, a Japanese singer who spent her childhood in Brazil, did a bossa nova flavoured cover in 2010 on an album featuring songs of Asia. Her throaty rendition conjures up a band performing in a cozy jazz venue.

Finally, for the Crazy Rich Asians soundtrack, Jasmine Chen has brought the song back to Shanghai, which is decadent again, in an ebullient jazz flavoured cover. The title has been changed to Waiting For Your Return, suggesting anticipation rather than resignation. It abounds in optimism and energy, matching the groundbreaking film.

The film it first appeared in, Three Stars by the Moon, was one of the last silent Chinese films, and the song track provided by a synchronised gramophone which is odd as that version is over 5 minutes. 78 RPM records held just over 3 minutes per side, which explains the normal length of a pop song. Perhaps in the middle the operator restarted the side from the beginning. There are spoken lines, by a male voice, proposing toasts to the singer. In later versions the singer speaks lines urging the lover to drink up.

The translated lyrics (scroll to bottom) illustrate how compact Chinese sentences are, and Chinese poetry more so, the reason being that Chinese usually elides pronouns and articles. The key line is 10 syllables:

今宵离别后,何日君再来?

Grammatical translation:

After you leave tonight, when will you come back?

Literal translation:

This night parting after, what day gentleman again come?

translates to gentleman but is a polite you.


Monday, 10 September 2018

Positive ground car

Both vehicles are grounded that's for sure

My dad once had a car with positive ground. If I recall correctly it was a British car, the Mayflower. Like most British cars of that era, it had positive ground, meaning that the positive terminal of the battery was connected to the chassis. New cars, in particular the Japanese cars popular in Malaysia, had by then negative ground. The first time this caused an issue was when my dad decided to have a radio/cassette player installed. The preponderance of negative ground meant that radios were designed for that. The man who fitted the radio had to improvise a wooden panel to mount the radio on so that its case could be insulated from the car chassis. As you can imagine, I thought this a little unsatisfactory as it meant that the radio case was "live" and could cause shorts of the car battery to the chassis.


Later, at my behest, my dad got a car mechanic to reverse the polarity of the car's electrics. I think even the generator connection didn't need to be reversed as the excitation coil was reversed too, but I'm not certain (that era of cars did not have an alternator). Remember, the radio was probably the only electronic device in a car in those days.

All cars nowadays have negative ground, and the dual standards are a footnote in history. I read arguments for one or the other based on galvanic corrosion or something like that but I'm not convinced. The car is a floating electrical system anyway.

PS: There was another divide, the 6V and 12V battery cars. The only 6V car I knew of at the time was the Volkswagen. Again most cars standardised on 12V after that.

Sunday, 2 September 2018

IBM 1130 FORTRAN with localised subroutines in Malay

In 1967, University Malaya acquired an IBM 1130. It may have been the first general mainframe in the country. An academic friend of the family invited me, a schoolboy at the time, to join an introductory course in FORTRAN, intended for other academics, officials and industry to learn about programming and how computing would change the country. It certainly changed my life as it was the start of my interest in computer science.

I could go on about the incredible increase in computing power, about how a Raspberry Pi is a more powerful computer than the 1130 ever was, but this blog isn't about that well-trodden ground. Neither is it about 1130 lore, there are sites for that, like this one.

Rather it's about one aspect of our course which has always intrigued me, and I may never know the answer to. As FORTRAN programmers know, formatted I/O is one of the more difficult areas of the language, and remember the strings were Hollerith constants, the CHARACTER type didn't arrive until FORTRAN 77. So the course presenters gave us a couple of free format input and output subroutines: CALL BACHA() and CALL TULIS(). BACHA and TULIS are read and write respectively in Malay.

If I recall correctly, not only did these routines take both INTEGER and REAL arguments, but were variadic. Probably impossible to provide with a subroutine written in FORTRAN. Now we can think of myriad ways of implementing this in modern languages. But the IBM 1130 had comparatively little memory, measured in thousands of words. My guess is that IBM technical support provided these routines, in assembler, localised for Malaysia. But I may never know.