2007-05-29

Unicode and Sinhala Alphabet

There is a great deal of similarity between Sinhala Unicode (~ SLS 1134) and Sinhala Hodiya (alphabet).

Sidath Sangarawa, one of the oldest texts on Sinhala grammar written over 2000 years ago, lists 10 vowels and 20 consonants (see footnote 1), but the book also uses two unlisted vowels ඇ and ඈ (see footnote 2).

Sanskrit influence increased the number of characters to over 50.

Actual number of shapes, known as "glyphs" in modern typographic terminology, needed to write in Sinhala is in the range of thousands, due to derived and joint forms of basic characters.

Listing all these thousands of glyphs was never a popular practice. Students learn basic characters and modifiers, and common sense takes care of generating the thousands of other shapes. For example, after learning "ispilla", you can add it to basic consonants and generate all the "i" forms such as "ki", "gi", "ji" etc.

Hodiya doesn't have any of these extra characters such as "ki" or "du". Hodiya doesn't have rakaransaya nor yansaya. But nobody complained. Everybody knew, and still know, that the Hodiya is only a basic guide to generate more complex glypls.

However, this didn't work when Sinhala texts started to be printed on printing machines. These machines don't have brains and couldn't learn how to "generate". Therefore every possible glyph had to be given.

Walk into an old press to see a large "matrix" or such glyphs.

Then came the age of computer based typography. Computers can be taught to do things, and that is exactly how standards like Unicode and SLS 1134 generate shapes. We can teach computers to generate thousands of glyphs using less than a hundred of basic shapes. For example, we can generate "du" by adding "da" and "papilla", so a seperate "du" is not necessary.

How about "yansaya" and "rakaransaya"? They are generated by sequences including the zero-width joiner (ZWJ). For example, "pra" is represented as "pa", "hal kireema", ZWJ and "ra". ZWJ also is used to represent joint and touching letters.

Gone are the days of brainless matrix-based printing machines.

We need two things to view Sinhala on a computer. A font containing Sinhala glyphs, and the computer programs should knows how to generate glyphs using sequences of basic characters. Let me explain using an example.

Step 0. Here is how a sample web page looks on a browser when it cannot find a Sinhala Unicode font. The "boxes" indicate unavailable character numbers:

Step 1. After installing a font, the browser will show some Sinhala, but if it hasn't "learned" how to generate glyphs, only basic characters and modifiers are shown independently:

Step 2. Now I have enabled the "shaper" in the browser, which is the part that knows how to generate Sinhala glyphs using basic characters:

All is well!

So where exactly is the similarity?

Students learn less than 100 basic characters in the alphabet and modifiers, and use their brains with some support from teachers to generate the rest of the 1000+ shapes.

Computers can be programmed - and some computers have already been programmed - to generate 1000+ Sinhala glyphs using less than 100 basic shapes in Sinhala Unicode / SLS 1134 standard.

As the standard is platform independent, we use it to communicate with people using diverse platforms in the Sinhala Unicode Group among others.

Footnote 1. පණකුරු පසෙක් එද ලුහු ගුරු බෙයින් දසවේ, ගතකුරුද වේ විස්සෙක්, වහරට යුහු හෙළ බස

Footnote 2. Notice the use of ඇ and ඈ, both independently and in consonants: පසැස් ඈ සරලොප් නැතද සර ගතට පැමිණවූ බැවින් සර සඳ නම්.

Read more...

2007-05-25

Ages of life

While chilling out at home a few weeks ago, a colorful "Dothulu" tree caught my eye. After clicking some photographs I totally forgot about it.

When I later checked the photos on a PC, the tree turned out to contain five different types of seeds at five different stages of life! Six if you count the one inside the next branch about to come out.

Manifestations of impermanence are everywhere, but I find this one fascinating, because it fitted into just one colorful photograph.

Read more...

2007-05-23

Orbitrek vs Orbitrak

Recently I wanted to buy an aerobic exercising machine.

After doing a lot of research on the Internet and reading user reviews, I finally settled to buy an Orbitrek Platinum. One of the key decision factors was that it's yet another implementation of well known Ellipical Trainer.

The original Orbitrek had some scary reviews: that it is falling apart. Probably this may be due to poor assembling, but still good enough reason for me to be doubtful. However the newer version known as the Orbitrek Platinum, which also has been around for a while, didn't seem to have this problem and the reviews were good.

So here I am, looking around to buy an Orbitrek Platinum.

First I went to Teleseen Marketing in Majestic City. They were offering the Orbitrek Platinum, but the old one was also available. Then I checked with Himalayas, which was only a few blocks away on the same floor, and to my surprise they also were offering both the old one and the Platinum, but the price of the latter was several thousand rupees lower (about 60% of the one at Teleseen)!

The cheaper one at Himalayas didn't have any reference to "Thane", the company that made the Orbitrek. By some luck I happened to notice a subtle difference. It was not Orbitrek, but "Orbitrak"!

I didn't buy either and did some more research to find out that the "Orbitrek" is the real one and "Orbitrak" was probably a fake.

So I went ahead and bought the Orbitrek Platinum from Teleseen.

Later I noticed so many advertisements and signboards selling the "Orbitrak"!!!

If cost was a problem to buy the "real" product, and if I have a choice between a fake product and a lower quality product, I would go for the latter. Why? Because the fake product developers try to get the looks right to match the real one without much attention to the inner workings, while the low quality product may have done some research to get the inner workings right.

Read more...

2007-05-16

FWDC web site goes mobile

Finally managed to get the mobile version of our Four Wheel Drive Club (FWDC) web site done. The mobile site, m.4x4.lk, has a very lightweight theme, smaller thumbnails, and most external links point to mobile versions of relevant sites.

The difference is best seen by comparing similar pages on the two sites. E.g.: www.4x4.lk/node/29 and m.4x4.lk/node/29.

We would like the new site to be tested on as many mobile devices as possible. Please send your feedback to info@4x4.lk. Thanks in advance!

Read more...

2006-12-12

Running AIGLX and Beryl on Debian

After seeing some eye candy on Bud's desktop last Sunday, I wanted to try AIGLX and Beryl on my Debian Etch notebook. To get a preview of what this is all about, try searching for "aiglx" and/or "beryl" on YouTube or Google Video. Debian Etch now has xorg 7.1 with built in AIGLX, so there was no need to install anything. I "enabled" AIGLX by following "Prerequists", "xorg.conf" and "AIGLX" sections of this blog entry. Just that easy! Here are some important sections of my xorg.conf file. My video adapter is a Radeon Mobility 7500 on an IBM (not Lenovo) Thinkpad R50. IMPORTANT: This is not the complete xorg.conf file!

Section "Module"
  Load    "bitmap"
  Load    "dbe"
  Load    "ddc"
  Load    "dri"
  Load    "extmod"
  Load    "freetype"
  Load    "glcore"
  Load    "glx"
  Load    "int10"
  Load    "record"
  Load    "type1"
  Load    "v4l"
  Load    "vbe"
EndSection

Section "Device"
  Identifier  "Radeon Mobility 7500"
  Driver      "radeon"
  Option      "RenderAccel" "true"
  Option      "backingstore" "true"
  Option      "EnablePageFlip" "true"
  Option      "AGPMode" "8"
  Option      "AGPFastWrite" "true"
  Option      "XAANoOffscreenPixmaps" "true"
  Option      "AllowGLXWithComposite" "true"
EndSection

Section "Screen"
  Identifier  "Default Screen"
  Device      "Radeon Mobility 7500"
  Monitor     "Generic Monitor"
  DefaultDepth    24
  SubSection "Display"
      Depth       24
      Modes       "1280x1024" "1024x768"
  EndSubSection
  Option "AddARGBGLXVisuals" "True"
  Option "DisableGLXRootClipping" "True"
EndSection

Section "DRI"
  Mode    0666
EndSection

Section "Extensions"
  Option "Composite" "true"
EndSection

Then I installed Beryl 0.1.2 by using the DEB packages by following this link, started KDE and ran "beryl-manager". Everything started working as expected! Then I wanted to upgrade to 0.1.3, but couldn't find any DEBs around. So I built some myself using the distro specific build files provided by the good Beryl developers. Thanks! You can get my Beryl/Emerald 0.1.3 packages for Debian Etch (without XGL support) by adding this line to your sources.list file:
deb http://www.linux.lk/~anuradha/beryl/etch/ ./
and installing "beryl" and "emerald-themes" packages. The latter is not installed automatically when installing the "beryl" package. Here are some insteresting things to try:
  • Press left/right arrow keys with ctrl and alt.
  • Press ctrl and alt and drag the mouse.
  • Open few windows and move the mouse to the top right corner (Mac users will scream at this ;-)).
The sad part is that none of these work on my FVWM Crystal desktop. :-(

Read more...

2006-08-28

Sri Lankan Photography Group

Flickr photostreams with tags `lanka' (latest / interesting) and `sri lanka' (latest / interesting) indicate that the tropical island has always been a heaven for photographers. Now there is a Google Group to "discuss photography in Sri Lanka (locations, tips, equipment etc) and share pictures".

Read more...

2006-08-25

Canon announces EOS D400

Canon yesterday announced the successor to its popular EOS 350D consumer SLR, commonly knows as the `Digital Rebel XT'. It is likely to compete with Nikon's recently announced D80. However, Canon's pricing of the new camera at 800$ is more attractive when compared to 1000$ of the Nikon D80. See Canon EOS article on Wikipedia for more details on the EOS series.

Read more...

2006-08-22

FOSSSL 2006

Last year, we organized a successful week of FOSS activities, and we decided to make it an annual event. This year, we named the whole week to be `FOSSSL 2006', as opposed to FOSSSL being one of the events during the 2005 FOSS Week. The events of the week were FossCode, FOSSSchool, ApacheCon, FOSSEnterprise and Geekout. FOSSCode was organized in a similar manner to Google Summer of Code. I was mentoring Mahangu's project for Taprobane. Five more students took part implementing various projects. FOSSSchool, held at the University of Moratuwa, was for introducing FOSS to students. Morning session was for schools and the evening session for university students. I did an introductory session in each. Interestingly, I had to make the one in the evening more `serious' as the students already had a good understanding of what FOSS is. Ken Coar had already arrived, but as a bomb off targetting a Pakistani diplomat, we suggested him to stay at the hotel. However, all the other speakers turned up as planned. The ApacheCon was the first of its kind in Asia. The participation was over expectations. A `Hackerthon' also was held along the conference. The last confernce-like event was the FOSSEnterprice held at WatersEdge. The sessions were moderated, 15 minutes each, and a panel discussion followed each 3 sessions. I followed James Clark on FOSS evaluation, and Bud was the other panelist in our group moderated by Ken Coar. On Friday evening, we left Colombo for the Geekout. I will post seperately on that. :-)

Read more...

2006-07-19

Jeep Outdoor Quest

The 4x4 Club of Sri Lanka and Dimo Lanka jointly organized a unique outdoor sports event at Waters Edge on the 16th. This was different from the "usual" 4x4 events as it included three stages - cycling, rowing and driving. 2006-07-jeep-event-021.jpg Me, my brother and Anuradha Weeraman were at Waters Edge by around 8:30. The climate was very sunny and bright. Soon it became very hot, but Waters Edge is much closer to the nature than the rest of the city with lots of greens and water, and the effect of the bright sun was not that bad. Also, it was much easier to take sharp photographs with lower shutter speeds. I had borrowed a Fuji FinePix S5100 from a friend, as my Canon was no longer working. Its 10x optical zoom proved to be very useful. The first stage of this outdoor triathlon was to to cycle round the lake. The course was somewhat "off-road", but not difficult. Lanka Sportreizen had provided mountain bikes and other cycling gear. 2006-07-jeep-event-030.jpg The second stage turned out to be diffult for competitors who were new to rowing. Some teams already had rowing experience while some others quickly got the hang of it. But there were still a few teams who found it extremely diffult to get the steering right, including one team whose canoe went all over the lake... :-) An organization in Kitulgala had provided the boats (can someone please update me of the exact name?). Lifeguards were also on the alert, but no incident happened for them to take action. 2006-07-jeep-event-024.jpg We were mostly interested in the third stage. Two Jeep Wranglers were provided by Dimo. Both were equiped with automatic transmission (yuk) and powerful 4l straight-6 petrol engines. The co-driver of each team was supposed to hold a 2 letre jar of water and each mililetre spilt reculted in reduced points. Therefore drivers had to be very mild in maneuvering. Obviously Dimo didn't want their new Wranglers to be harshly handled... :-) 2006-07-jeep-event-003.jpg The course was nicely laid out, but not very difficult nor challenging when compared to usual 4x4-only events. Most notably, the presence of mud was limited to one shallow crossing. I'm sure it should have been loads of fun for the participants, but after some time, it became a bit boring to watch. So we started checking out various Jeep models parked for observation including Commanders, Charokees and Grand Charokees in addition to another Wrangler. The event was good in general and unique, and we had a good time. Photos are in my flickr gallery as usual.

Read more...

2006-05-30

4x4 at Nuwara Eliya

The Four Wheel Drive Club and the Nuwara-Eliya Motor Sports club organized the anual off road challenge on the 17th of April at Nuwara Eliya. We (me and my brother Sanjaya) missed the last similar event organized by the Land Rover Owners club at Waters Edge, so we were very keenly looking forward to this one. And we also made arrangements to provide a live update of photos over the Internet. We drove to have a look at the driving range in the late evening of the 16th. Some members of the club were doing final preperations. We had a brief survey of the area with the dim streatlights from across the lake, and returned to my uncle's place where were were staying. 2006-04-ne-4x4-0004.jpg We got to the rally area at around 8 next morning. A long row of "jeeps" were already lined up. The climate was sunny and bright, but the general trend was to rain in the evening. We also met Asantha, our friend in the 4x4 club, who hooked us with Lasantha, the DJ of the event, and we could share the electricity supply with him. Lasantha was very talented at his job, and was always willing to give us a helping hand throughout the event. I connected the laptop to the Internet through GPRS/IR using the IR drivers in the Linux kernel, irda utilities and GPRS Easy Connect. The connection was not very fast, but satisfactory. The Flickr plugin in KIPI used by Digikam was a very convenient way to upload images. Sanjaya Sanjaya was taking photos, and I was uploading selectively as they arrived. It was difficult to capture all the interesting things hapenning all over, so he ran from one place to the other, and back again, and so forth. 2006-04-ne-4x4-0215.jpg My Canon PowerShot A70 was faulty, so this time we had borrowed a Fuji (don't remember the exact model) from a friend. It was also not an SLR, but had a 10x zoom which was very useful. We had two memory sticks, and could swap them without keeping one of us waiting for the other. By the way Sanjaya's photograph shown here was taken on the next day, as the ones I took during the event was not very clear. :-( 2006-04-ne-4x4-0073.jpg The morning continued to be bright and sunny, and the event progressed merrily. The obstacles were of varying degrees of difficulty, and carried points accordingly. Sanjaya was worried that still photos didn't capture the dramatic effects in clearing them. For example, a Nissan Patrol, which was doing really well, was airborn for a second or so at an unexpected moment, and Sanjaya found himself too late to capture it while in the air. A video, on the other hand, whould have done justice in capturing everything that came to pass. 2006-04-ne-4x4-0158.jpg By early afternoon, the sky started getting darker, and eventually rain set it. The organizers first decided to select the "top 10" from the already finished obstacles and hold a timed event, but later that plan also had to be cancelled. We stopped uploading images and started wondering around to see closely how the competitors were showing off "freely" on the track. 2006-04-ne-4x4-0340.jpg And what a showing off it turned out to be! The attaction was a muddy hole. One after the other, competitors started attempting to clear it in different ways. Some were successful, and some weren't, and the (friendly) reaction of the audience was in compliance with the outcome of each attempt. ;-) Slippery conditions in the middle of rain added another layer of difficulty, but the sheer courage of the competitors was amazing. By late evening, we remembered that both of us didn't eat nor drink anything for the whole day and hunger and thirst started setting in. So we decided to return home at around 6 in the evening, and had a refreshing meal. After a short nap, we started to drive to Colombo at around 9. Then we had the last, and the worst, adventure of the day. Our petrol tank was far from empty, but we knew that we can't make it to Colombo with what was left. So we wanted to fuel the Jimny as soon as possible before it becomes a crisis. But the gas stations in Thalawakele, Kotagala and Hatton were all closed, and the matter was alowly becoming a crisis. By about Ginigathhena, we could travel only about 10-20 kilometers more before we start going on the reserve. So we had to make a decision. We knew that the distance from Ginigathhena to Nawalapitiya was 12km, and we would definitely make it to Gampola from there. But if we can't find petrol in Gampola, then the journey from there to Peradeniya, where Sanjaya was certain that we can find the gas station to be open, was a risky one. But we decided to take the risk. We also first tried to contact some friends in Gampola to find a bit more petrol to reduce the risk, but later decided not to wake them late in the night. And we were lucky. We could reach Peradeniya, and the gas station was open. And it was around 3 in the morning when we finally reached our lodgings in Colombo. Images Sanjaya captured during the event are available on my flickr gallery.

Read more...