Random Thoughts in Life

November 29, 2009

Code completion emacs

Filed under: Uncategorized — Tags: , — V Srikrishnan @ 4:11 pm

I have been looking around for a tool in Emacs which does autocompletion, shows function declaration. I came across a package called CEDET, which promised all these things. It also comes by default in the CVS version of emacs. However, I found the documentation to be piss-poor, worser than most open source projects. There is a “gentle introduction” to CEDET, but I found it useless. Most things like
(require `semantic-ia)
did not work because it was not found. Needless to say, I could get some help from the forums but do not feel like trawling through the list etc. In fact, I am very much surprised that despite some googling around, I was not able to get much suggestions. Wonder how the gurus have been at it, maybe they just imprint their minds on the hard disk through EM waves.

I am now looking for other options.

November 28, 2009

Mathematical formalism and learning

Filed under: Uncategorized — Tags: , , — V Srikrishnan @ 10:52 am

This blog entry results from my successive attempts to learn mathematics. Without going much into philosophical discussions on what constitutes “learning”, I will merely mention the obstacles and my comments. My basic degree is in engineering from a Regional College of Engineering, electrical to be specific “EE” as it is fondly known. Anyways, what has always bothered me and perhaps hampered my learning is the sudden jump in formalism from the undergraduate mathematics which is taught in most colleges in India, never mind their claims to be “premier institutes” to the graduate level mathematics needed for decent research work. Worse, there are very few courses for spanning this bridge. The engineering professors teach the subject from application point of view while the mathematics people look down upon “applications”. This is another pet peeve of mine. When mathematicians get hoity-toity about their “abstractness” and sneer down upon applications, I think they should be made to attend a compulsory course on history of their branch of maths. It will be seen that immediately some practical application has stimulated their field. This is not to say that theorists should not be encouraged but acting hoity-toity is not going to help. Most great mathematicians have helped, in form of books/notes/lectures to bring understanding to, if not actually thrill the engineering audience. Point is, maths guys should run some “pep up” course in India and people who cannot make such course should perhaps look reconsider their PhD aspirations. Let us come back to the point on the gap between mathematical formalism in graduate level and the lack of rigour in undergraduate levels. From personal experience, I think some amount of rigour is needed to build one’s confidence, especially if it has taken a beating in the morass of UG maths. The newer approach to learning mathematics should revive interest in mathematics and help in the newer and more mature perspective in mathematics. The crucial point here is the emphasis on formalism. In my humble opinion, mathematical formalism has come to dominate the proceedings to badly that an ordinary engineer is rattled by the formalism which has come to dominate simply things. Talking to most people in mathematics, it gives the impression that they revel in formalism. I do not for one moment doubt the necessity and importance of formalism. To some, building formalism may also be interesting and their life-goal. However, one cannot expect an engineering background student to build his theory, from his point of view to make it (“the theory”) useful for his dealings with the practical world. Any recourse to some commonsensical explanations are now classified as “classical” and mumbo-jumbo formalism, almost like legalese is used for proofs. I was and still am hesitant to air these views in a general audience. However, I recently found another person who also has similar views. He has made his displeasure known in trigonometry. I quote “Set notation and set language have pervaded all discussion, with the result that a relatively simple subject became obscured in meaningless formalism.” He attributes this to the sarcastically titled(in my humble opinion), “New Maths” which was imposed on America by Americans in response to the Soviet launch of satellite to space. Now, I do not know much nor care about USA. They seem to be doing great, New Maths or otherwise. We in India need to look into our system, at least for the graduate level if we are to produce people of any intrinsic value to themselves and society. For this, a major reform is needed in the teaching and presentation of mathematics at a graduate level. This is the summary of the blog entry!

November 24, 2009

Building ITK Appls on Windows XP using VS 2008 Express edition

Filed under: Uncategorized — V Srikrishnan @ 8:41 pm
Steps for compiling ITK-Applications using VS 2008
1. Build ITK using "Release" mode as well as "Debug" mode.
2. Build FLTK. I used 1.9. Things to worry about building FLTK:
a) go to the VC 2005 directory and double click on fltk.sln. it will want to convert
the 2005 files to VS 2008. let it do it for all the files.
b) Choose the "Release|Win32" option for building. Choosing the "Debug" build gives
errors like "fltkd.lib" not found. i experienced it on fltk-1.10rc3. Also, remember
to make the entire folder writable.  while unzipping i found that the folder where fltk was
extracted was only readable and led to some time waste before figuring this out.
3. Using the usual CMake route used for building itk core, configure itkapps. check the "use fltk"
box abd immediate a whole list of fltk dependencies will pop up as "not found". in the fltk core
library path, put the path/lib/fltk.lib, where path is the base path for fltk. fill in the other
fields as per common sense, you will find the libraries in the lib directory. One thing you need
to be careful is that for the FLTK include parh, put the base directory where you  saved the FLTK.
Do NOT put the subdirectory "FL" as it will lead to "global namespace" errors while building ITK Apps.

November 8, 2009

Malware infestations

Filed under: Uncategorized — Tags: , , — V Srikrishnan @ 2:12 pm

I have read a lot regarding “hijacking” of sites by malware spreading buggers. The links on “safe” sites point to some malware hosting sites. I had a recent first hand experience of this. The site (WARNING DO NOT OPEN UNLESS YOU HAVE AN ANTI-VIRUS INSTALLED AND UPDATED OR YOU KNOW WHAT YOU ARE DOING) http://www.sangeethapriya.org hosts or used to host a large collection of free, legal Carnatic and Hindustani concerts. These are uploaded by a dedicated listener community and each user has his own upload space. When I tried to access this yesterday and today, the homepage was fine but clicking on any link in the homepage lead to a site which was related to malware distributing site. Google has marked it as such.  Read there report by Google here. Yesterday, this site was not distributing malware but today it has started installing malware silently on unsuspecting users. Looks like the Chinese and Ruskies have nothing else to do in this world; lost their minds after getting shafted by Mao and Stalin respectively.

July 5, 2009

Latex equation editor for Powerpoint

Filed under: Uncategorized — Tags: , , — V Srikrishnan @ 10:16 am

Here is a nice latex based equation editor for MS Powerpoint, 2002 or later.

June 24, 2009

Still going to college?

Filed under: Uncategorized — V Srikrishnan @ 11:05 pm

The other day my 5 year old nephew asked me “Why don’t you go to office? Why do you still go to college?”. I was flummoxed. Children really….

June 22, 2009

recent opencv svn compilation with ffmpg 0.5 or later

Filed under: Uncategorized — V Srikrishnan @ 12:45 am

I downloaded a recent version of OpenCV from SVN. I also downloaded a recent SVN version of ffmpeg. This is an informal log of the installation “pains”. I have been using OpenCV since version 0.9.6 and my work fully relies on it. What follows is true for ffmpeg 0.5 also.

Short Version of how I did it

Install ffmpeg with ./configure –enable-shared. Then do ‘make’ & ‘make install’. Do ‘ldconfig’ after installation. check the ffmpeg version by ‘ffmpeg -version’. Note that ffmpeg dumps its header files in 5 header files like libavformat etc. Make a directory called ffmpeg under /usr/local/include., i.e., ‘mkdir /usr/local/include/ffmpeg’. Go to /usr/local/include. Copy ‘avcodec.h  avformat.h  avio.h  avutil.h  swscale.h’ from respective ‘lib’ directories to ffmpeg. I prefer sym-linking it.

Then download the latest SVN version of opencv from sourceforge. It is available as a tarball in case you do not feel inclined to run the SVN from command line. After gunzipping and untarring it, we get a directory called opencv. Change directory to opencv.  Make the file ‘configure’ by doing ‘chmod +x configure’. Then do ‘./configure –without-1394libs –without-python –disable-apps’. These arguments disable 1394/Firewire libraries, python support and building of applications. I have not faced major limitations by disabling these. There should be a series of messages. Confirm that ffmpeg is recognised and will be used. This will be indicated by a line “Use ffmpeg:       yes”. If this does not happen, go back to the step of ffmpeg installation. If you are sure that ffmpeg is installed correctly and you are able to see files in /usr/local/include/ffmpeg/, then one way of checking whether opencv finds the header files is that you search for the keyword ffmpeg in the output of ‘./configure’ typed exactly as previously. In other words, you do ‘./configure –without-1394libs –without-python –disable-apps | grep ffmpeg’. You should get the lines which confirm or deny the existence of the headers ‘ffmpeg/avcodec.h’ availability. If these headers are not found, then your linking or copying is not ok. If on the other hand, ffmpeg has been found, do ‘make’ and ‘make install’ and then ‘ldconfig’.

** For x86-64 users: the configure script has a peculiar tendency of identifying all intel CPUs as pentium4. if you run ‘make’ after ‘./configure’, then you will run into compilation errors saying that architecture specified cannot be compiled. Do not lose heart but open the config.status file and search for the word ‘pentium4′ in this file. You should get something like ‘-march=pentium4′ along with other options. Change ‘-march=pentium4′ to ‘-march=native’ or you can even delete the whole thing. If you have a recent version of gcc, you can enable openmp by  adding ‘-fopenmp’ in the same line where you found the previous expression.

The above worked for me. I hope it does for you.

May 8, 2009

Female LTTE soldier narrative

Filed under: Uncategorized — V Srikrishnan @ 2:31 pm

Here is a very nice article written by a former female ltte soldier. The content as well as the writing style is very well done.

May 3, 2009

Ashamed to be Tamil

Filed under: Uncategorized — V Srikrishnan @ 1:00 pm

A group of passionate LTTE supporters pelted an Indian army convoy with stones. I read this from Xinhua first and disbelieved it. More Chinese propaganda, I thought. However, the news also appears here.

This is a shameful act indeed. The army person leading the convoy must be praised for not ordering retaliation, not a few  lungis would have flown into the air. However, I do wish that less retraint had been shown and these dogs whipped and sent home whimpering. Had this been some other country’s army, surely the casualties would have been on the civilians, I cannot see the US army sitting quietly in some US city while a bunch of black hoodlums or pro-Iran supporters atacking them. What amazes me is the audacity of the people involved, I am quite sure that some local politician hoodlum is behind this. Unfortunately, once this kind of stupid things are done, it becomes fashionable and gets repeated. I hope the army high command issues a very strong protest to the government led by blind men and warns that if this happens next time, the army would have no option but to protect its property by appropriate measure. It is in fact national property. Moreover, what happens if other states start hitting back against Tamils?

April 26, 2009

LTTE

Filed under: Uncategorized — V Srikrishnan @ 12:51 am

My intention was to keep this blog free of political issues; this is still so and I will post minimally on such issues. However, the recent incidents in Sri Lanka where the government is on the verge of finishing of the LTTE has set me thinking. The humanitarian toll has risen to alarming proportions, alarming enough to evoke comments from the international community. Some countries are calling the Sri Lankan government to stop their operations, just when will deliver the deathblow to the leaders. Apparently hundreds of thousands of civilians are caught in the crossfire between the LTTE and the Sri Lankan army.

I generally do not have much of an opinion on foreign issues, India itself having number of them. Two or three days back, an entire train was hijacked by Maoists/Naxalites, definitely Chinese funded, as a warning to people in that region not to vote in the elections. Naturally, considering the Indian mentality, flatulence of cricketers are heard more ludly than bombs exploded by the terrorists, unless foreigners, especially white men are killed. Then of course, it is time for candle lit marches. Repeated bomb blasts in Mumbai, UP, attack on Akshadham, bombings in other places of India have not bothered the candlewallahs, who in those times use it for other purposes. Attacks on the Taj and some pubs brought out these candles from the holes where they are usually shoved and lit. However, the point is that in view of such troubles in our own nation, it is difficult to comment on others’ problems. I did feel bitter over the inaction of the Indian government in this issue, anytime a Palestinian dies or a person tortured in Guantanamo, the Indian government is anguished and promptly passes resolutions and condemnations. Besides, the Indian government had been to psyched out as to involve itself in  a war with Bangladesh in 1971. It could also take some stand in the issue of Lankan Tamils. It is of course another issue that when any army enters the civilian area, there is bound to be chaos. Is the Indian government sympathy reserved for only certain sections of people, I wondered.

I was recently asked by a friend on my opinions on the setbacks LTTE was facing in Lanka. I am of the opinion that Sri Lankan Tamils, a majority of them being Hindus would have faced trouble from majority Sinhalese, both on ethnic and religious lines. It is human nature that majority and minority always are uneasy, wary and suspicious about each other. So, it was there. However, the LTTE had shown its strength and the whole nation was ravaged. They could have launched a political wing and contested the elections. If their principles and ideology had such support so as to inspire such loyalty, surely their party would win hands down and Prabhakaran, their leader would be an important political man. However, LTTE did no such thing; it demanded a separate homeland. Now, no country will tolerate this; the fact that the SL government was willing to negotiate indicated that it had understood the grievances of the Tamil people. A violent uprising followed by political participation is generally the way to coexistence, if not complete inermingling. The fact that Prabhakarn did not do this was a major tactical blunder, in my humble opinion. He personally lost the change to win power and also the Tamil people and indirectly the Sinhalese were also losers, all because of his ego or whatever one calls it.

I had also occasionally wondered the origin of arms to the LTTE. Also, I had assumed that the LTTE cadres were primarily Hindus, natural because the animosity was between majority Sinhalese Budhhists and minority Hindu Tamils. I was surprised at the many Christian names of the LTTE leaders, Anton Balasingham is or rather was perhaps the most famous. Similarly, I recall reading about the death of the intelligence chief of the LTTE in a bombing raid by the Sri Lankan airforce, he too was a Christian.However, I was of the opinion that this was a conflict more on ethnic lines rather than religious beliefs. NEver had the LTTE claimed that they wanted to establish a Hindu state. Similarly, the nutters from India were also not claiming the LTTE as their brethren; this would have given the candlewallahs and chaddikissers their opportunity to flay Hindus and heap guilt on them. A few moments back, on an idle curiosity, I typed “ltte christian” on Google. A reader can try it himself or herself. It turns out that Prabhakaran is converted to Christianity and the LTTE is actively supported by one kind of Church there in SL. There are think and fast allegations of donor money being used to fund the LTTE, donations coming from the Christian West.

Now, I thought one should not attach any significance to the religion of the cadres, to me it was an ethnic clash primarily. Not that one kind of fight is “nobler” over the other. However, such active interference by the Church or its representatives clarified one mystery at least. This explained to me why a certain sworn anti-Hindu leader from Tamil Nadu calls Prabhakaran his bosom pal. Also, I must mention here that no Hindu organisation supported LTTE in its earlier days whereas Christian support says something clearly about the Hindu mentality. Let me state it clearly that I am not comparing religions, I am not interested in that. However, those in the Western world who worry about Hindu terrorism should clearly note the troublemakers are hardly ever Hindus.

Coming back from the digression, I hope that somehow this issue is resolved and peace returns to that land. India wants strong neighbours, not puppets who give away whole districts to religious fundamentalists, like Pakistan has handed over Swat to the Taliban. I must commend the SL government and people on their tenacity. The sooner the Tamil people realise that LTTE wants unbridled power, the better is it for them. I now fear that Prabhakaran will now be hailed as a martyr and the links with the Churches will not be uncovered or publicised. India has apparently sent some envoys to SL, lets hope that Indian diplomacy extricates the genuine civilians without irritating the Lankans in their internal affairs.

Older Posts »

Blog at WordPress.com.