Friday, September 16, 2005

Eternity

The following is one of my favourite passages from the book "A Portrait Of The Artist As A Young Man" by James Joyce.

"-- Last and crowning torture of all the tortures of that awful place is the eternity of hell. Eternity! O, dread and dire word. Eternity! What mind of man can understand it? And remember, it is an eternity of pain. Even though the pains of hell were not so terrible as they are, yet they would become infinite, as they are destined to last for ever. But while they are everlasting they are at the same time, as you know, intolerably intense, unbearably extensive. To bear even the sting of an insect for all eternity would be a dreadful torment. What must it be, then, to bear the manifold tortures of hell for ever? For ever! For all eternity! Not for a year or for an age but for ever. Try to imagine the awful meaning of this. You have often seen the sand on the seashore. How fine are its tiny grains! And how many of those tiny little grains go to make up the small handful which a child grasps in its play. Now imagine a mountain of that sand, a million miles high, reaching from the earth to the farthest heavens, and a million miles broad, extending to remotest space, and a million miles in thickness; and imagine such an enormous mass of countless particles of sand multiplied as often as there are leaves in the forest, drops of water in the mighty ocean, feathers on birds, scales on fish, hairs on animals, atoms in the vast expanse of the air: and imagine that at the end of every million years a little bird came to that mountain and carried away in its beak a tiny grain of that sand. How many millions upon millions of centuries would pass before that bird had carried away even a square foot of that mountain, how many eons upon eons of ages before it had carried away all? Yet at the end of that immense stretch of time not even one instant of eternity could be said to have ended. At the end of all those billions and trillions of years eternity would have scarcely begun. And if that mountain rose again after it had been all carried away, and if the bird came again and carried it all away again grain by grain, and if it so rose and sank as many times as there are stars in the sky, atoms in the air, drops of water in the sea, leaves on the trees, feathers upon birds, scales upon fish, hairs upon animals, at the end of all those innumerable risings and sinkings of that immeasurably vast mountain not one single instant of eternity could be said to have ended; even then, at the end of such a period, after that eon of time the mere thought of which makes our very brain reel dizzily, eternity would scarcely have begun."

There's an online version of the entire book here.

Saturday, September 10, 2005

Memoirs

I stepped out the elevator into a dimly lit bar. It had been raining outside, raining hard and relentless. The night sky was littered with dark clouds - signs of impending doom. A dim silence swept the town, riding on the crest of fear; the fear of an unknown. The entropy of the future was weighing heavily on everyone’s minds. I waited for my pupils to get attuned to the darkness inside. My mind was a haze. Incidents of the past haunted me, more so in my dreams than when I’m awake. I stepped toward a vacant spot and ordered a martini, stirred not shaken. The waitress served me the drink, wearing a false smile. I returned the favor.
Miles Davis was playing on the radio – "Autumn Leaves" – my favorite song. The music was soothing, yet disturbing. I closed my eyes and took a swig of the martini. A sudden calmness descended upon me, a feeling of detachment, as though I’m not a part of this world; as though I was never meant to be. I felt like a woman in a gay bar. The rain still splattered on the roof. I shook my head violently before the nostalgia crept in, shaking it off. It was then that I realized my uneasiness in this place. An odd sensation – as though a pair of eyes was watching my every move, calculating the results and imposing a judgment on me – “The Last Judgment”. Michelangelo’s stunning accomplishment strained my weak imagination till it collapsed into a frenzy of eclectic seizures. I turned my head sideways, searching the faces around me, not knowing what I was looking for. A blind man in a dark alley told me once, “We see what we want to see, not the facts – but our perception of it. A dimly lit corridor is the same as a brightly lit hall”. I know not why this thought came to me now, just that it did. The faces in the bar were all faintly similar, yet each one different from the next; some distraught, others dull and bored, caught in a time they have no awareness of. The hands of the clock slowly crept toward midnight. The minute and hour hands reminded me of two star-crossed lovers chasing each other through the sands of time, reconciling intermittently and breaking up again. It goes on forever, no limits, and no boundaries.Time. The vastness of it reminds me of the inconsequentiality of what is happening. I wearily ordered another martini, the image of Ford Prefect sitting in another bar across the pages of a book, slipping into my mind.
It was then that I noticed her. A dame – with captivating eyes – pale blue. Her hair ran down the length of her back. As she flipped her weary eyelids and gave a forlorn glance down the hall, I realized she was waiting for someone. I found myself cursing the fool who had stood her up. It was sad, such beauty in such a time. She had a misgiven fortune, but at least she had one. Most of us go through our lives like an automaton, attaching no strings of empathy to anything that happens around us, going through life as if it were just another obstacle in our path, another bridge to cross or another bus to take to the office. Feelings of detachment and loneliness take center-stage in this play – the play of life enacted in the theatre of this benevolent Earth. I pulled myself up before I thought I’d drift away and searched her face for clues, clues to a distant past or a near-impossible future- clues that could give away her presence here in this place. I found none. She had an ash-stricken face, almost as if she just got out of cryopreservation. For the first time in my life, I felt sorry for a dame. I felt like I had known her all my life. Out the window, beads of icicles were forming across the edges. Suddenly, she uncrossed her legs and stood up. Her legs were achingly long. A faint smile began to form itself across her lips as she took her first step towards me. She never took a second one.
At that instant, a shrill sound pierced the air. The windows shattered, the glass hitting the floor and me. I staggered, but somehow found my footing and stood up. She was staring at me, those blue eyes like a bottomless pit. Machines with wings flew overhead. The entire town was encompassed with a cacophony of titillating frequencies. The end of time as known to mankind was fast approaching. The wailing siren of a cop car could still be heard in the distance over all the commotion that erupted in the streets below. The ground bellowed from under us, like a monster that showed no mercy, buildings shook and cracked at their edges. No one could have had a premonition of what was happening now. It had seemed an impossibility just a couple of months back; but the reality of it now, a harsh stink – like the stink of dark blood emanating from a badly beaten bum. Craning my neck towards the sky, I could make out faint lights – the lights of warships, encapsulating tonnes of fissile material, enough to blow the Earth ten times over. They all moved in perfect harmony with one another, creating silent music from their movement. I closed my eyes for the last time, and prayed - prayed for a different future, a different time. I prayed for her. I prayed so that I need not look at the inhumanities happening right in front of my eyes, heedless of any words, following a path that only some understand. I finally let the truth sink in.

The War. It had begun.

Thursday, August 18, 2005

The Missing

Just read in today's newspapers that neurologist VS Ramachandran was here in Bangalore yesterday. Apparently, he gave a talk sponsored by the Science and Spirituality research of India. I sure wish I'd heard of this sooner. I would've loved to hear his speech. Reminds me of the time when Peter Molyneux was in town and I missed him, as I only got to know of his visit, right after he'd left. Boy, all this is getting a bit too aggravating. Anyway, I still have "Phantoms in the Brain" on my to-read list. Hope to start on it sometime.

Monday, August 08, 2005

The Addict

Bang!!! Bang!!! Splash!!!Vroooom!!!!Splash!!!!Bang!!!! Bang!!!!
At last. After what seemed like an eternity of game-lessness, I finally satiated my negligent,tormented soul by fragging the living daylights out of hundreds of mercenaries in a tropical paradise in pursuit of a sexy female CIA operative. Before you begin to judge me as a psychotic or a maniac, let me just say that this is the theme of a game I've gotten addicted to over the weekend - "FarCry". Interestingly, I had earlier given up on even installing this game on my home computer as its requirements are a bit steep. But, as luck would have it (incidentally, me and Lady Luck don't actually see eye to eye) , I got a copy and thought....what have I got to lose??? Anyway, the game came through seamlessly on my paltry 32-bit PCI-E hungry system ( after a little bit of tweaking here and there) and, boy-oh-boy, it's painfully beautiful - water, surf, sand, foliage, birds, mutated primates, mercenaries, scientists, blood.....My eyes are wet, fingers sore, brain splintered, ears deaf, hair upright, thoughts splashed across every pixel on my monitor..........but I just can't stop myself from dragging my numb legs across the floor, faint halfway through, wake up, vomit incessantly, pull up the chair and finish what I've started-The redemption of mankind..........right now, the normal world looks like a far cry.

Friday, July 29, 2005

Wishcasting

Owning an iPod mini myself, I, like countless other ipodders out there, have a wish-list. These are the things I'd love to see in an iPod:
1. A color iPodMini
2. A video iPod (that atleast plays mpeg1)
3. Integrated FM Transmitter and Receiver
4. Blue-tooth for song transfers
5. A much larger display (something like Sony's new NW series mp3 players, which use "Organic Electroluminescence" display)
6. Different screen-color themes
7. Better battery life
8. Customizable exterior frames
9. Support for reading large e-books.
9. Song visualizations.
11. And,for heaven's sake, please give us a BLACK iPod.

Thursday, July 28, 2005

Uncanny Valley

It certainly made sense to me from the first time I came across it. I mean, "Uncanny Valley" atleast explained why I did'nt like the movies "Final Fantasy","The Polar Express" and partly "Bicentennial Man" and "Shrek 2"; though they were graphically astounding. Incidentally, Pixar too believes that such a theory exists. Speaking of anthropomorphism, I just can't resist myself from raving 'bout this Calvin and Hobbes' strip(one of my all-time favourites)-

Friday, July 22, 2005

Body Doubles

Caught "Freaky Friday" yesterday.Funny "feel good" movie that. Made me wonder ; If I had the oppurtunity to switch bodies with anyone,who will it be?

George Bush - On the eve of 9/11
William Murdoch - On April 14, 1912
Roger Federer - The dawn of a Wimbledon Finals match
Gabe Newell - When Half-life went gold
Paul Hewson (Bono) - When he wrote "One"
Albert Einstein - When he formulated the General TOR
The curator of the MET - When the "Tapestries of Unicorn" were removed from their walls
Neil Armstrong - When he landed on the moon
James Joyce - When he wrote "Finnegans Wake"
David Lynch - When he directed "Mulholland Drive"
The first guy who lays his hands on the "Optimus Keyboard"

Thursday, July 14, 2005

Terminal Locker

Well, I finally had some free time on my hands and thought it would be fruitful to invest it on some useful coding. I ended up writing this nifty little and outrageously simple "terminal lock" kinda utility for Linux. It doggedly does one thing and one thing alone. LOCK YOUR TERMINAL. Without further ado, here's the code:

#include "pwd.h"

#include "signal.h"
#include "sys/types.h"
#include "fcntl.h"
#include "unistd.h"
#include "ncurses.h"
#include "shadow.h"
#include "errno.h"
#include "stdio.h"

#define MAX_PWD_LEN 512

int main(int argc,char* argv[])
{
int pwdCorrect=0;
uid_t thisUserId;
char *encPwd,plainPwd[MAX_PWD_LEN],*thisUserName;
struct passwd* pEntry;
struct spwd* sEntry;
sigset_t allSIG;

sigfillset(&allSIG);
sigprocmask(SIG_BLOCK,&allSIG,NULL);

initscr();
cbreak();
noecho();
clearok(curscr,TRUE);

thisUserId=getuid();
pEntry=getpwuid(thisUserId);
if(!pEntry) goto bad_exit;
thisUserName=pEntry->pw_name;
sEntry=getspnam(thisUserName);
if(!sEntry) goto bad_exit;

while(!pwdCorrect)
{
getnstr(plainPwd,MAX_PWD_LEN);
encPwd=crypt(plainPwd,sEntry->sp_pwdp);
if(!encPwd) goto bad_exit;
if(!strcmp(encPwd,sEntry->sp_pwdp))
pwdCorrect=1;
move(0,0);
wrefresh(curscr);
}
good_exit:
endwin();
return 0;
bad_exit:
endwin();
perror("");
return errno;
}

The following steps require you to be root.
Compile it with -lncurses and -lcrypt.
Set the s bit on the executable with "chmod a+s a.out". This is because any other user must also be able to run this application.
Copy it under a suitable directory(which appears in $PATH) as tlock(or any other name that appeals to your whims and fancies ) and you're done.
Just run the program and watch that dumb terminal lock up.

Wednesday, July 06, 2005

Immortality

I often find myself asking the question "What's life without death?". Imagine yourself to be immortal, never having to face the end of the road, that ultimatum of Life ; when everything you've held dear in your fragile existence is whisked away from you in an untimely manner. "Light at the end of the tunnel!!!! Or is it darkness?". The "I" in you is lost. The egotistical being that man is, is mocked by nature, by God, by the supreme force that created Adam and Eve. "I" becomes "It", just like when you were born. There is nothing to be seen or heard, felt or spoken,your senses lost, consciousness forgotten, limbs motionless. Life comes full circle. Man or atleast the manifestation of his soul is reduced to pulp. Some believe that this soul of man is not lost even after death. It is somehow preserved, protected, safeguarded all throughout its journey from this Earth to the House Of God, where it awaits His decision. Other doctrines preach that the destiny of the soul is not determined by Him, but Us. We are the ones who choose the Gardens Of Heaven or the Labyrinths Of Hell. God has no part in this; He is just an observer- the lone audience of the Game Of Life. There are no rules, no boundaries. Just a beginning and an end. YOU ride the rollercoaster; you decide the track, but not how it ends. Every turn you take might be the last. It's like falling into a rabbit hole. You never know when the ground rushes up to meet you. But, what happens after we finish the game? Do we get to play again? Did we win? Did we lose? A tie perhaps? What would you ask God if you were given just one question? Man is just an object of a derived class ; a class publicly derived from God, who has one default constructor; one that applies to all of mankind. It is in our constructors that we inscribe how we sustain our object through the sands of time. There are feelings within us, thoughts & actions that are marked private, others public, and some others protected. Object interaction is seamless;integration effortless. We are the perfect object, the pinnacle of God's technology, His achievement. Yet, we somehow find ways to perform nasty operations, make illegal function calls, use NULL pointers and basically keep throwing exceptions for Him to handle. But the sad part of all this is, we do not get to write a destructor; a method to somehow clean up our acts, refurbish that tormented soul within us, to gain salvation,peace,nirvana. Maybe that's what we're trying to do through cryopreservation. Trying to live on borrowed time. But, maybe He had foreseen all this. Maybe, he just does'nt give us our object pointers. He only gives us his pointer, but typecasted to our object. So, when we're destroyed, our destructor never even gets called. His definition of us is succinct. Man will be created and is meant to be destroyed. Why be immortal? What would you achieve? You live to see your loved ones die, their final breath, their anguish and suffering at having to leave you, while you hopelessly hold their hands, making futile attempts to bring them back; back to the mouth of the tunnel. Or would you also go around insulting all the people of the world in alphabetical order, just so you have a mission, an objective, a goal to achieve in life?
No, immortality is more than a blessing, it's a curse.

Thursday, June 16, 2005

Build me one, Mr.Calatrava

One of the very few modern day architects that I know of and really admire their work is a spanish who goes by the name of Santiago Caltrava. His buildings are a work of art and illusion;true masterpieces. I am reminded of Howard Roark(The Fountainhead) every time I see one of Calatrava's buildings. His train station at Zurich and L’Hemisfèric at Valencia just take my breath away. Maybe Mr.Calatrava can leave his indelible mark on Bangalore sometime in the future.
Links:
Official Site
L’Hemisfèric -Valencia

A close encounter with "dc"

Warning:
"dc" DOES NOT stand for:
David Coulthard (F1 fans can stop reading)
Direct Current (electrical engineers, look no further)
District Council (sorry officer!!!)
da capo (dictionary please????)
Before Christ (You're blind dude!!! Get your eyes checked)

Computer engineers, step forward.
dc is a desktop calculator utility on Linux that uses the reverse-polish notation for its calculations. Honestly, I had not come across it until like a coupla days back, and I would've brushed it aside, were it not for the fact that what I saw critiqued my thinking abilities. Well, I bet it would ruffle up your thinking feathers too if you came across the following line:
echo "16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D68736142snlbxq" | dc.
The above line actually prints the string "Bash".Well,
not to be undeterred by this seemingly haphazard arrangement of characters, I started out on the noble mission of deciphering it. So, let's start from the left and work our way through it. Since we've piped the entire command to dc, it's as if dc read this from the stdin. First the basics of dc(assuming you know the reverse-polish notation):
1. Whatever number dc encounters, it pushes it onto its stack. The radix of the input is set by the command "i". When dc encounters this command, it pops the variable on top of the stack and sets it as the input radix.
2. Whenever it encounters an operator(+,-,*,/,%....) it pops the top 2 elements,performs the operation and pushes the result.
3. A macro is nothing but a collection of commands/numbers/operators within square braces"[]".
4. The command "q" quits from the current macro. If we are at the topmost level, it simply quits dc.
5. dc also has around 256 internal registers. The command "sx" pops the variable on top of the stack and stores it in the register x. Macros can also be stored onto registers or pushed onto the stack.
6. The command "lx" pushes the variable in register x onto the top of the stack. x is unchanged.
7. Command "x" pops the macro at the top of the stack and executes it. Hence, the command "lbx" executes the macro in register b. How? Well, it pushes the contents of b onto the stack and the "x" command pops it off executes it. Cool,nah?
8. "P" pops the variable from the top of stack and prints its ASCII equivalent.
9. The command "=z" pops the top 2 elements from the stack, compares them and if found equal, executes the macro in register "z".
Fine, now comes the interesting part of tearing apart this ubiquitous line:
echo "16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D68736142snlbxq" | dc.
First the input radix is set to hexa by the command 16i. We then store the command q in register a by "[q]sa". The next macro is a HUGE one. We'll tackle it later. Whatever was in that macro, we store it onto register b. After that, we push the number "A0D68736142" onto the stack, and then store it into register n through the following sequence : "A0D68736142sn". Finally, we execute the contents of register b(lbx) and then quit from the program.
Now, the magic is in the macro that we skipped earlier, which is actually recursive. Lemme print that here just for convenience:
[ln0=aln100%Pln100/snlbx]
First, the register contents of n are pushed onto the stack. If you remember, this is that huge hex number. It is then compared with 0 and if found equal, executes the macro in register a, which contains "q". Hence, this is the terminating condition of the recursion. After this, we again push the contents of reg n(since it was popped during the = operation) and the value 0x100 onto the stack. Now,the stack looks like this:
0x100 <- top
0xA0D68736142
We then find the remainder of "0xA0D68736142/0x100" and print its ASCII value. Finally, we find out the value of 0xA0D68736142/0x100 and store this into the register n. At last, we make the recursive call (tail-recursion) to the same macro through "lbx". But now, the register n contains 0xA0D68736142/0x100 instead of 0xA0D68736142. Thus, we repeat the same procedure until n contains 0, at which point we execute contents of reg a,which quits this macro.
So, how do we get "Bash"? Simple:
1. REG N=0xA0D68736142
0xA0D68736142%0x100=0x42=66=ASCII('B')

2. REG N=0xA0D68736142/0x100=0xA0D687361
0xA0D687361%0x100=0x61=97=ASCII('a')

3. REG N=0xA0D687361/0x100=0xA0D6873
0xA0D6873%0x100=0x73=115=ASCII('s')

4. REG N=0xA0D6873/0x100=0xA0D68
0xA0D68%0x100=0x68=104=ASCII('h')

5. REG N=0xA0D68/0x100=0xA0D
0xA0D%0x100=0xD=13=ASCII(Carriage Return)

6. REG N=0xA0D/0x100=0x10
0x10%0x100=0x10=16=ASCII(DLE) ( I don't know what this is. A flaw in the logic perhaps???)

7. REG N=0x10/0x100=0x0
QUIT.

Life or something like it

what I'm listening to: Do you feel loved-U2
the ringing in my head: Last thing-Diana Anaid
what I'm reading: The Agony and the Ecstacy-Irving Stone
what I'm not: The Da Vinci Code(don't intend to either)
what I'm writing: Computer code
what I'm not: A love letter
last movie I watched: Star Wars Episode III
last place I ate: Sweet Chariot
what I had: ummm, cheese garlic bread, vanilla cheese cake,
mint tea(if you can call it that!!!!)
what I'm thinking: Goa,Apple's move into x86,Ann Coulter,
Intelligent Design,lip syncing in computer games,
101 philosophical problems,the new Dockers ad,
Nokia N90,ipod,Star Wars....
what I wanted to write at the end of the post: this.

Wednesday, June 15, 2005

this is me then

I was recently watching this new sitcom "Stark Raving Mad" on Star World, when I realised one of the characters in it was the protagonist in an old TV show called "Doogie Howser". I used to watch that series every day after school (on either star plus or star world. Don't remember which one). That show really inspired my adolescent thoughts, I must admit. It's 'bout this child genius of 14 or 16 who is an M.D. and works in a hospital after school, treating maladies of all sorts and proportions. The end of each episode always signified the end of a hard day's work for young Doogie, where he sits in front of a computer logging his thoughts onto a "blue screen" ( the edit program in DOS????). Anyway, I always thought at that time that the first thing I was gonna do when I get a computer was to log all my thoughts like he did, which I obviously never even came close to. So, that's one of the lame excuses for starting this blog thingy. Ok, so about me: books; objectivism; nocturnal; bangalore; drizzle; enigma; ipod; google;john carmack; michelangelo; pieta; ps3; aquafina; black currant; subway; tea; isla nublar; david gray; depeche mode; dire straits; 21 grams; amores perros; linux; fight club; tracy chapman; bell labs; friends; bbc; middle earth; galadriel; paradoxes; computer gaming; pizza; leelee sobeiski(GOD, I hope I got that right); nicole kidman; keira knightley.... (yaaaaawn.... the list is endless). Mesa getting sleeeepy. Lemme log off by quoting this pleonasm I came across recently:
"...and so it was deja vu all over again".