Behdad Esfahbod's daily notes on GNOME, Pango, Fedora, Persian Computing, Bob Dylan, and Dan Bern!

My Photo
Location: Toronto, Ontario, Canada

Ask Google.

Contact info
Hacker Emblem Become a Friend of GNOME I Power Blogger
follow me on Twitter
July 2003
August 2003
October 2003
November 2003
December 2003
March 2004
April 2004
May 2004
July 2004
August 2004
September 2004
November 2004
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
October 2008
November 2008
December 2008
January 2009
March 2009
April 2009
May 2009
June 2009
July 2009
August 2009
November 2009
December 2009
March 2010
April 2010
May 2010
June 2010
July 2010
October 2010
November 2010
April 2011
May 2011
August 2011
September 2011
October 2011
November 2011
November 2012
June 2013
January 2014
May 2015
Current Posts
McEs, A Hacker Life
Sunday, August 29, 2004

Did I tell that I've moved? Moved to a gorgeous flat on 7th floor of a very good building right in the middle of downtown, Toronto. There's something very very amusing that I cannot tell here :'-(. I may put photos later... Here is a map of the flat in EPS format.

Friday, August 27, 2004
 FAT32 hackings in 2004!

Of course not! Here is the story first: Behnam sent me back my tiny Minolta DimageX digital camera, but forgot to send the USB cable. So I had 128MB of space in my SD Card to fill with photos, and then wait for the cable to arrive by the next carrier from Tehran ;-). So, with Siamak, we made some 160 great photos, of meeting with Toronto Dylanists, in Toronto Wonderland, Niagara Falls region, and a few other places. I ran out of memory a few times, and each time I went back and removed a few redundant or bad photos, to make more space. After dropping Siamak at the airport, I was getting back home when in the subway, a bit bored, I was playing with the camera when I formatted the SD Card with all the photos inside!

I was sure that it just "quick format"ted it, can't empty 128MB in 2 seconds. My heart was in my mouth. I went straight to Future Shop and bought a USB SD Card reader, came home, copied the whole partition image. God, you mean I have to go back to 1995 and unformat/undelete the files, or worse, run Norton diskedit, or even worse, recover my photos by reading FAT32 chains manually?!?!?!

I made a guess that this dumb camera just writes the files sequentially all the time, no fill-in-the-gaps I mean. Well, thinking a bit more you see that you don't need to make any assumptions for that. The usage pattern has been all writes, with 5 batches of removes. So at most 10 images can be hurt. I proceeded and did that, I first copied an old photo taken by the same camera, and the typed these on command line:

# dd if=/dev/sdb of=sdcard
# head -c 100 pict0680.jpg > header
# python
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sdcard=file("sdcard", "rb").read()
>>> header=file("header", "rb").read()
>>> header
>>> import string
>>> jpgs = string.split(sdcard, header)
>>> len(jpgs)
>>> jpgs=[header+x for x in jpgs]
>>> c=0
>>> for jpg in jpgs:
... c += 1
... f = open(str(c)+".jpg", "wb")
... f.write(jpg)
... f.close()
>>> ^D
# ls
100.jpg 118.jpg 136.jpg 153.jpg 21.jpg 39.jpg 56.jpg 73.jpg 90.jpg
101.jpg 119.jpg 137.jpg 154.jpg 22.jpg 3.jpg 57.jpg 74.jpg 91.jpg
102.jpg 11.jpg 138.jpg 155.jpg 23.jpg 40.jpg 58.jpg 75.jpg 92.jpg
103.jpg 120.jpg 139.jpg 156.jpg 24.jpg 41.jpg 59.jpg 76.jpg 93.jpg
104.jpg 121.jpg 13.jpg 157.jpg 25.jpg 42.jpg 5.jpg 77.jpg 94.jpg
105.jpg 122.jpg 140.jpg 158.jpg 26.jpg 43.jpg 60.jpg 78.jpg 95.jpg
106.jpg 123.jpg 141.jpg 159.jpg 27.jpg 44.jpg 61.jpg 79.jpg 96.jpg
107.jpg 124.jpg 142.jpg 15.jpg 28.jpg 45.jpg 62.jpg 7.jpg 97.jpg
108.jpg 125.jpg 143.jpg 160.jpg 29.jpg 46.jpg 63.jpg 80.jpg 98.jpg
109.jpg 126.jpg 144.jpg 161.jpg 2.jpg 47.jpg 64.jpg 81.jpg 99.jpg
10.jpg 127.jpg 145.jpg 162.jpg 30.jpg 48.jpg 65.jpg 82.jpg 9.jpg
110.jpg 128.jpg 146.jpg 163.jpg 31.jpg 49.jpg 66.jpg 83.jpg header
111.jpg 129.jpg 147.jpg 164.jpg 32.jpg 4.jpg 67.jpg 84.jpg sdcard
112.jpg 12.jpg 148.jpg 165.jpg 33.jpg 50.jpg 68.jpg 85.jpg
113.jpg 130.jpg 149.jpg 16.jpg 34.jpg 51.jpg 69.jpg 86.jpg
114.jpg 131.jpg 14.jpg 17.jpg 35.jpg 52.jpg 6.jpg 87.jpg
115.jpg 132.jpg 150.jpg 18.jpg 36.jpg 53.jpg 70.jpg 88.jpg
116.jpg 133.jpg 151.jpg 19.jpg 37.jpg 54.jpg 71.jpg 89.jpg
117.jpg 134.jpg 152.jpg 20.jpg 38.jpg 55.jpg 72.jpg 8.jpg

Voila! And guess what? All photos are correct except for exactly 10! It really doesn't make sense to go about FAT32 hacking anymore. But I know where to find the missing bits...

Here is a proof of recovery:

Me and Siamak in Wonderland

 Siamak Tazari

A couple weeks ago, a dear friend was visiting me. He was good old Siamak Tazari (photo below), on his way from Germany to Vancouver for a year of exchange program in UBC, just stopped in Toronto for the week of August 9th to August 16th. Although I just now Siamak for five years now, he's been one of the most influential people on me who's shaped almost all my current interests, all in just two years, many of them none of us ever noticed before. Here is a short list for now:
  1. He brought me (among others) to Web Programming classes tought by his father. That was where I first heard about HTTP, Apache, etc, which is, well, among the top of my expertise for a few years now.
  2. Then I wrote my first CGI program with him. It was a silly simple Delphi program, doing the old trick. We were both nation team member candidates in Young Scholars Club for IOI'2000. We installed Apache on my machine in our lab, and wrote this little Delphi CGI program. When people visited our page (at that time people around us didn't really knew about internet addresses. So didn't note that it's not a page on internet, but a local machine at all), it showed them 5 playing cards, asking them to choose one and say it's name, then click next. After clicking next, the CGI application was fired listing the five cards, and I, sitting in the same lab hearing them, would select the chosen card. Here you go, we had quite a lot of fun with this silly program! It took other students a week or so to find out what the whole trick is...
  3. Siamak helped me to buy my Pentium III computer, which was awefully good, and after I installed Linux, he told me how to recompile kernel to enable sound. I never managed to make the sound working on that system, but the kernel compilation remained in my mind.
  4. After I got interested in Pink Floyd music by watching Pink Floyd The Wall movie, Siamak gave me a CD full of Pink Floyd MP3 albums. That made me a Pink Floydist.
  5. Later after he left Iran to Germany, he turned to Bob Dylan, and sent me a CD full of Bob Dylan MP3 albums. That made me a Dylanist that still I am. He's an awesome Dylanist himself. I learn a lot from him. Moreover, when I became interested in Joan Baez, he told me to find and listen Diamonds and Rust. He even found a Dylan concert ticket for my second concert in Toronto remotely from Germany!
Well, that's it! You read the rest...

Siamak Tazari playing Visions of Johanna

So, in his trip to Toronto, we finally met after two years, had great fun together, and had some great Tequila. Siamak, I owe you so much. Thanks for your friendship.

Update: One more thing, people are typically amused by the fact that my hands have put marks on my laptop where they sit, two heart-shaped black parts on the gray body of the Vaio. No one else I knew seen with those on his laptop, until Siamak arrived, and he had the exactly same marks on his laptop too! Can you believe that?!

My Vaio laptop (a.k.a. McEs), showing the two heart-shaped marks

Saturday, August 21, 2004
 Bidi UI Project

After moving GNU FriBidi to and purchasing domain for that, now I started a project called Bidi, to document Bidirectional User Interfaces finally, on beloved again, and got for that.

Friday, August 06, 2004
 Aryanpur Dictionary

In the early 2004 I started a debate on Persian Computing list on how people are infringing copyright of Aryanpur Dictionary data by packaging it in dictionary applications for free download, or even maybe by providing online dictionary service based on this data which seems to be widely copied and assumed to be in public domain!

I couldn't stop any of them from doing so, and we even exchanged some bad words a couple times. But now things look a bit different: Yesterday Dr Manoochehr Aryanpur-Kashani, one of the authors of the dictionary and several other dictionaries, and was wondering how I got interested in the issue. To me it sounds like a great success, for at least we finally have an access to him. I'm going to ask him to:

I will write down the whole story with links to the posts and everything later for the records.

Wednesday, August 04, 2004

If you still don't know what's new in the 1999 C standard, have a look at the link above. Some of these new additions are so tempting... But I can't make real use of them, otherwise I would start next library in C99.


I finally inserted the Fedora Core 2 DVD and installed it! Nothing really broke. Hardly anything changed at all! Well, now at least I can do "yum update" again.

I found out that most of the brokenness in menus et al comes from my dotfiles. So, in a first step, I removed all my GNOME CVS checkouts and cleaned up my ~/lib, ~/include, ..., set up a complete GNOME HEAD build in /opt using jhbuild. Yum, jhbuild, and the crs tool that I wrote, all show that Python is the tool for this kind of jobs. NO OTHER language is so charming to work with lists, graph, and config files! The build is just half way and I expect it to go for 10 or 15 more hours.

The build system is not ideal yet, but since I've got a small install of FC2, many build problems show up. Three of them so far.

So it remains to clean ~/.gconf, ~/.gnome-panel, ...

Also after cleaning up the old root partition, well, I will have a 10GB free partition! I will eventually move /opt to it since I expect to run out of space before the build finishes.


[Yes, didn't start work on FriBidi yet this week...]

Sunday, August 01, 2004
 26th Internationalization and Unicode Conference

The program for IUC'26 arrived today. I'm still waiting to be cleared for the visa I applied for to get to IUC'25. By the way, the slides of my that I prepared for that talk are here and the paper is here.