Deepavali in Chennai

Fireworks_Diwali_in_Chennai_Tamil_Nadu_India_2010

Deepavali time always was the best time of the year, the most cherished memories of one’s childhood revolve around deepavali, you would either go to relatives’ homes or they would come to yours. It was always fun to meet up with your cousins, no matter if they were not the same age group as you or not.

A week before deepavali, most of the conversation in schools would be about the new clothes and how much fire crackers everyone bought. The cost was not the topic, our parents never told the exact values anyway, the amount was all that mattered, arm lengths were the standard units during the conversations. No one was jealous of others, it was just an information exchange and a leverage to beg your parents to buy more.It didn’t matter how old you are, deepavali meant fire crackers and everyone shall light at least one, no exceptions. If they didn’t, you made them do it.

55557138

Roads during deepavali looked like they were ravaged by war,it’s like a battlefield out there with paper bits all over the place.Bombs would go off all the time, some nearby, some farther away.All adding to the intense battle field effect.The smell of the fire crackers, strong and crisp in the air, was intoxicating.

To put it into context and to parody Apocalypse Now,

“Love the smell of fire crackers in the morning, smells like Deepavali.”

100 walas (garland crackers) would be the automatic rifles and 1000 wala would be the machine guns.The little ones had their toy guys with rolls which went out with a small pop.

No matter how pro you are, you can never be too careful with atom bombs, utmost caution is taken in lighting these green thread covered bad boys, light it and run faster than Usain Bolt to safety. the bang never fails to disappoint,and it’s the final sign that deepavali is finally here.and if it didn’t go off, you better not try to light it again, that little devil might as well blow right in front of your face.True to it’s name the atom bomb had a very loud explosion (120 decibel from the box), if you were close enough, you may even feel the shock waves pushing your hair back.

But this was not the loudest one available, its big brother, the naattu vedi (country bomb) had an even louder explosion and was obviously illegal but if you had the right connections, you can get it. Interestingly, these are used in Temples in Kerala as a part of the daily rituals.

2007110854270401_611720e

The lone motor cyclist was like a scout travelling through the front lines, always a loose bijli would go off startling the random motor cyclist on his way back home, startled but never fazed.

for the rich, 1000 walas are not enough, they buy even bigger ones, ones that go from one end of the street to another, it shall be the crowning jewel of the festival. The entire family would be there to witness it, from the youngest kids to the oldest grand parents. Not to mention, the entire street too.

1000Wala

*_*

But this was not enough,lighting fire crackers the prescribed way is too mainstream, bijlis(the smallest crackers available) would be lit in the hand and thrown up in the sky for an aerial shot.the braver ones would try the same with lakshmi vedi.aerial shots would be lit upside down, just for the heck of it. and fountains laid flat so that they act like ground rockets ( surface to surface missiles)

The night-time was a different story altogether, a pacifist version of deepavali if you like it, but that story later.

Here’s how a deepavali day goes for an average tamilian.
waking up early in the morning, taking a head bath (ganga-snaan), new clothes and finally the crackers which were carefully hidden away from the children before deepavali. finally the wait is over and off we go to the streets, even the worst of enemies wish each other happy deepavali and co-operate to safely light their crackers.

no matter how much you had, you will be done by 11 am or you will take a break to watch the special deepavali pathimandram (debate) by solomon papaiya on Sun tv. Who cares what the topic was!! all that mattered were the jokes. By 2pm, everyone would be done, have a hearty deepavali lunch and go for a sleep, a war hero’s well deserved rest.

maxresdefault

The hyper little ones won’t sleep, instead they’ll find some left-over fireworks, get the chemicals from inside them and make a bomb by themselves, guerrilla style. By bomb, I mean they empty out the chemicals into a newspaper sheet and light it up from a distance.It was never quite successful, but doing such things with cousins always had their charm.

you’ll wake up right in time for the 5 pm special movie on sun tv / jaya tv / vijay tv.etc. The movie would have been decided from a large selection through a prolonged, heavy debate, the likes which have never been witnessed in neither the parliament or the UN. Of course, parents always ceding to the childrens’ demands, they had the power to veto.

Finally, with the movie over, now for the nightly round of rockets, fountains, chakras and the like. These would have burnt the biggest holes in one’s wallet. competitions would be held as who would be able to light the most number of fountains with a single sparkler and some would go for the remaining bombs, adding to a night-time battle field complete with artillery attacks. Firecracker companies never fail to impress with more and more innovative firecrackers ( the fancy ones) coming out every year. Of course, the rich guy in the neighbourhood would have bought most of the new ones, but we never cared, we were content in lighting our fountains and watching their fancy new ones. after all, they just had to light the fuse and stay back and watch. There was no fun in lighting the fuse, the watching had all the fun and we had free tickets to that!!

The most interesting one was the butterfly firework, these sneaky little ones were introduced by “Standard Fireworks” and been a big hit ever since, you light the fuse and the cylinder starts oscillating very fast, and by fast, i mean frigging speedy gonzales fast, god knows what they put inside it, it would jump all over the place changing colours and no one and nothing was safe, the movement was too random, even more random than lady gaga’s outfits and we had to alert the neighbours and they would alert us when they’re lighting one, the only advantage is that it gets over within about 10 secs, god bless that, who knows what it would have done if it went for longer durations.

butterfly

One can never be cautious enough with these

Once you were done with your crackers, it’s time for a moon light dinner, many of the family members would go to the roof for the brilliant display of rockets bursting into beautiful patterns of red, blue, violet,gold all over the place, any where you look, any time, there would be these beautiful display of colours.

deepavali

The day after, you realize the actual “scale of destruction”. the street were full of the cracker remains. The carnage was unprecedented and the sweepers had a tough time restoring normalcy. you bid farewell to your cousins and promises were made as to who would go to whose home in the winter holidays.

jij

A small sample

A week after deepavali, the conversation would still be on the topic of deepavali, how many crackers you burst, how long the neighbour hood rich guy’s wala was (yeah we bragged about that too). How much fun you had with your cousins and finally how our favourite hero saves the damsel in distress in the movie.

Overall, deepavali was our answer to Christmas of the west. It has never failed to disappoint

<NOTE> This was written around a year ago, about the same time. Happy Deepavali! </NOTE>

Intel Underestimates Error Bounds by 1.3 quintillion

gokul:

Do checkout Pentium FDIV bug too

Originally posted on Random ASCII:

imageIntel’s manuals for their x86/x64 processor clearly state that the fsin instruction (calculating the trigonometric sine) has a maximum error, in round-to-nearest mode, of one unit in the last place. This is not true. It’s not even close.

The worst-case error for the fsin instruction for small inputs is actually about 1.37 quintillion units in the last place, leaving fewer than four bits correct. For huge inputs it can be much worse, but I’m going to ignore that.

I was shocked when I discovered this. Both the fsin instruction and Intel’s documentation are hugely inaccurate, and the inaccurate documentation has led to poor decisions being made.

The great news is that when I shared an early version of this blog post with Intel they reacted quickly and the documentation is going to get fixed!

View original 2,252 more words

Nested Functions in C

Yes, you read the title right. No, I’m not crazy , OK maybe a bit (no pun intended). Maybe I’m sleep deprived, I honestly don’t remember when was the last time I had a good night’s sleep but it is true, C does support nested functions, All that you learnt about C was wrong (Gasp!!) Don’t trust me? Fine, go ahead and try the following code out.

         #include<stdio.h>

         int main()
         {

           void foo () {}return 0;

         }

  GCC compiles it without a hitch. See, I told you! (again, no pun intended)I search around and figured out that ANSI ( C99 ) does not allow for nested functions. However, an addon for GCC provides support for it. I haven’t checked out its scoping rules or made any progress along that path. Do let me know if you find this out.

K THNX BYE

Numbers every Programmer should know

When discussing about Memory Hierarchy in today’s ( 25th Sept. 2014) OS class, I assumed that for those paying attention the sheer magnitude in access times between the different levels of the hierarchy should’ve been mind-blowing to say the least.

While the discussion continued, I recollected something I read a long time back. It went by the Title “Numbers every Programmer should know”. It was a listing of reference time for accessing various memories (Cache, Registers, HDD, Internet .etc) . The numbers were part of a talk given by the legendary programmer , co-inventor of mapReduce and Google Fellow Jeff Dean during an internal talk on building large scale distributed systems. This was later publicized by Peter Norvig, Head of Research at Google. The list is extremely interesting and the way the numbers have evolved over time show the pace at which technology is developing. Take a look for yourself.

Try guessing where current day computers are spending most of their time on? You’ll realize that they spend most of their time waiting, waiting for data to process.
This is fine for personal computers but in data centers, servers and other applications where performance is the key, this is just not acceptable. This was one of the main reasons for developing event-driven models for servers. Nginx and node.js are two examples of event-driven servers

This video gives a very good introduction to node.js. It also talks about the waiting problem and how node seeks to solve it.

 

As an addendum you can check out the numbers in big data, 6 PB, that’s the amount of chat data facebook has ( all our Awww!!! , Ohhh, hmm, :), :( , :\, >.< , :P all are there)

http://doubleclix.wordpress.com/2011/11/01/bigdata-counts/

References

http://colin-scott.github.io/blog/2012/12/24/latency-trends/
http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf
http://norvig.com/21-days.html
http://doubleclix.wordpress.com/2010/11/11/google-a-study-in-scalability-and-a-little-systems-horse-sense/
http://doubleclix.wordpress.com/2011/11/01/bigdata-counts/
https://gist.github.com/hellerbarde/2843375
http://www.cs.virginia.edu/~evans/talks/cs390-s04/