Friday, August 13, 2004

Fun With Perl

Came across this wonderful piece of code :
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$^(11+?)\1+$/'

It finds out whether the number that you passed is a prime number or not. All this by just string matching! This was posted by someone called Abigail.

To read an explanation, go to http://montreal.pm.org/tech/neil_kandalgaonkar.shtml

The Marketing guys would not like this though!

One of the shortcomings of this is that it would take large memory for big numbers, and would slow down too. But the idea is beautiful.

Monday, August 02, 2004

A weekend

It was my weekend in Bangalore....and rarely this statement is true.

I have been reading a few Kannada books of late, and all the time I have felt that it would have
been great to write even this in Kannada. I am almost 25 and till now, being a kannadiga, never
have I felt this attachment with my language. I used to feel comfortable while reading english and was so uncomfortable reading kannada.

Now, when I am reading works of Dr. Prabhushankar and Beechee, I get a feeling that the english that I have read pales in front of frankness and humbleness that these writers showed and lived their lives. It feels as if I want to hug these books and never let go!
Partly responsible to this are my friends DC and Manu. Avarige naanu runi. Else, I would have
missed these goldies even longer.

It so happens that I would not listen to my father when he told something like 'Don't do this, do
that, else you will suffer' and the like. But when I get to read the similar thing from Beechee, I can now understand exactly what my father wished me to understand and failed.

It was a hearty feeling to read Beechee in the park and relate to what we have in our village...and many times I could....the backside of homes(we call it hittalu) falling off due to rain..and it used to remain unfixed for years together!!.... any small news spreading so quickly in villages...the indifferent attitude in cities..etc.