D-7 <altijd in beweging>

Day to day life of a Perl/Go/C/C++/whatever hacker. May include anything from tech, food, and family.


(I posted this in Japanese a few days ago. I'm reposting in English... well, because I can :)

So on that day, I was working as usual: With my headphones on, chugging some code. At first I didn't realize that anything was going on - I thought maybe I was making some noises myself. Then I realized that my monitor was shaking. Now there was something going on.

I immediately sent a skype message to a friend living in Iwate -- to which there was no response, because apparently the lines went down over there.

I was in the 25th floor, so things were shaking pretty badly. It was hard to even be standing at times. The building that we can see from our floor was visibly shaking -- it was wobbling (note: most Japanese buildings are made to shake  instead of flat out collapsing). I started sensing this is no ordinary quake.

It took a long time for the shake to subside. Perhaps the ground was fine, but since we were in the 25th floor, maybe the building shook a bit longer.

When things started to calm down, somebody in the office noticed that there was a huge flame towards southeast (note: turns out this was the gas tank in Chiba)

It was obvious something really bad just happened. I was pretty much decided at this point to go pick my wife up and go home ASAP. I started packing, and luckily the we were told pretty quickly that we were free to go home. I said that I'd be leaving to my coworkers, and headed for the stairs.

While I was going down the stairs, I noticed that the paint on the walls had come down from the quake. I was pretty relieved in knowing that the building didn't seem to have any other significant damage. On the way done, I came across a few people actually coming UP the stairs. "I wouldn't do that," I thought, but oh well. I headed out.

There were a lot of people in the lobby. Outside, in front of the building I saw our CEO along with others from work. I guess they were on the way back from their usual late lunch.

I read that the quake took place around 2:46 afterwards. On that day, I had already left work at around 3:10. I knew I was pushing my luck, but I kept calling my wife. Luckily, she was able to pick up the phone pretty quickly. I checked if everything was okay, and told her that I'd be coming to pick her up. BTW, I tried calling my family that day, but wasn't able to reach anybody until later in the night.

I still didn't know exactly how big this earthquake was, so I headed towards the closest station to check out what the status of public transportation was. As I was reaching the station entrance, another big aftershock hit, and people inside the building started running out.

I don't remember how exactly I heard, or decided to myself, but at this point I knew the trains weren't going to move. So I started walking towards my wife's workplace.

On a regular day, it would take about 30 minutes to reach her workplace on foot, but there were crowds of people on the street (note: actually the situation was much better off than what it would have been a few hours later), so it was hard to proceed. There were also areas where the police had shut out people from (for whatever reason -- I didn't bother checking) so I took alternate routes. I felt secure though -- I knew the place inside out, because of the regular Tokyo-walks that I had been taking for years. I knew exactly where I was headed even without a map.

On the way, I found a crowd of people staring at a TV at a store. I glanced and saw the immense tsunami for the first time. "Holy sh*t!". This was not an earthquake. It was a disaster of proportions which I had never seen before. I was so glad that I had the chance to hear my wife's voice earlier. Otherwise I must have felt much much worse. Anyway, the TV image was enough to pick up the pace to my wife's place.

There was a convenience store open on the way. I clapped and cheered inside my head to the owners of this joint, and went to buy a bottle of green tea just in case.

All this time, I'd been checking twitter to find out what the hell is happening. Some people were claiming aftershocks after aftershocks, but I didn't really notice them while I was walking. I also emailed many friends and of course my family on the way.

At around 4:00pm, I finally got to my wife's workplace. Apparently her boss was just about to continue business as usual. Since I didn't want to just burst in, I emailed her from all the addresses I had, to all the addresses she had. Apparently only gmail delivered on time, and she came out of the door. She briefly went back inside to tell her boss that I came to pick her up, and we headed home.

We kept walking, and at around 5:00pm, we realized that we were pretty hungry. My wife apparently got hit by the quake when she started eating lunch. So when we found a noodle shop open on the way, we went in and had a nice, warm meal. God, I love Japanese noodles.

Then we avoided the big streets (for fear of having to walk through big crowds or having something collapse on us), and kept walking. At around 6:00pm, we were getting pretty close to our home. I was relieved to see that things looked normal around there -- I was now confident that infrastructures like electricity and water would be up at home.

Right before we got home, we went into another convenience store, which still had decent supply. Looking back, this was a good decision, as food and water quickly disappeared from the shelves in the coming days.

And we finally made it back. Looking at twitter, my friends are starting to head home themselves. There were a few people walking a really long distance home too. I was so glad to making it home before nightfall.

I actually don't remember much after arriving home. I guess I felt saved. I zapped through the TV, and talked to my family on the phone.

I started receiving replies from people who I sent emails to the next day. They apparently got my email pretty quickly, but their replies just didn't make it to our servers.

And then in the following days my employer told us that we should stay at home and do what we could as far as work was concerned. That lasted for two weeks.

And here I am now.
There's no punchline or dramatic build up in this story. I just wanted to keep a memo of what I went through on that date. Maybe this will of interest to someone.
    このエントリーをはてなブックマークに追加 mixiチェック
























というわけでとりあえず 3/11の記憶を記録してみた。特に落ちはない。

    このエントリーをはてなブックマークに追加 mixiチェック


写真は今日築地に遊びに行った際に小田保さんでブランチで食べたアジフライ定食をXperia arcで撮影したもの。Macを母艦としてるのでやっぱりiPhoneのようなタイトなインテグレーションは望めないが、まぁそこはdropboxとかを駆使すれば特に問題はなし。音楽はもともとこういう機械では聞かないし。

本当はPocket Wifi的なものも欲しかったんだけど、あれってやっぱり別途回線契約必要なのよね(?)もうFOMA回線があるんだからそれを使わせてくれればそれでいいのになー
    このエントリーをはてなブックマークに追加 mixiチェック

use strict;
use AnyEvent;
use AnyEvent::Socket;
use Data::MessagePack;
use Data::Dumper;


sub main {
    my $host = undef;
    my $port = 8888;
    my $guard = tcp_server $host, $port, sub {
        my ($fh) = @_;

    my $cv = AE::cv;
    my $w; $w = AE::signal 'INT' => sub {
        undef $w;
        undef $guard;


sub handle {
    my $fh = shift;

    my $packer = Data::MessagePack::Unpacker->new;
    my $buf = '';
    my $offset = 0;
    my $w; $w = AE::io $fh, 0, sub {
        my $n = sysread $fh, $buf, 65536, length $buf;
        if ( $n == 0 ) {
            undef $w;

        while (length $buf > 0) {
            $offset = $packer->execute( $buf, $offset );
            if (! $packer->is_finished) {

            warn Dumper( $packer->data );
            substr( $buf, 0, $offset, '' );
            $offset = 0;
    my $s; $s = AE::signal INT => sub {
        undef $w;
        undef $s;
use strict;
use Data::MessagePack;
use AnyEvent;
use AnyEvent::Handle;
use AnyEvent::Socket;
use AnyEvent::Util;
my $count = shift @ARGV || 100;

my $cv = AE::cv;
my $w; $w = tcp_connect '' => '8888' => sub {
    my $fh = shift;

    AnyEvent::Util::fh_nonblocking($fh, 1);
    my $i = 0;
    my $h = AnyEvent::Handle->new(fh => $fh);
    my $next = sub {
        $h->push_write( Data::MessagePack->pack({ foo => $i }) );

    $h->on_drain(sub {
        my $h = shift;
        if (++$i < $count) {
        } else {
            undef $w;

    このエントリーをはてなブックマークに追加 mixiチェック