The Almost Forgotten

How often do you remember the people who journeyed along with you in the past, the folks who at some point were pleasant company, good friends you might say, at that point, but later on drifted away? I remembered one this morning, was casually flicking through the newspaper, looked at the date at the top corner and bam! gears whirled in my head, conversations from the past came rushing out of nowhere, screaming like seagulls on the coast and I let out a silent ah! wondering how the old fucker was doing. Anyway, I have no means of contacting and wishing the fella, and besides I am not very keen on kindling old friendships, its never the same as it once was.

These memories are like the stuff in the attic, old relics that held some significance in the past, only now they are a dump that one occasionally visits to brush away the dust, allowing it to settle down in a different pattern. Sigh.

current while(1) song

I suppose everyone goes through this - wake up with a song struck in your head, hum it everywhere starting from the shower all the way to work, loop the song on your media player and cock your head like a drunken ostrich trying kung fu tricks. Perhaps not the kung fu part, but definitely the rest. Anyway, I have been doing that to this song all day long.

Filed under  //   while(1)  

1984 vs Brave New World

Media_httpiimgurcomcp_jbcce

So who was right??? Huxley?

 

Pic taken from: http://www.recombinantrecords.net/

Problem 24

Problem 24 in euler's deals with getting the millionth lexicographical permutation of the digits 0-9. Generating permutations is not a big deal, quickly plunged into the problem and brute forced it into submission.

def problem24():
    def perms_gen(seq):
        if len(seq):
            for i in range(len(seq)):
                curr = seq[i]
                remaining = seq[:i] + seq [i+1:]
                for gen in perms_gen(remaining):
                    yield [curr] + gen
        else:
            yield []

    i = 1
    perms = perms_gen(range(10));
    while i < 1000000:
        perms.next()
        i+=1
    print ''.join([str(i) for i in a.next()])

problem24()

The drawback was that the whole thing ran for over 10 seconds. Anyway after unlocking the problem, I checked out some of the solutions and had a why-dint-i-think-of-that moment reading this.

euler   (PHP)  euler is from England
I'm not sure how md2perpe did it, but when I was developing this problem I initially solved it by hand.

We know that there are n! permutations for n distinct digits and, as we're working in lexicographical order, after 9! permutations the ten digit string will have become: 0987654321. The 9!+1 permutation will be 1023456789, the 2*9!+1=725761 permutation will be 2013456789. However, the 3*9!+1 permutation (3012456789) will be greater than one million. So we now consider the permutations of the last nine digits, 013456789: 6*8!+1 will take it to 701345689. We have now computed 967681 permutations and arrived at the number 2701345689. Then we look at the last eight digits, and work out that a further 6*7!+1 takes it to the string 2780134569 and a total of 997921 permutations...

Once I discovered this method, and rather than continue by hand, I wrote a programme to complete this (tedious) task for any given number of permutations.

Anyway, i have moved into level 1 and got myself a badge here

Media_httpprojecteule_cbhdm

Tomato Red

My team mates gifted me a tomato red coloured t-shirt on my birthday, yes, a tomato red tee. I usually pick and wear neutral colours, colours like muddy brown, dung brown, dry dung brown, dry cement grey, wet cement grey, dung ash grey, volcanic ash grey, slate grey, colours that would blend me into the walls and make me as inconspicuous as possible. I am a little partial to green and at times, when I feel a bit adventurous, I go for something bright, like say, mossy green.

There is no way I would ever go for tomato red, any red for that matter, even if I got real high on acid, stripped off all my clothes, ran into the streets and had helicopters with chopper lights and TV camera crews on board irradiating my nakedness and the only way to stop my pulchritudinous nudity from being broadcast to 800,000 cities worldwide and accidentally to any extra terrestial life trying to get a glimpse of life on earth would be to wear a tomato red garment lying by my side, not even then, I wouldnt even bother looking at it, instead I would put on my sunglasses and wave all the stuff at my disposal at the cameras.

Anyway, it was a gift from friends, I cast aside my irrationalities and wore the shirt. I went to the mirror to get an opinion, both me and the guy in the mirror were surprised, the shirt looked great and I.. I took an instant liking for the color.

I went to my wardrobe, opened it and stood before the racks. I patted on the shirt like a teacher praising his favourite student in front of the class and poured scorn on all the grey shirts for not being as good as tomato red. I dint realise till then that I had so many fucking greys, what a pointless colour!

Well, that's one colour off my dont-even-think-about-wearing list, thanks to folks from work. Let me see what else is on the list.. ah... pink.. hmm...

So it goes...

On this day, back in the year 1922, was born a genius, a man who inspired millions by his humour, wit and humanism. There is no one better at presenting the human nature in such a simple and goofy way and yet leave us with a powerful urge to lead a kinder, gentler and wiser life.

Some of the gems that come to my mind when I think of him are

We are healthy only to the extent that our ideas are humane.

Take Care of the People, and God Almighty Will Take Care of Himself.

He also said..

I tell you, we are here on Earth to fart around, and don't let anybody tell you different.

.. and I agree. :D

Remember the man. Remember Kurt Vonnegut Jr.

The Trial

Read my first Kafka last weekend, The Trial, the story follows the trial of Josef K, the protagonist, who has absolutely no idea what his trial is about. The book is funny, the absurdity of being tried for a crime that is not specified throughout the course of the trial is, if not anything else, comical, but it had a nervy edge to it, it was like the funny you experience when you hear your boss crack a joke and are unsure if it was a joke or not and whether it would be alright to laugh out loud at it and so on.

Consider this, K is accused of a crime, the nature of which is not known to him and is impossible to glean from the courts, for the proceedings are conducted at whim, without his knowledge or his presence, and even if it were conducted in his presence, it would be near impossible to mount a defence without knowing what the hell he is accused of. He tries hiring a lawyer, who, it turns out, is only slightly better placed than him in learning the nature of case. Sure enough, he fires his lawyer and considers taking up the case himself. The whole affair is so terrifyingly ridiculous that one cant help doubting if it is nothing more than a fabrication of a deranged mind.

The book maintains its humor almost till the end where things take a rather bleak turn. The doorkeeper parable(an engaging read on the nature of law which can be read independent of the novel) serves as a prelude to darker things and sure enough, K meets his rather unexpected end.

Any mention of dystopia brings 1984 to mind and sure enough I ended up contrasting The Trial with 1984. While the latter deals with one man's fight against a known enemy, albeit an insurmountable one, the former portrays the helplessness of an individual against a soulless behemoth beyond comprehension, what good is resistance when you dont know what you are resisting. In 1984, for all the troubles Winston Smith undergoes, I most definitely expected him to end up dead(it could be said that he is dead in a manner of speaking) but K... everyting about the trial was so frivolous that I did not expect him to be put away, 'like a dog'.

On the whole wasnt really overawed, one reason could be that Kafka did not complete the book and it was only published postumously, the other could be that translation I picked up was average. Nevertheless it was a funny, dark and engaging read.

Not a teen anymore

Yes, I am no longer a teen, starting today. At heart I am, but for the records no longer.

One thing that i have observed with my birthdays is that, barring a very few close friends, its always my family that really remembers my birthday and treats it like the second coming. It amazes me that my folks, athai folks and peripa folks never ever forget it, despite my surly demeanor and detached attitude when we are together, surely I do not deserve such affection. Its high time I reciprocated.

I dont celebrate birthdays like most people do, but I do stop and look back at the year that has just gone by. It was a mixed year, had both highs and lows. I acted childishly at times, but that is what made the year fun, made new friends, lost them, hit the gym regularly, I started travelling, I have to say that it was a memorable year, but if someone offered me a chance to re-live it, my reply would be - meh.. no thanks.. do you have ice creams instead?

Generally I tend to be disappointed with such retrospection. At the beginning of each year, I set myself lofty goals but follow it up with little or no action and slowly sink into the mire of mediocrity. This year though, I am going to do things different(ok, i said that to myself last year too, and the one before and the.. ). This year I am going to act aloof, focus on doing the small things right, and slowly sneak up on the goals and crush them, muwhahahahaha. Yes, I am a lot more optimistic about the coming year that I usually am.

Anyway, heres me wishing for a great year ahead, a year where I hope to learn new things, do stuff I have never done before, read some fine books, dream big and hopefully end up wiser that what I am today. Cheers.

Adithya Hridayam

My mom has been pestering me for some time now to recite adithya hridayam, atleast every sunday if not every day, apparently the Sun God is in some favourable position in my horoscope and I would do well by being in his good books. Whenever my mom brings up this request I quote Rule CMViii, Section 45, Appendix C of Hindu Best Practices Guide, 2010 paperback edition, which states that one should recite slokas only after taking bath, promise her that I will do it soon as I take bath, avoid the issue by not bathing on sundays and act smug about it.

I should have stuck to this trick yesterday. When my mom bought up the topic again, I said 'Ok, here's a deal, liverpool have a game tonight, a real toughie, how about you ask your Sun God to help us win it and I will do what you say', silently assuring myself that no way was liverpool going to beat chelsea and this would put off the problem for some weeks atleast. My mom said that it is only fair if the better team wins and asked me if my team was better of the two. Now I wouldnt be making this deal if it were.. would I? Anyway, she sighed and said that if that is what would make me do what she says, so be it.

The game had a feisty start, ten minutes into the game Kuyt made a awesome pass to Torres who scored a great goal to put us ahead. Just before half time, Mereiles passed the ball to Torres on the left, who cut inside and scored a cracker of a goal. 2-0 up, me dancing. Second half, liverpool sat back and let the pressure build on themselves, the bald and beautiful Reina pulled off a couple of great saves keeping chelsea out of the game. By the end we could have had one more, but no real complains. Liverpool had won, and not just that, they were by far the better team on the pitch.

First thing I was asked this morning was about the result of the game. She dint need to remind me the deal, I am a man of my word, I will do what I promised, until I find some semantic loop hole and declare the deal void. Anyway, I guess the moral of the story here is 'dont bet against the gods, even when they dont exist'.

Filed under  //   gods   liverpool  

No...

...can be an extremely difficult word to say, especially when one is not in the habit of saying it, even more when there isnt a proper reason behind it, although one can come up with a retrospective justification for it.

I hate to say it.

About


metaweblog