The T-Files


Sun, 31 Oct 2004

Ten things you do not need to know about Shanghai

  • Catalogues are in short supply at IKEA.
  • People rush into subway cars before letting other passengers get out first.
  • There is a neat prepaid Public Transportation Card that works with trains, subways, busses, ferries and even taxis.
  • The German-built maglev train to the airport runs at up to 431 kph, but is not available if your flight arrives at midnight or leaves in the early morning.
  • Pyjamas are perfectly normal attire when going out.
  • Remote controls have to be wrapped in plastic.
  • Wedding guests do not dress up much, but expect free cigarettes.
  • Almost all taxis (and hence half of all cars) are Volkswagen Santanas.
  • Starting at 2 Euro, legal DVD are not much more expensive than pirated ones, but not many shops carry them, there are less titles to choose from, and they have region code 6.
  • Chinese food is different.
Sat, 23 Oct 2004

Off to Shanghai (2004 version)

I am getting around quite a bit these days, and my passport is beginning to look like a stamp rally. China is actually one of the very few places I need a visa for (at the same time it is one of the very few places Cissy does not need one for). I have also started to collect mileage, or rather mileage cards. I have three now (Star Alliance, JAL, NWA/KLM), each used at most twice, and Air China is likely to give me a fourth one today.

Tue, 19 Oct 2004

The thousand and one reasons to love Perl: [9] Regular expressions

Regular expressions are the Swiss Army Chain-saw for string manipulations and no one disputes that Perl really shines here. I would say they are almost indispensible when working with text data. Regular expression engines have recently been added to the core Java platform and the Oracle database. I know that I miss them in my Parrot experiments (Parrot already has a working regex engine, with all the low-level opcodes required for that, but no compiler to target it). While Perl did not invent regular expressions, it has made them popular, and Perl's implementation has become the gold standard of the field (the most popular C library for the task is even called pcre -- Perl Compatible Regular Expressions).

Regular expressions are a (rather cryptic) language unto themselves, and I am not going to describe them here in detail. Have a look at the Quick Start Tutorial or the regular Tutorial.

The funny thing is, now that everyone has copied Perl's syntax for regular expressions, Perl 6 is going to throw it overboard and start anew. See Exegesis 5.

Mon, 18 Oct 2004

Can you read this?

I do not command the most legible of handwritings, and my penmanship is steadily evolving (degrading?). This has become a problem with banks, because I cannot reproduce my signature from two years ago. While I am able to do most of my banking through ATM or online, I could not close my unused (but far from empty) Citibank account today. The fact that I do not know my secret number (because I do not use the account) or that the online banking account is locked (because I unsuccessfully tried to guess my secret number a few times) did not help to enhance my credibility either. Now I have to find my copy of the account opening document and practice the old signature.

I had a similar experience last month at Tokyo Mitsubishi Bank when I wanted to let them know my current residence. At that time, they kindly let me see how the signature should look like, so that I could copy it. All of this is making me understand the real value of the name stamps that Japanese people use instead of signatures on legal documents: unfailingly constant output throughout the years.

Sun, 17 Oct 2004

Under construction

Tokyo Duo City

We went to visit the construction site of Tokyo Duo City in Shin-Koiwa, where we are going to move in to next spring. The building itself is finished now, and they started work on interior decoration, but have not reached the fourteenth floor yet. The next major step will be in January, when the interiors will be completed and the future owners are invited to check everything.

Best bread message

Our little friend TOMTE use magical secret power for delicious BREAD that. Well enjoy in next morning. Children who living in NORTHERN EUROPE tell us secret that just baken BREAD. Yes ..... TOMTE's secret. HOKUO as. BREAD country SAPPORO is very similar with TOMTE's land.

Scandinavian Natural Roman
Best bread message
Hokuo, since 1979

Fri, 15 Oct 2004

QR Code

72game.com QR code

Now here is a clever use for the digital cameras that come with every mobile phone these days. QR Codes are similar to bar codes and can store about 3 Kb of binary data, enough for 4000 characters (or 1800 Japanese characters). To read it, just take a picture of it with you mobile phone, which recognises the format and can display the content. This is a much faster way to enter a URL or email address into a phone, and it is really getting popular for print advertisements or on business cards. To the left you can see the code for 72game.com, which also has a small mobile section with ring tones and background images for download.

Wed, 13 Oct 2004

Happy Birthday

I am traditionally very good at not remembering people's birthdays and I set a new record last Sunday by forgetting my father's. My bad. Very bad.

Sat, 09 Oct 2004

The thousand and one reasons to love Perl: [8] Parrot

The next incarnation of Perl, Perl 6, will run on top of its own virtual machine, much like Java or C#. This virtual machine is called Parrot. Unlike the Java Virtual Machine, which has been constructed just to run Java, Parrot will be the target platform for many other languages in addition to Perl 6 (such as Python, Ruby, PHP and BASIC). In fact, Parrot is very likely to be released significantly before Perl 6, and there is already an experimental version of Perl 5 (called Ponie) using Parrot, which will probably evolve into the official Perl 5.12 a few years from now. This approach will allow developers to share code libraries written in different languages. The are plans for a Parrot version of the excellent Perl database interface, which would make it accessible to other Parrot languages. There is already a prototype of mod_parrot, embedding Parrot into the Apache web server, that could one day replace mod_perl, mod_php, and mod_python.

There is still no real-world compiler available targeting Parrot, so you cannot use high-level languages at the moment and have to program it in its Assembler-like native code, but you can already access all the amazing features built into the core runtime engine, such as JIT compilation to real machine code, dynamic loading of shared libraries (in both machine and Parrot byte code), I/O functions, Unicode string manipulation, and access to objects (Perl datatypes like arrays or hash tables, or those you write yourself).

Sun, 03 Oct 2004

Binary Land

Tomorrow will be the official launch of NTT Communication's 72game.com, powered by GaiaX, the project that has been keeping me busy these last three months. 72 is Japanese for nostalgic, and on 72game.com you can play classic NES games such as Elevator Action (or Binary Land, my current favourite). At the moment users can choose from ten titles but more are in the pipeline. It is basically a pay-per-play service (not cheap at 30 to 80 yen per game) with several subscription models, too. The games itself are converted from the original games' ROM images (and thus authentic) and run in an ActiveX emulator (meaning you cannot play them on a Mac).

My contribution is the web site system which maintains high-score rankings, and allows players to discuss the games, buy items for in-game use (sic!). The HTML is produced by a Perl/FastCGI program, sitting on top of an Oracle database with all the business logic implemented in PL/SQL. NTT will be doing a lot of promotion for the site, so it is important that my code can handle many concurrent users, which of course has not been really tested so far. I am quite confident about its performance, though, and also still very happy with the code in general, which is unusual since like most programmers I normally want to trash and rewrite everything once it is finished).