2009-05-24

A Rare Video of SWRD

In this recent blog post, Sam reminds how S W R D Bandaranaike changed national language in 1956, something most people in the present generation [wrongly] call a "Sinhala-only" policy.

English was the Language in Sri Lanka until Bandaranayaka changed it in to Sinhala “with reasonable use of Tamil” (the part everyone forget to mention when they talk about this), and later on, Tamil also considered as national language.

This rare video on youtube is an interview with SWRD, where he states the "reasonable use of Tamil" part. He also admires Tamil as a "rich language with literature and so on".

Read more...

2009-05-21

How "Free" Media Create Hatred

Here are two reports on the resettlement of displaced people in Sri Lanka: one by the BBC, and another by the Associated Press.

The BBC report talks about "most of the 250,000 Tamils displaced", while AP talks about "the fate of the ethnic Tamil civilians".

WTF?

In my eyes, they are Sri Lankan citizens, be it "Tamil" or not, our brothers and sisters who desperately need help after going through so much. I am sure that I am not alone.

But some media reports continue to highlight ethnic prefixes. Does someone, or more than one someone, want to stop our country from unifying under a single Sri Lankan identity?

Even if they have an excuse to add an ethnic prefix, how do they say for sure that all the 250,000 displaced people are in fact Tamil? It may be true, but can those reports be so authoritative without even a sample survey?

Here is another news item from Reuters, which talks about just "refugees". No prefixes.

Interestingly, BBC conveniently forgot the "Tamil" prefix when headlining the assassination of Lakshman Kadiragamar and Jeyaraj Fernandopulle but not when pro-LTTE persons got killed (e.g.: here, here and here).

The war is over, but we now have more reasons to be vigilant. Not just about LTTE sleeping sells, but also about those who subtly create and extend ethnic hatred to stop us from uniting as Sri Lankans.

I don't expect every media organization to positively contribute to peace and harmony in Sri Lanka; being neutral is just fine. But if they positively and systematically contribute to create hatred among us, that's where we need to take a stand. By "taking a stand", I don't mean that we should ban them here, but educating ourselves and peace-loving fellow citizens of perils much more dangerous than armed terrorist organizations will go a long way.

Read more...

2009-05-20

We Salute You!

Our country has finally become a truly unified sovereign. Last time it happened was in the 1500s (no, not in 1948).

I salute all our armed forces, those who have sacrificed their lives for the betterment of others in our nation, for making this happen!

Our country is lucky to be blessed with a President like Mahinda Rajapaksa, at the right time, if not later, complimented by great military leadership. A leadership that didn't become pawns of some other intrusive nations who call themselves the "International Community".

We also should be thankful to the nations who were with us during these hard times. Such times are invaluable to figure out who our true friends are.

In this defining moment of history, I think it is important for all of these to happen.

  • Victory celebrations. Peaceful celebrations is a good way to bring our nation together. It is important not to spend a lot of money, next two items in the list needs them. Serving milk rice, hoisting national flags, rallies are all good, as long as they don't grow violent. I noticed Police presence in most of these events, which is good, so things won't go out of control.
  • Helping disabled/fallen heroes, and their families.
  • Contributing to help displaced people.
  • Get rid of ethnic identities, and treat everyones as "Sri Lankans". Just getting rid of the adjectives marking ethnicity is all we need to do. We don't need "Sinhala Villages", "Tamil areas" etc. We have only Sri Lankan stuff. We may use "Sinhala-speaking" or "Tamil-speaking" when necessary, but there is no need to label people in ethnic terms anymore.

I am hopeful and optimistic that this will be the beginning of prosperity to our country!

Read more...

2009-05-16

How to become a Superhero

There is Superman. There is Catwoman. There is Spiderman. And a few others.

There was a time I could count the number of superheros with my fingers. Not anymore. They are now everywhere!

And you can become one, if you like; simple.

Join an NGO to become an "aid worker". Become a journalist. Become a doctor or anyone that can be called an "official", or just call yourself one.

That's all it takes to become a superhero these days. And you will be much more powerful than the handful or traditional superheros!

Whatever you say will be fully trusted by "international" media. Even if they hear your (claimed) voice over the phone, or an email. No cross checking. No verifications. How very convenient?

Your judgment powers will become objective all of a sudden. Your previous relationships, your religions and political beliefs and aspirations, your former affiliations, will never affect your decisions. All that will be past. If others can't make head or tail of something, they will ask you. You will always be treated as "independent".

You will never take sides. Even if you did so in the past, you will make sure to leave such allegiances in the past. You will not merely transform into a superhero; you will be re-born!

If harm comes your way, judgment will have be fast-tracked and accelerated. Justice for other human beings can wait. After all, you are super-human, right?

You will get full immunity. Since you are very objective in thinking, you will never do something wrong. So no one can arrest you. Even if they did, you will have a stream of fans who will do everything in their power, and possibly more, to set you free. Laws made by ordinary humans for themselves cannot apply to you, even when you are not acting in the capacity of a superhero.

And you will be allowed to go to any dangerous place, and any other place, too, for that matter. But unlike for Superman, you will not have to look after your own safety. Others will have to make sure that you are safe, even if that makes their job much more difficult and dangerous. It's their problem; not yours.

And last, but not least, Superman will feel very jealous of you, because he doesn't get paid! ;-)

Read more...

2009-02-03

iPhone 3G for 800+ USD?

In this WWDC 2008 keynote, Steve Jobs said that the iPhone 3G will sell at 199/299 USD in almost all countries around the world.

Today I saw an email passing around which said that Dialog is selling the iPhone 3G for Rs 89,000, more than 800 USD! Few months ago, BT Options, the local Apple agent, was selling iPhones at Rs 120,000!!!

Read more...

2008-05-23

Congratulations Shilpa Sayura

Sri Lanka's Shilpa Sayura project has won the Stockholm Challenge 2008.

The Jury had studies 400 projects from around the globe and selected 145 finalists in six categories. Shilpa Sayura won the first place in the Education category.

Congratulations Niranjan and the team for this great achievement!

I once had the opportunity to see a Shilpa Sayura event at Kandiyapitawewa village. Pictures from that event are here.

Read more...

2008-05-06

Mr Donald, Please Correct the Alphabet First!

I have already replied to Mr Donald Gaminitillake's mudslinging campaign against Sinhala Unicode, which he wields through akuru.org web site and by hijacking discussions on various blogs and forums.

Mr Donald's motives are quite clear. He claims that every Sinhala character shape needs an individual "code point", and has applied for a patent for this "invention". With Sinhala Unicode becoming mainstream, avenues for making money with his pending patent are going thin.

So he is doing what any desperate human being (or animal for that matter) would do; try everything to remove the "opponent".

One of the examples Mr Donald always uses is the absence of character "du" in the Sinhala Unicode codepage.

Of course he conveniently forgets to mention that "da" and "papilla" are in fact available. Well, it requires a bit of brains to put them together. ;-)

Mr Donald, there are lots of missing characters in the Sinhala Hodiya (alphabet), including your infamous "du", let alone "yansaya" and "rakaransaya". If you love the Sinhala language so much as you claim, please start a campaign to "fix" Hodiya!

I have previously pointed out this similarity between Hodiya and Sinhala Unicode, and why "du" + "papilla" is as good as "du". This blog post discusses technicalities in detail including the matter of "yansaya" and "rakaransaya".

Unfortunately for Mr Donald, his "opponent", namely Sinhala Unicode, is growing stronger day by day. Implementations are maturing, more standards compliant fonts are beginning to appear, and as I wrote earlier, more web sites and blogs are now Unicode compliant (e.g.: Sinhala Bloggers, Sinhala Wikipedia, Sinhala Blogs and of course our own Sinhala GNU/Linux).

Read more...

2008-05-03

External Projectors and GNU/Linux

Some GNU/Linux computers seem to have problems connecting to projectors. While my earlier ThinkPad R51 always obeyed Fn+F7 combination to turn on output to an external projector, recently acquired R52 did not.

After some research I found that XRandR has good support for output hotplugging. Although graphical tools are available to do this, I found the following commands useful.

% xrandr --auto
% xrandr --output --auto

The first one usually works, and it has to be issued as the same user running X, and not root.

In rare cases when parts of the screen is cropped due to the projector having a smaller resolution, use the -s option to reset the resolution:

% xrandr -s 1024x768

Running xrandr without options would show what is going on with the screen modes.

Read more...

2008-04-21

Why Native Language is Important for Web

After reading this blog post about blogging Sinhala, I felt like writing my thoughts about the topic.

There are very few "yes" or "no" answers in life, so I don't think it is correct to rule "blogging in Sinhala is a good idea" or vice versa. Most answers can begin with an "it depends", and I think it is true here, too.

In certain circumstances, using in English on the Web is a good idea. When addressing a global audience, or selling to a product on the Web to the global market, not using English will definitely not serve the purpose.

A key argument for using Sinhala is about addressing certain audiences who are not fluent in other languages.

I think there is a more important reason. Certain things can only be done in Sinhala, and this argument holds for any other language.

A blog post is not always a piece of information to be transmitted to a maximum audience. Sometimes it is a work of art. Works of art are diverse, and this diversity is not only limited to language.

Sinhala is not only a communication medium. It also has a very rich literature: poetry, writings and what not. Being a living language, new Sinhala literature is made every day. And if Web is the medium for such literature, obviously, Sinhala has to be the language.

Check out this blog post for example. (You may need to enable Unicode support). It is a collection of Sinhala poetry from an online "hitiwana kavi maduwa", where people used poetry to communicate. I am sure there are lots of readers who appreciate such work. I can hardly imagine how such a blog post can be in English.

So I think the answer to most questions of life applies here as well: it depends. ;-)

Read more...

2008-04-20

LaTeX and Sinhala Unicode

When we met at Excel World on last 17th, Bud, Srimal and myself started talking about using Sinhala Unicode in TeX / LaTeX.

It didn't occur to me that Chamath, who also created one of the first Sinhala FOSS keyboard drivers, has already created a preprocessor for LaTeX called sintex which reads Sinhala files in Unicode/UTF-8. In fact, not only had I replied to his announcement, but also sent a patch to Debianize it! Life is too complex, and I am too human to keep track of all these.

But that forgetfulness turned out to be a lucky incident, as our pursuit lead to something more useful!

So we started creating a preprocessor for Vasantha Saparamadu's Sinhala TeX package which uses Samanala transliteration scheme.

However, Bud pointed out that the generated PDF files will have ASCII characters instead of Unicode, making it a problem for search engines that index them, and convert them for "HTML view" pages.

After some research, we found XeTeX, a Unicode enabled version of LaTeX.

XeTeX uses ICU for text layout, and ICU versions after 3.6 supports Sinhala out of the box. However, latest stable version 0.996 of XeTeX uses statically linked ICU 3.4. I managed to patch the "tetex-xetex" package that comes with Debian and make it recognize Sinhala. The patches were also submitted to Debian.

XeTeX font changes are always manual, which made the source look ugly. After a bit of research, I found zhspacing package, which among other things automatically sets fonts for Chinese characters. But it is a complicated package, but I managed to get an idea of how it uses character class feature in the latest XeTeX version 0.997.

Downloading the latest version of XeTeX from SVN repository and building for Debian was not difficult, except I had to edit debian/control files to replace tetex-base and tetex-bin dependency to their texlive counterparts. I had to first get xdvipdfmx. Here is a rough sketch of the work.

% mkdir xdvipdfmx
% cd xdvipdfmx
% svn co http://scripts.sil.org/svn-view/xdvipdfmx/TRUNK
% cd TRUNK
% chmod +x debian/rules
# dpkg-buildpackage -b
# cd ..
# dpkg --purge dvipdfmx
# dpkg -i xdvipdfmx...deb
% cd ..

% mkdir xetex
% cd xetex
% svn co http://scripts.sil.org/svn-view/xetex/TRUNK
% cd TRUNK
% vi debian/control
% chmod +x debian/rules
# dpkg-buildpackage -b
# cd ..
# dpkg --purge texlive-xetex
# dpkg -i xetex...deb

As the XeTeX web site had warned, the Debian build files provided by vanilla XeTeX were not up to date. After installing I had to create a /etc/texmf/fmt.d/10local.cnf with the following two lines:

xetex   xetex  -             *xetex.ini
xelatex xetex  language.dat  *xelatex.ini

and then run the following commands:

# update-fmutil
# fmutil-sys --enablefmt xetex
# fmutil-sys --enablefmt xelatex

to make "xelatex" command to work properly.

After getting latest version of XeTeX working, the last remaining step was to create a small style file, which I called "sinhala.sty", to make automatic font switching for Sinhala.

% sinhala.sty version 20080420
% Typesetting mixed Sinhala documents in XeTeX
%
% Copyright (C) 2008 by Anuradha Ratnaweera
%
\ifx\XeTeXrevision\@undefined
  \errmessage{XeTeX is required to use sinhala}
\fi
\ifx\XeTeXinterchartokenstate\@undefined
  \errmessage{XeTeX 0.997 or above required to use sinhala}
\fi
\ProvidesPackage{sinhala}[2008/04/20]
\RequirePackage{fontspec}
\newfontinstance{\sifont}[Script=Sinhala]{LKLUG}
\newcommand\latinfont{\fontfamily{lmr}\selectfont}
\XeTeXinterchartokenstate = 1
\newcount\cnt\cnt="0D80
\loop
  \XeTeXcharclass\cnt=10 \ifnum\cnt<"0DFF \advance\cnt1
\repeat
\XeTeXcharclass "200C = 10
\XeTeXcharclass "200D = 10
\XeTeXinterchartoks 0 10 = {\sifont}
\XeTeXinterchartoks 255 10 = {\sifont}
\XeTeXinterchartoks 10 0 = {\latinfont}
\XeTeXinterchartoks 10 255 = {\latinfont}

So, all you need is XeTeX 0.997 and sinhala.sty to write LaTeX files using Sinhala Unicode.

Read more...