Parsed Participle

The personal weblog of Faiz Kazi: Mostly oddities in programming, life in Japan, occasionally music.

[ Home | RSS 2.0 | ATOM 1.0 ]

Aug 2008

Tue, 26 Aug 2008

Avoid STRAWBERRY CONES.

If you happen to be curious about Strawberry Cones, a Pizza delivery chain in Japan, not unlike Dominos - my advise to you would be to curb your curiosity! Their pizza is terrible and overpriced. They call themselves
"The worlds best pizza and ice-cream since 1983."
Of course, if the caption did not mention pizza then nobody would figure out what Strawberry Cones actually delivers. I don't know about the ice-cream (gelato presumably) but the pizza is simply bad.
posted: 10:08 | path: /japan | permanent link to this entry


Tue, 19 Aug 2008

Squid in the Thar

img_0287.jpg

A rather surreal breakfast

I just found this surreal photo of me sharing dried squid with a dog in the Thar Desert.

I believe this was in December, 2005. The sand dunes are the ones a little outside Jaisalmer, Rajasthan. I distinctly recall sleeping tent-less, and that it was very cold.

posted: 04:59 | path: /life | permanent link to this entry
Tags:


Mon, 18 Aug 2008

Izakaya at Evening

I made a mistake today that I always feared I would. I walked into an Izakaya this evening, expecting that I could order the same sort of things they serve during lunch - Soba and Tempura set menus.

Many Izakayas transform into simple restaurants serving regular inexpensive meals during the day, especially during lunch time on weekdays. Though I had noticed that about this place, I had only so far been there during lunch time, so nothing stopped me from walking in at 9 PM hoping to get myself some Soba/Tempura.

This can be awkward on many levels: dress-code is never explicit in such places, but one still stand outs out wearing a T-shirt and jeans, when everyone else is still in business attire after a hard day's work. The other thing is that Izakayas are not just about drinking, but the group ritual of drinking together. I was the only person there by myself, and only because it would have been too rude to walk out right after walking in.

Still, it had been a while since I'd been to one; mostly because of the relatively low profile I have been keeping at least where the social life around work is concerned. Izakaya food, which is basically healthy, small-plate dishes usually meant to accompany drinks, is very innovative and one requires a certain amount of knowledge to be able to order properly, so I had to sort of wing it.

That awkwardness behind me, everything was simply delicious, not surprisingly the Tempura no Moriawase. I accidentally ordered the Wafu-Shumai, which was rather amazing too. Not a mistake that I am regretting too much at this point.

posted: 11:29 | path: /japan | permanent link to this entry


Sat, 16 Aug 2008

Confessions of a compulsive Bikkle buyer

Bikkle

Bikkle, in retro-looking glass bottles. The Japanese (Katakana) text under the logo reads 'Bifidus'

I have no idea why Bikkle seems to have become my favorite drink these days. Bikkle is a yogurt-like drink sold (apparently) only in vending machines in Japan; there seems to also be a version sold in a conventional PET bottle in the convenience stores, but while I can't explain why, I am sure that the glass-bottle vending-machine version tastes much better.

Having discovered that there's a 100-yen vending machine nearby that sells it, it's been a constant rate of two bottles a day. It also seems that I'm not the only Gaijin who is a big fan of this drink: I could list a few people, but maybe I'll simply hope that Google leads other Bikkle lovers to this page.

posted: 08:19 | path: /japan | permanent link to this entry


Wed, 13 Aug 2008

Discovering xmonad

As someone who has maintained his set of 'dotfiles' faithfully for a few years now, window-manager choice and configuration has been of great importance. I used FVWM for a few years, finally switching to Sawfish somewhere in 2005. My sawfish configuration mimics what I had set up in my fvwm days rather closely, and sporadic periods of messing around with settings have been the only (enjoyable) disruption to my otherwise very productive computing life (as far as my Desktop environment is concerned).

I switched to Sawfish simply because it's scripting language, librep is a Lisp - one that I had been spending many commuting Zaurus hours on. Life has been very good with this the way it is.

Until I read yesterday's LTU article a post that talks about side-effects in imperative languages that cause closures to capture variables in less-than-desirable ways. It was not the actual post itself, but a link to a series, with one interesting post featuring a tour of Haskell and a rather fabulous example to use as a working demo program: XMonad, a really good window manager written in and extensible in Haskell:

  • Windows are automatically tiled
  • Mouseless
  • Configurable (even in real time), using Haskell

I'm tempted to try it; given todays large displays, arranging windows with your mouse just feels silly.

Imperative-style Iterations and closures don't mix well

The undesirable form of variable capture that Erik Meijer describes is, I think, a lot to do with supporting closures in languages where C-style iteration is still relatively a norm. The for (i = 0; i<10; i++){ /*..*/ } lets you use the i as a block scope variable while it remains a part of the mechanism of the iteration. It's easy to reproduce this in Perl (the language which is many things to many people), if you use the C iteration idiom:
my @arr = ();
for (my $i = 4; $i < 7; $i++) {
    push @arr, sub {
        return $i;
    };
}

for (my $i = 4; $i < @arr; $i++) {
    my $f = $arr[$i];
    print $f->(), "\n";
}
But the idiomatic way does away with this problem; and things are better now that we don't have to get distracted by the iteration mechanism: map and grep where one can:
my @arr = map {
    my $i = $_;
    sub {
        return $i;
    }
} (4..7);

print $_->(), "\n" foreach @arr;
Javascript may not have map/grep, but for Functional-style iterations, libraries do a great job of providing such utilities. Prototype.js comes to mind.
var delayedActions = [4,5,6,7].map(function (n) {
    return function (i) {
        return i;
    };
});
In fact this is where these closure-ish APIs shine - they overcome Javascript's problem (i.e., variables only have function scope) by expressing loops functionally.


Tue, 12 Aug 2008

OpenJDK in Debian/Unstable

I don't routinely need to write Java code these days, but it still feels good to know that the JDK is now available as Free Software in Debian:
$ apt-get install openjdk-6-jdk openjdk-6-source
# and then...
$ which java
/usr/bin/java
$ java -version
java version "1.6.0_0"
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
I don't use Java much (but that could have been because of it's non-free pain), and have so far managed with GCJ surprisingly well. However, having the official Sun JDK as packaged, Free software is really good.
posted: 12:12 | path: /programming | permanent link to this entry


Sections

< August 2008 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      

[ Home | RSS 2.0 | ATOM 1.0 ]