Wednesday, December 28, 2011

Toolchains

When trying to work with compiling big projects, sooner or later you will need to have multiple versions of C++ /GCC etc utilities.

One way to do this is :


update-alternatives --remove-all gcc
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44
--slave /usr/bin/g++ g++ /usr/bin/g++-4.4
--slave /usr/bin/gcov gcov /usr/bin/gcov-4.4
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 46
--slave /usr/bin/g++ g++ /usr/bin/g++-4.6
--slave /usr/bin/gcov gcov /usr/bin/gcov-4.6

And then choose which GCC you want to use like this: update-alternatives --config gcc

Friday, November 4, 2011

Xcode, mac uninstall in general

Apparently mac does not contain an uninstaller. Its horrible!
Each application now if its simple needs to be trashed from the application folder and it will go away.

However complex applications like Xcode which perform more than one path installation and more importantly create files on destination directories, its horrible.

And they come with their own tools.!


I hate it.

Wednesday, November 2, 2011

Compiling Android platform on OS X lion(10.7.2)

We describe steps not mentioned in the google tutorial:

UPDATE:

#1 Install Xcode 4


#2 Install Xcode 3.2.4 in a non-standard location


#3. Move mackosxsdk10.5 and 10.4 folders to /Developer/SDK


#4. now you should be able to compile.


gcc -v should return:

version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2326.10)To test if your setup is correct: gcc -v




Note
====

As per official google's eng.'s post this should not need to happen. And they are fixing this problem, so that
this is not required.

Saturday, July 23, 2011

Bribes in India - a historical perspective.

It can be your local police, the traffic hawildar , or even someone as simple as a Electric company agent who you call.... ALL of them need money to work.(apart from the salary they get). I am just curious why this happens... why do those bribe askers ,feel its right to ask for bribes to begin with, in other wise morally good society.. ?

Then I went back and studied the demographics of these incidences... apparently north is afflicted by this more than either the west ,east or south of india. Then, it was relatively easy to relate it with the history of the places.

North has been unable to defend itself from hoards of barbaric invaders and then the british imperialists. Typically under these regimes , there was a lot of tax to hindus(jaziya) and few for muslims.

Typically poor people (mostly from lower strata of hindu society) who were fed up by hindu high-casts readily converted to islam.They had couple of advantages doing this. Firstly, they could now be associated with the ruling class instead of being the very bottom of the pyramid.
Now if they proved their worth, they had a chance to attach with a new (relatively nomadic anyways) gene pool of mongols and tatars.

The dynamics of hindu society also changed here. Now the brahmins who were related to the religious structure were extremely aggravated by this since their religious authority was challenged.The Kings who belonged to the kashatriya class were also aggravated by these barbarians who were challenging their rule. The nobles under the king didnt give much fuck because they had their positions no matter who the king was.

A typical comparison in todays world is takeover of a company by other corporation. The new corporation being not as efficient , but having many more resources at its disposal.

Now, the converted class began hating their original hindu higher caste socials. And from this began the culture of demeaning each others religion. The response of hindus was to be morally and intellectually on a higher plane than the bulk of muslims and the new-muslims(low caste hindus).
A point worth noticing is most of the muslims who came to india were either mamaluk (slaves) or mongols(barbaric decendants of genjis kahn).


The other defense mechanism of people like the nobles(sardars) , brahmins was to form a unit which operated on themselves and sustained because of their financial abilities. Muslim couldn't see this game. Now even though the rulers were muslims, the rich class was mostly hindus or other dharmic religions, owners of land were also hindus, so their power increased even under a muslim leader.

The next step obviously was to corrput the law-enforcers by paying them personally. So if you want a jaziya of 10% on my 1000000 mohurs , then I will simply ask you to look the other way for 100 mohurs. Quite frankly the man who was in that post an earlier low-class hindu now a muslim had nothing to do with empire anyways. They had low morals, and hence could easily accept bribes.

Over years this culture developed and was ingrained in the societies of northern india.More so in north west.

Now if we take a look at south, those guys decided to strive for a bigger cause, a hindu empire , marathas and the other people of north india thus had some onus of responsibility and morality. Then its easy to see that these guards wouldnt accept bribes since for them the country was their own, and ruled by their own.


So, in conclusion bribery developed as a counter measure to meaningless and exploitative laws by foreign empires ruling india, a kind of insulation against bad governance that happened in north india for like a thousand years. I am pretty sure moguls were :D very very distressed by this problem and didnt give a shit later on.Leading into rise of noblemen's power.

Then its not a surprise that north indians state have higher corruption perception indexes than states that had local kings. If someone were to do a study on this, I am 100% sure that foreign rule would co-relate very-very highly with bribe givers/takers.


Now, solution is going to be TIME. When people understand and the goveernment really does work for the people, then the general apathetic feeling among officers will eventually decrease resulting into accountability and less corruption.

Thursday, July 14, 2011

Another Terrorist Attack

Again, the same story. Bombs go off in mumbai's populated areas in order to pay tribute to Kasab (the terrorist who cause 26/11).

Sonia Gandhi led Indian National Congress government at center removed POTA and TADA , laws that were key in processing cases that involved terrorist.

In other news, government wants to pass a "minority protection" bill.This bill will attack the majority(india is 80% hindu) of people who target the minority. A simple example: In 2k1 , some muslim people burned train that contained karsevaks(hindus) who were were returning from uttar pradesh's Ayodha sector. These people werent allowed to step out from train and were burned alive.

A massive riot followed killing 1.2k people out of which ~800 people were muslims.

Now who is responsible for this ? If the government wasnt able to protect the hindus burned, why do they want to meddle in the aftermath when the responsible group gets its just punishment ?

Even after giving 1/3rd of Whole-Indian-lands to their dedicated cause, if they are still going to bomb the hindus,

If this is the outcome that we are going to suffer for being secular , Fuck all that secular bullshit...I am a fundamentalist.


Get the fuck off our lands ....


I dont find apt bad-words for that foreigner led government.... Go back to italy.


And gandhi, the whole root cause of being a pathetic state who refuses to act and proceeds to talk, fuck him , fuck his ideologies . We have had enough bullshit thrown in our mouth becuase of that retarded fuck old man whos teaching are worthless(for india today).


Everything that happens has happened, and his grand grand son comments we are able to avoid 99% attacks.

Thursday, June 30, 2011

XFCE UBuntu

Awesome ubuntu distro with the light weight xfce interface. Its pretty neat, esp, if you do not want all the glitter effects on your desktop ,and your more interested in raw-information based view.

ultimate as good as tiny linux ,but with far improved pkg.

Wednesday, May 11, 2011

Where to invest your brain/goals of life.

Most difficult of philosophical questions.It seems many people have thought over this. In general I would say that goals are very much dependent on society you live in, and there can be no such globally(time/space) optimal goal.

Which means: the goals that human can go after are highly suited to their society. Society in turn changes with time. So, goals are ever changing entity which is dependent on a changing social variables.

The only fields that I think remain consistent over time are in general related to maths and science.Mostly maths. Addition cannot be replaced by something like it in near future and it will continue to remain as important as it was when it was invented for example. Same for 0.

In hindu texts, purushartha or the goals of masculine are given as dharma,artha,kama,moksha.

-dharma is dedicated to follow path of good, and build up good karma.

-Artha seems close to goals of modern society, and it relates to agglomerating wealth ,pursuit of meaning.

-Kama : sexual pleasure , this would probably be most important in ancient times.

-moksha: liberation from birth/death cycle... I am not sure about this one. as their are no means to know if it exsists.


One thing to notice here is , this arrangement is so broad that it can classify into one of 4 categories any of the goals of humans irrespective of time space. bravo for that.


This gives me an idea. Design a system that will given the amount of free time, and genericness or specialization of a particular goal, will provide the optimal goal. This can then be classified into global or local levels etc. I can think of 100k details of this now. Does anyone know if such system exsists ?

Tuesday, May 10, 2011

Foreign people pronouncing your name

Its often the case that people of a foreign land will probably pronounce your name in some other way. I think they try to relate it to their own speech/langauge. My name is Nikhil. During my univ stay , here at baltimore ,usa , I have found many different ways that I can pronounce my name.

One observation is , different groups in america will pronounce it differently, and all the people of that group will pronounce it in the same way. (Based on my observation, which is atleast 5 different people from same group).

I'll add new entries as I get to hear them. Also remember that they werent just given the name and told to speak. In each case I had pronounced my name loud-and-clear.


1. Arabs,irani,afgani,yemen,etc :
nikhil becomes ni-khai-el (to me this sounds kyrgiz or russian like mikhail)

2. mostly white of baltimore area(I dont know where they actually come from):
nikhil becomes nicole or ni-kh-ole (damn! I dont like this one bit...)

3. black of baltimore area(dont know where they come from,must admit this happend only 3times):
nikhil became nicolai? (I dont get the relation in this one).

4. chini people(dont know actual origin):
nikhil --> nikeel (no 'ha' sound at all)

so till now

pronounce={nikhil,nikeel,nicolai? ,nicole,nikhail}

[:D] I just think this is funny.


I think this is natural,but I would like to think that I would be able to pronounce foreign names more accurately in first try.


One indication is that this means usa is a diverse country , and if this continues , it will probably end up like India one day.

Friday, April 29, 2011

Pthreads

During my work on thesis, now I am in need of thread api. My default choice is pthread on C. Why? I know C since bachpan, and pthread seems to be the most matured of all the multithreading things present out there. Though its an overkill to actually understand everything in that posix thread standard. I think it'd be beneficial in long run. so, yeah ima sweating on pthreads...

heres a decent tutor for pthreads:
https://computing.llnl.gov/tutorials/pthreads/

Tuesday, March 8, 2011

ASM on 64 bit platform vs 8086 asm

Over some years ago, I had learned great deal of assembly, essentially the 8086 instruction set.
Part of the reason was, that I used in in my undergrad project.

Now,after like 4-5 yrs I am again trying to see the assembly code(thanks gcc for providing conversion) ,and MAN! that code I do not recognize, movl, movd, movq ,movzbl there are like a thousand variations of mov itself ...

although feels good to see at something you did long ago...

:)

My genetic journy (ripoff by natgeo)

It is said, since ancient times, that all brahmins belonging to our subcast are decendants of ancient vedic rishis. These rishis have gotras in their honor. I belong to Gotra of Vatsa (sometimes called Srivatsa).

Now, I had this idea when I saw that natgeo is doing this genographic thing that could trace back my ancestors to a group, defined primarily by some thing called genetic marker. A marker is as they put it, a small mutation that occurs in this case, in the Y chromosome,and because this marker is passed unchanged from a man to his son, its perfect way to form trees such that the person at root is great ancestor of everyone of the leaves.

They lived in between pakistan afganistan border, between rivers of saraswati and sindhu(indus).


Ok, so after shelling out 110$ ,and after waiting for like 3/4 th of a year(ARRGH!) they finally posted my result. So, was it interesting ? Totally. Was it a rip off ? YES TOTALLY.

The thing is, the items that they promise on their webfront ,arent all delivered instead I got only one "online" page, that documented my dna as R1b1 p25(snp present) . And told me that these markers are found in abundance in Western europe and iberian region.I am supposed to be direct decendant of cromagnon.

But what i know : I am direct decendant of great rishis ?

Might it therefore be that cromagnons = great rishis ? [they are btw, always dipicted in coarse clothing and unshaved head tied into a knot, and unshaved beard].

THere is also some classification based on the way they tie the knot, (front,left,right,back).

So, finally I have decided to go further and get classified into one of the possible sub-clads of r1b1.(shelled out another 85$ ).

A quick search reveals that the tribe of Hazara and some people in iran seem to have this varity of r1b1, now I am hoping to be tested as one of them.

If at all, I belong to any other region , then it would for sure mean , that someone got scandalous...damn them whoever that is.

Thursday, March 3, 2011

New Scientific language ?

I have been reading quite a lot of journal papers now a days, and I seem to waste most of my time in reading,and understanding what the author is trying to say. Once you understand it, the concept seems very simple. So simple that you are amazed at the time you wasted in trying to figure it out.

I believe this happens due to lack of current languages to "crisply" describe an idea. Languages that describe ideas are either way to bloated (background,premises etc,and finally the new concept), or way to short to intuitively understand stuff (eg. mathematical equations that describe principle. it could be as simple as ohms law , or as complicated as eg. maxwell's equations).


When I try to compare this with what happens in computers, it essentially reminds me of i/o transfer rates. Far far ago, there was a processor 8088 which had 16bit processor but 8bit data bus.
As a result of this, its processing speed would be handicapped by the transfer rate.


Human brain is a much more complicated structure,from my personal experiences, when this happens, ie. theres not enough input from matter at hand to brain, brain tends to occupy itself in other thoughts, which then will slowly kill your original thought, because its the new thought is already in process and does not need any new input from outside world.

If only there werent so many layers on human communication, we could have achieved some sort of efficiency in reading stuff.

I once had read that our ancestors separated from our primordial ape-races due to a mutated gene that caused the muscles of jaw to reduce, giving more space for brain to grow, and this made us capable of producing speech* or a scheme of conveying ideas/events.


Essentially the "overhead" as we call it in computer jargon , is far too much for current languages.

We cannot really distribute 6billion ideas of 6 billion people very quickly unless we try and get some mechanism like this in place.

In other words, we waste most of our capabilities due to a simple limitation that the languages put on us.

Progress iptables, mangling and all

As described in my last post, i have been trying to get a fully working twice-nat with dns-alg setup.

I finally chose lubuntu (LXDE ubuntu ) as the operating system. puppy is b.s ,so is dsl. both have major problems during installation and package updates.

So, finally after wasting like 2 days on getting the right distro, was on track. Then I shifted my focus to selecting the real platform which the experiments should be carried out on. I mailed two profs, and both of them seem to be more leaning towards the DETER testbed , it supports dynamic configuration of network ,measurements etc.

It appears to be a better lead then eg.planet lab.

Lets see, right now, this iptable,netfilter stuff seems incredibly vast, lets see if i get lucky and find a simple tut.

meanwhile ima already hittin on server fault and stackchange websites.



Lets see how it goes, I am planning to complete everything by April mid. So, if I get to defend by say eg. June, then Ima all set damit!.

Only two major things of my life remain ,and they choose where I go, lets see if given a choice as dire as this, am I able to propel myself to achieve it.

Dash!

Friday, February 25, 2011

socio-personal notes

FUCK this! I am sick of all the marriage invitations that try to present themselves as "hip" by providing some 2 bit banal bull shit about

1. movie /trailers
2. wicket gone/ end of life

and other such analogies, the whole point of doing it was to do something new, and when people repeat the same idea, how is it new...its not.

I am also sick of every other noob, focusing his camera at arbit things and acting like a full professional photographer. One particular picture is to focus at yourself by using a mirror ,and putting it as a dp. WTF!

A quick calculation : rare images in are supposed to be "RARE", to capture them you need to think unlike others. However when you have people who do things because its in vogue , it defeats the purpose. I am not sure they could provide rare images because most of them would try to mimic each other resulting into uniformity rather than rarity.



Some times I am so amazed at level of un-individualistic thoughts represented by some people.Its as if they have no shred of independent thinking instilled in them.

This although seems to be good in a narrow scope of life, its not. Once you dont have any individuality left, you are merely a slave to society (read those who control it).
However, I am not entirely sure if its all that bad.


-
Also, i was just thinking about an interview question that was to count the number of words in a given string .

If scopes are fixed, this is a pretty simple problem, but throw into it unicode, internationalization and bunch of memory allocation schemes and VOILA !

you have got yourself a real tough problem to handle.


Shit that puppy is still installation phase, can we ghost the installations ?
I think this should be trivial, since a file is hdd, we could probably make multiple copies.



Later!

Internet simulation on your laptop and your single IP ISP

I have planned to create a simple simulation that will allow me to actually get the feel of implementing the SI framework on planet lab before hand, the main work for my thesis.Its very late ,but i intend to deliver a solid experiment and analysis , no matter what!Because this is one of those parts of masters, that really makes the course different than undergrad courses.

Behold I am doing everything from my laptop . THANK YOU SO MUCH AGAIN, virtualization , the best thing that ever happened in CS.



Above image describes a rough drawing of how things will work.The hp laptop would host all the virtual network described by the devices inside the circle.
One of the virtual machines would possess 2 nics , one for internal networking and another for external.

I am going to let it be bridged nic, so that i can use ip aliasing to get all the ips i need to simulate pooling of ips.

One machine on the virtual network will act as a dns server, and another as a world wide web server.

When the setup is complete , the expected result is I would try to access a www server of virtual domain from my hp laptop. Hopefully , it should return a different ip each time i try to hit the website with a different ip.


And this is how , ladies and gentlemen , I propose you could do awfull network simulations with minimal hardware.

The only downlfall is this: I cannot just move my laptop to another location and start doing experimentation. This is because, my virtual router (one machine with 2 nics) would require the same changes that my pc would, and I am not sure till now how can I do that in case of virtual box.


One awwwwwwwfully lame experience is installing operating systems using virtual box. It takes billion years to install, and you need to get a good distro so that your machine wont be overloaded. I used two candidates damn small linux, and puppy linux.

DSL is faster ,based on knoppix and all, but it sucks at package mgmt.
puppy is a bit slower than DSL, but apparently its better at packet mgmt.

I choose puppy cause need to install stuff for admins eg. dhcp scripts and all...

If your a new guy in masters, i suggest you to go for a big processor and memory, you will need it because you will more or less have to use virtualization.


Bye till later

Monday, February 21, 2011

Did some reading on ip and natting

Yesterday I read quite a lot about natting and ip. It seems what I am trying to do has already been implemented primitively . The rfc nos. 2694 DNSALG and 2663 twice nat are two informative issues.

awesomeness.

Saturday, February 19, 2011

Thesis work

shit I need to do a lot of stuff ,and that too in a short time.

The planet lab machines have not arrived as of yet.

I think the basic ip aliasing thing is over. However I am not sure how it should work out in case of public ips because public ips are limited.

I need to understand natting in order to get the bigger picture.

The overall structure of the internet can be summarized as leaf network --isp1 --isp2--- ispn.

and finally at the top there will be one network interconnectiong several others...

as such internet could be represented as a tree-ish hirerchical structure.


Well moving on...

Thursday, February 10, 2011

Job interviews conflicting with thesis meetings

Dammit, I am sick of thesis meeting poping out of nowhere and disturbing everything.