Friday, March 24, 2006

Gamin' music

Any serious gamer (defined by one who plays most of the years best games) would have atleast one slot in their playlist dedicated to in-game music. Well, atleast I think so since I have quite a few slots dedicated in my mp3 database.

All games have intro music. But only a few games have that fabulous intro music that makes you want to leave your computer in the game's main menu screen with your speakers amped up. Right now, I can think of three games that did that to me: Hitman (Jesper Kyd's score), Age of Mythology ("A cat named mittens") and Civilization 4 ("Baba Yetu" by Christopher Tin).

Moving past the main menu screen, some games' in-game music that's supposed to reinforce the game's environment can do such a good job sometimes that you will want to take the experience to your desktop either by buying the sound track (costly AND redundant = Extravagant) or by ripping the sound track off of the game's sound files (resourceful :p). I have quite a collection of ripped game music with me. Here are some of the "most listened to" ones:

Civilization 4
Here are the top five higly rated tracks i listen to from this game:
  • "Baba yetu"
  • "Ancient soundtrack 2"
  • "El grillo"
  • "Ay Santa maria"
  • "The people are the heroes"

The first track, "Baba yetu", is like THE perfect song and made quite an impression the first time I heard it. It's an awesome intro song for an awesome game. The song itself is in Swahili (an African tongue) and features bold drums, a great voice and a soothing chorus. You wouldn't understand a word of it of course, but if you care to know, the song's supposed to be a famous christian prayer called "The Lord's Prayer" (weird that, in Tamil, 'Yesu' means 'Jesus'). For the lyrics, check this CivFanatics.com forum post. Don't let the religious nature of this song be a factor in keeping you from enjoy this song. I myself don't give a damn about the wordings or meaning of a song as long as the melody, rhythm and timbre are in harmony (say what?). I mean, I listen to hindi songs, german rap, romanian hits, french pop, etc in addition to those classical musical scores. And my german is not as great as my hindi or my romanian, which I am not familiar with. For that matter even english rap/hiphop isn't exactly legible to me sometimes. To me, there are no bad artists or bad genre or bad anything else, only bad songs.
Most of the other vocal numbers are by John Adams from 'Nixon in China'. There's quite a collection of classical music by Mozart, Bach, Beethoven, Brahms, Dvorak and the like. There are rather interesting songs/chants/opera as well. For music samples, check out this gamespy.com page for civ 4. Or, if you have the game or are planing to buy it, check the directory "<drive:>\Firaxis Games\Sid Meier's Civilization 4\Assets\Sounds/Soundtrack"
The sound tracks are in mp3 format for immediate listening without much ripping pleasure.


Age of Mythology
Here's my top five from this game:
  • "A cat named mittens" (Opening theme)
  • "Never mind the slacks and bashers"
  • "Adult swim"
  • "n. d. nile"
  • "Suture self"

This game has the most amazing original score among the other games that I've played. The music ranges from the intense intro music "A Cat Named Mittens" to the soothing "The Ballad of Ace Lebaron", and every shade tweeen. As you've noticed, all the tracks are named with creativity and light-heartedness. For example, "Suture self" when read would mean "Suit yourself". "n. d. nile" could mean "In the nile".
The sound track is, obviously, not meant as a stand alone album but as a background for the game's environment. This means that the tracks are not lengthy, average 2 minutes per track, and the album as a whole don't work together well.


Grand Theft Auto
The GTA series is all about in-game, or, more correctly, in-car radio stations. All of the songs are existing movie or hit songs, masterfully mixed and presented in the form of great radio stations along with great RJ voice acting. There's also one or two talk show stations per game with humourous content. There's been three GTA games out and my preference goes in this order:
-GTA III
-GTA Vice City
-GTA San Andreas

GTA 3's top of the spot for me would be Flashback FM featuring songs from the movie Scarface. I fell for the songs and then watched the movie Scarface (Al Pachino was great) which has become one of my all time favourites.
I forgot what my preferred radio station in GTA VC was, although I guess it was one of the talk shows. Truth is, I liked atmost a couple of songs in any given station.
GTA SA. AAh, GTA:SA. How can I ever forget K-Rose radio with RJ Mary-Beth Maybell. It was the in game radio that kick-started my passion for country and western music. Now I have quite a collection of country with me.


Need For Speed
Like GTA, Need for Speed also has in-car music, albeit not in a radio station format. And like GTA, NFS too is a series of games. Each NFS has a relatively small collection of both original and licensed hard hitting songs. I especially like the ones from NFS: underground, NFS: Underground 2, NFS: Hot pursuit 2 and NFS: Most Wanted. Here's the top 5 from each game:

NFS Underground
  • BT - Kimosabe
  • Eastside Boyz - Get Low
  • Nate Dogg - Keep it Coming
  • The Crystal Method - Born Too Slow
  • Fuel - Quarter

NFS Underground 2
  • Paul Van Dyk - Nothing But You (Cirrus Remix)
  • Chingy - I Do
  • Snoop Dogg feat. The Doors - Riders on the Storm (Fredwreck Remix)
  • Capone - I Need Speed
  • Rise Against - Give it All

NFS Hot Pursuit
  • Hot Action Cop - Fever for the Flava
  • The Buzzhorn - Ordinary
  • Uncle Kracker - Keep it Coming
  • Hot Action Cop - Going Down on It
  • Bush - The People that We Love

NFS Most Wanted
  • Styles of Beyond - Nine Thou (Superstars Remix)
  • Hush - Fired Up
  • Juvenile - Sets Go Up
  • Suni Clay - In A Hood Near You
  • The Perceptionists - Let's Move


Hitman
That leaves me with Hitman. The words "Hitman" and "music" would immediately spark the name Jesper Kyd in the minds of fans of this great game. JK has done many great scores for many other games as well. Check out his site, www.jesperkyd.com/, for some mind-bending samples. All of his music are totally cool and totally eligible for an intro music for totally any game.

Wednesday, March 15, 2006

Internet Boob Tubes

TV, Watch 300+ LIVE world TV stations for FREE
Besides visiting a country, one can learn a lot about the country's people via their TV programs as you get to see them, their habitat and also get to know their expectations via the programs produced to allure them. Back when 64kbps was broadband (I had 128kbps), someone from a forum directed me to a nice little program called TV.exe. The site, tv.exe.com, promised 100s of free online TV channels from around the world.

The app itself is a small, stand-alone exe, about 1 MB in size, that runs with no registry or documents or folder traces. But I was leery of downloading the program because, A, it was an exe, and B, it was from a cheesy looking site with flash and Ads (though my Adblock hid them). I don't have any active anti-spyware or an anti-virus as those goes against my active policy of increasing performance (which, by the way, is always won by Windows and ends up in me having to reformat/reinstall) and a whole slew of incomaptiblity problems among anti-whatevers and other applications. Besides, they are superfluous once you pay attention to what gets into your machine. Nonetheless, I get my monthly fix of anti-virus online at trendmicro and an occasional anti-spyware fix from AD-Aware. But since it had been "peer reviewed" by a forumer (and by softpedia.com, as pointed out by the homepage), I went on and downloaded it. The link with the most google PR has the freeware version. There's also a one-time paid version of the program that offers radio channels and, conspicously, webcam feeds. But with 128kbps advertised speed and 110kbps actual speed, most of the interesting sounding channels looked like a powerpoint presentation with audio. Though the range of stations available was nonetheless staggering, I preferred to use my puny bandwidth to download downloadable videos than to let it get insulted by trying to stream videos.

Now, though not much can be said about the Indian broadband situation, the bandwidth has doubled to 256kbps for the same cost. There's even this "double bandwidth at night" scheme where I get 512 kbps (actual speed 416 kbps. Pathetic.) from 10:50 PM to 8:10 AM (untimely timings eh?). In this setting, a few days back I stumbled upon this tv.exe in my software backup partition (aptly named "Store" [66GB]. The other partitions are OS [15GB], Runnables [134GB], Media [80GB] and Linux[the rest]. Yeah, you don't care).

The list of channels is retrieved from the tvexe.com server everytime the program is started so that new channels are found and at the same time dead channels are pruned. The prog doesn't have the best UI ever and features a fixed size media player window. Though the you can list stations by country, language or theme, all that the app does though, is contact the tvexe.com and list the tv stations already available on the net. You can google for Internet broadcast TV or something similar and reach all the channels directly via a browser. Though it's a bit tedious at first to google-find the channels, if you bookmark the ones you want then subsequent access will be one-click access. You may even write your own program to either periodically google and parse out movie file links for you, or a more simpler program which maintains a manually entered list of channels and a embedded player. This will take out unscrutinized third party exes from your life.

Anyways, so far I've been able only to watch some of the channels and only at night when its 512kbps on th pipe. I haven't seen all the channels from around the countries yet, and I don't intend to. Almost 90% of them are religious propaganda bullshit. There are only a handfull of great learning channels and music video channels, almost no smut or soap channels AFAIK, and quite a few home shopping channels, news channels, traffic cam feeds, senatorial meeting videos, etc. And most of channels are from the US. The following english channels (from the US) are in my favourites playlist: NASA TV, Strawberry TV, Research Channel and UW TV (University of Washington TV). Here's a small review of my experience in these channels:

  • In NASA TV, I got to see a never-before-seen (by me) footage of a launch and of the last moon-walk.There was also an in-depth program on auroras, which was as much interesting as it was useless to me.
  • On Strawberry TV (I know), I had an arm-chair-travel to Natchitoches, Louisiana with a native tour-guide giving commentries on the various building and landmarks as we cruised the streets of the state. Another place was Natchez, Mississippi, though it wasn't as interesting as the Louisiana one. I've never quite gotten round to read who the so-called Confederates were all about, so it was nice when there was a short interview with American civil war researchers was on.
  • On Research channel, I saw a meeting of podcast gurus talking about, well, podcasts. There was also a face-to-face with a wearable computer manufacturer (I believe). But most of the time there was only biology related talk.
  • UWTV is my favourite so far. There were quite a few professional presentations on various tech topics. One was User Interface for the future Information Worker by a Microsoft research lady, and another was on Security framework in Applications (IIRC) by Microsoft's Cheif Security Strategist.

As you can see, I was excited with what I saw on the channels. It was a welcome change considering I had stopped watching TV since the stupid cable situation started and I lost all the quality channels. Sure I watch the TV programs I miss, movies and other videos via BT, but that's another story :)

If my rants have lured you into downloading the exe, I would recommend you search for other programs. I found one other program that was waay better than tv.exe. It's called Online TV Player and it's supposed to have 850+ channels and 1000+ radio channels by default, although I suspect they count the high and low bandwidth stream of the same channel as two channels. Well atleast this program HAS the high and low bandwidth options of the same channel unlike the tv.exe thing, so I guess it works out OK. And, BTW, if you are wondering about the title, Boob Tube = Goggle Box = TV ;)

Thursday, March 09, 2006

How hard could it be?

Imagine that you have a 18px wide by 1px high tileable gradient png/gif. You also have a horizontally centered div holding your content. You want to tile the 1px high image along the vertical length on both sides of your div. I found myself in exactly such a situation only a few days ago. I could've used a large tile, say like a 6000 px by 1 px image and tiled it in the body's background, like how gamespot.com did it. But, my gradient is double-edged. Meaning, the 18px gradient goes from completely non-transparent around middle to 100% transparent in the left and the right ends. This is done so that I can overlap one part of the gradient over the content while the other part hangs outside the content. The final effect is shown farther below. Come back up after you've seen it.

For those who didn't get the few words above, here's a thousand words of the same:
The 'double-edged' gradient, enlarged.

The image is scaled 1000 times proportionally. So if you want to use them, just scale them down and use it. The center is around 10px. This is the left-side shadow. For the right side one, just flip it horizontally. You then need to find a way to tile the image vertically along and over both sides of your content. For this, I used floated divs. It had to be a div as I had swore to keep tables out of my XHTML life. So, I added two floated divs with IDs "shadow-left" and "shadow-right". Here are the HTML structure and the css:


<body>
<div id="main">
<div id="shadow-left"></div>
<div id="header1"></div>
<div id="menu"></div>
<div id="content">
<hr id="footer" />
<div id="shadow-right"></div>
<hr class="clear" />
</div>
</body>
The HTML structure



#shadow-left {
margin: 0 auto 0 -9px;
position:absolute;
min-height:100%;
height:100%;
left:5%;
top:0px;
width:18px;
background:url(shadow-left.png) repeat-y;
}


#shadow-right {
margin: 0 -9px 0 auto;
position:absolute;
height:100%;
min-height:100%;
right:5%;
top:0px;
width:18px;
background:url(shadow-right.png) repeat-y;
}

/* \*/

* html #shadow-left {
display: none;
}

* html #shadow-right {
display: none;
}

/* */

My sloppy CSS



You might've noticed from the last few lines that I had decided to hide the neat transparent gradient thing from Internet Explorer. This is because among the web image formats, only in png can a pixel have a 24bit color value as well as an 8bit alpha value. Gif do support alpha value, but in gif a pixel is either 100% transparent or not. This is not the only place I had to account for IE's ignorance. IE has to be constantly kept from it's own ignorance, missing features, incomplete standards conformance, buggy implementation and other asprin-sellers. If ever I get hold of the neck of the person responsible for CSS implementation in IE 5 (or 5.5, 6.0, 5.5 for mac), I won't hesitate to close my hand. CSS is a very easy and neat language to learn and code. But IE takes all the fun and intuitiveness out of it. How hard could it be to read the CSS specification and implement it? That's such a monky job, or a no-brainer. Suddenly, though I never liked them, all those 'Promote Firefox' and 'Promote Opera' campaigns seem to make sense from a developer perspective. Of course, all browser implementations have bugs. Richinstyle.com lists all bugs. But I don't care as long as I don't notice them.

Switching to the thousand words mode, here's a lame website with no gradients attached:
A lame page with no gradients

...and here's the same lame page with glitzy gradients attached:
The lame page with extra fancy gradients

So, the above CSS + XHTML combination will work as promised and you get a gradient the height of the page. Or do you? What you get is a gradient that extends only to the height of the viewport/browser window. Meaning, if your page has a vertical scrollbar, then scrolling down will reveal that the newly uncovered portion was not covered by the gradient. What trick is this? Actually, it seems that it is the specification.

While searching around, I found that if you set the heights of all the parent elements (here, they are #main, #body, #html), then your gradient will have a hight equal to the height of the entire page. It didn't work for me and worse, making #main's "height:100%" messed up the already messed up display in IE still more. So I went into hack mode and used javascript to do a little trick. Here's the simple javascript I conjured up:


<script type="text/javascript">
<!--
function doOnScroll()
{
document.getElementById('shadow-right').style.top = window.scrollY + "px";
document.getElementById('shadow-left').style.top = window.scrollY + "px";
}

window.onscroll = doOnScroll;
//-->
</script>
The javascript hack



Javascript allows you to hook onto the onscroll event. This is the event that happens everytime you scroll down/up/left/right. So I just shift the gradient div's 'top' value to the scrolled value of the window. This trick, of course, requires your visitor to have javascript enabled and have Mozilla Firefox. There will be a very small and, hopefully, unobstrusive flicker near the divs as the divs gets realigned. I myself want to use some other trick for my site as, as google analytics points out, more than 78% of the visitors browse my site on IE. I remeber those <table> times when webpages had the "Viewed best in IE" in their footers. With the <div> times, the tables (pardon the pun) might've been turned.

[Edit]
Here's a spot of trouble I ran into. Though I was smart enough to hide the translucent gradient flanges from IE, I forgot to turn off the javascript that moved the gradients as the user scrolled the webpage. It is necessary to hide the javascript too from Internet Explorer as otherwise a script error occurs for every tick the scroll bar scrolls, which is pretty lame. So here's the same javascript hack as above, but only nicely wrapped inside a IE proofed if block:


<script type="text/javascript">
<!--
if (navigator.userAgent.toLowerCase().indexOf('msie') == -1)
{
function doOnScroll()
{
document.getElementById('shadow-right').style.top = window.scrollY + "px";
document.getElementById('shadow-left').style.top = window.scrollY + "px";
}

window.onscroll = doOnScroll;
}
//-->
</script>
The javascript hack



What I had done is pretty simple. Every browser has a userAgent property that contains everything that the browser has to say for itself, including it's version, name, operating system and maybe a few other stuff. I just check for the occurence of the string 'msie' in the userAgent property of the browser being rendered on, and if there be no such vile term in the user agent name, we get on with the trick show.
[/Edit]

Friday, February 10, 2006

How cool am I?

Thirty six sea plus sixteen eff plus eleven hech plus fourteen pee plus fifteen yae, the whole divided by four point four. That's precisely how cool I am, it seems.

This is not exactly news (and this blog isn't about news), but a few experts at the London Institute of Psychiatry is of the collective opinion that your popularity can be estimated numerically by knowing how your peers rate a few of your traits. I am a big fan of "The Naked scientists", the humor filled science podcast from BBC, to which I highly recommend you subscribe to. In one of the episodes, they mentioned this formula in a telephonic quiz.


(32C + 16F + 11H + 14P + 15A)
-----------------------------
4.4


where,
C is Contact with friends,
F is Facilitating entertainment (the F factor?),
H is Humour,
P is Personality and
A is Attractiveness

Each of the factors are to be rated on a scale of 0 to 5, with 0 being 'Aaarrgh!' and 5 being 'ooohhh!'. Substitute the values in the formula to get your popularity rating on a scale from 0 to 100. No cheating.

Here's a tiny calculator that I coded for you to easily calculate your popularity once you have the values for the individual factors from your friends:



C =

F =

H =

P =

A =




The formula must've been derived off the inference from some statistical study data. As can be deduced from the formula, the highest weightage is given to 'Contact with friends' while Humour is given the least. Also, Attractiveness is given more weightage than Humour and Personality.

So, according to the formula, that handsome and funny guy with a friend list spreading across juniors to seniors, throwing a party at any excuse of an occasion he could find is the most popular, while that geek with his small band of geek friends, sharing jargon jokes that no non-geek would find funny, would rather have another frag session than go to a party, with the groovy einstein hair-style and a hyperactive sebacious gland, is the least popular guy. So the formula does hold water.

Ignoring the extremes, we can also infer from the formula that that guy who has all the lame jokes to tell a large involuntary friends base is more popular than that guy who is genuinely funny but with a lesser friend base.


It would be interesting to see the popularity rating of a population over the last few years. With the proliferation of mobile phones, email, IM, smart phones, blogging and skype-like networks the C factor would've shot up the roof.

The result may also depend on the age group of the friend circle we are talking of. Some thoughts on age as a factor:
*Do the youth have more time for actually keeping in touch with the huge friend base, or do the old and the retired do?
*Who is more funny does depend on age, but it doesn't have enough weightage in the formula.
*Personality? I do believe that older people tend to rate each other highly in this category.
*Facilitating entertainment is more of young people thing, I would expect.
*Attractiveness? Surely it is inversely proportional with age (after middle age).

So, send an email/IM asking a few of your friends to rate you on the above mentioned factors, come to this page, calculate your rating for each friend and finally average the ratings to get your final Popularity rating. Send them your rating of them as well so that you can compare it with your friends' ratings. If his is lower, you can use it poke fun of his being more of a geek.

I asked around a few of my friends and came up with a rating of 78. If you would like to have a better score than your friends, then you know what to do: rate him lower :)

Monday, January 16, 2006

Pop goes the cell

Not being a biology student, I've always only wondered what 'death' was, among other biologyie things. When I was younger, some films show some kind of white plasma flying towards the sky, leaving the lifeless body to symbolize death. The Max Excel fellow also believes in some gas called "praana-vaayu" (which he denied was oxygen) that keeps a man alive and is lost when he is dead. How this gas decides when the cells are appropriately damaged to depart, I never gotten round to ask. I must've also asked how they explained away organ-death, or, more fundamentally, cell-death. These deaths don't require the individual as a whole to die. Or, more interestingly, how do they fit in organ-transplantation which works because an organ doesn't die, while the individual dies. They probably would've come up with a multi-celled soul perhaps. But AFAIK, almost all religious people believe some kind of soul/plasma as the 'essence' of life. And that's the religious description of death, while what I am interested is in the scientific one.

So, when is a person dead?
Death, atleast biologically speaking, is a process rather than an event. But it's this irreversiblity (point-of-no-return) which is commonly referred to when one speaks of death. This point keeps getting closer to total death as technology progresses and our biological knowledge grows. This has led to many trials as to when a person is dead, legally. Of course, when you see someone with their entrails and grey matter spilling out onto the pavement, or decapitaed, or incinerated, they are properly dead. What we are interested, rather, is in determining this rubicon. Like someone said,
"Death is certain, since it is inevitable, but also uncertain, since its diagnosis is sometimes fallible"
(Note that I am not interested in the religious or legal death of a person, but the medical death.)

Is he dead when his lungs stop breathing? No. Mouth-to-mouth resuscitation can sometimes start the process. And iron-lungs can replace its work. Infact, a person may stop breathing for a few seconds several times during sleep. The extreme case, called sleep apnea, can be fatal.
Is he dead when his heart stops beating? No, not always. Remember "stand clear!" when someone uses the defibrillator and CPR in med-fictions? IOW, heart can be rebooted and even kept running afterwards with a pacemaker. Artificial hearts can also completely replace the heart.
Is he dead when both his lungs AND heart decide to stop? No, since the brain may be living and the body can be kept living in a life-support system for as long as anyone pays for it. Of course, if the episode was caused by brain death, then this argument is moot.
Is he dead when his cerebral cortex is dead? Not necessarily, but the individual as we know him is dead, because the cerebral cortex is the seat of thinking, personality, memory and the like. But we still have a living human being. Even sleep and coma can make this part of the brain appear dormant, though it's not the same as being dead and can be distinguished using an EEG.
Is he dead when his brain stem is dead? Yes (finally!). When this part is dead, the whole of the brain is dead. Note that, his other cells may still be alive. But even here, the cessation of brain activity must be for a period of time for it to be certain. When this death is not used as the ultimate indicator of death, you see people who decide to "rise from the grave" or "doing a jesus". Infact, beheaded chickens and other fowls may sometimes cluck around forever (if fed properly intravenously) as if nothing has happenned, because their brain stems are located a bit below the head. But of course, they lose their chickenness and survive on reflex alone. This suggests that there are two degrees of "alivedness" to a "brained" organism: one of the memory, and the other of the fundamental control functions.


Since B-grade movies has taught us that people can be killed in more than one way, I think it would be safe to assume that animal death can fundamentally be defined to be the death of whole of its brain. The cascade of cell deaths that preceded brain death and the cascade of cell death that follows brain death are not counted as death. The actual sequence of events that makes a person dead (of natural causes, of course) is a bit too biochemical for me to follow.

Then there's another debated topic of "natural death". What exactly causes "natural expiration"? I read what telomerase is and how it's repeated shortenening when cloning/cell-division can put a limit to the count of an individual's life. But apparently it's not the only answer. But I am sticking to the life-support functions (heart, lungs, etc) stopping to enrich the brain with food.

While going bored over searching for natural death, I came across a type of Cell Death called 'Apoptosis', from which the topic for this post is derived (Apoptosis. Get it?).

Cell death:
From what I gather, there are two ways a cell may die: Necrosis, where the cell may die of starvation, physical damage, chemical poisoning, etc, and PCD, where the cell suicides if it feels 'unwanted" (cell depression?). Apoptosis is one of the main type of PCD.

A cell becomes "unwanted" when new cells are ready to take it's place, or if it becomes damaged beyond repair by toxins or pathogens, or if it's apoptosis code in it's DNA is triggered by damage, virii, xrays, etc. And, as the name implies, each cell is embedded with the suicide sequence which can be initiated by one of the contributing factors mentioned above.

Contrary to what I thought, apoptosis occurs normally quite abundantly in a normal human adult. Homeostasis, a greek for the balance between old cells and newly produced cells, is an active balance that needs apoptosis to work. Infact, over 50 to 70 billion cells are produced each day and the same amount of cell has to die each day to compensate. If not, a cancerous tumour results. OTOH, if more cells die, I don't have a greek word for it, but it is obviously something bad. Infact, one of the ways in which HIV succeeds is by apoptosis of immuno cells. With so many cells getting replaced, the human body rotates an equivalent of it's own body weight in one year, it seems. Apart from homeostasis, the other important function of apoptosis is in differentiation of individual fingers in a developing foetus. Apoptosis is your friend. [link]


Whence such a morbid topic? I was going through the straightdope archives and found an article on being scared to death. Quite a few persons have been scared to death or willed to death. This got me scrambling for the basics on death. But the article itself provides most of the answers, which I noted only a bit later in my this research. Searching a bit late, I found this very interesting biology class discussion on death. Reading it makes me wish I had put more effort in securing an MS admission in an US university. Oh well, I have but little chance now.

Thursday, January 05, 2006

XCIDR 2

This is basically a revision of XCIDR which I elaborated in my previous post. To reiterate, XCIDR is my uncertain brainstorm which aims to increase the IPv4 address space without resorting to IPv6 or it's required 'flag day' shifting of current IPv4 devices/applications.

To quickly recap, XCIDR relied on my observation of the first two bits of the subnet mask being unused. These two bits are encoded with IP address information to increment the address space by two or four depending on whether one of the bits is to be used as a subnet mask bit for the other one.

There's one more thing about the IP v4 subnet mask field: unlike the BCD encoding as in the address part, the subnet mask bits are pure binary (or whatever it is called). That is, to represent a number, say 13, in BCD you write it as '1101', while in pure binary it is writen as '1111111111111', or thirteen ones.

How did this come about, and why is it still being used? For this, we need to remember that the subnet mask is only the number of contiguous 1s to be ANDed with IP address for finding the longest-prefix-match. Sometimes ago when CIDR was just on the brains of it's creator, non-contiguous bit-masks were used as subnet masks. This scheme can split the network at more than one place. This requires a bit-mask instead of the BCD encoding.

But why non-contiguous subnet masks were introduced, nobody knew. But it was causing a lot of 'splitting'-headaches among the network admins. So it was advised against, but not made illegal, since it is perfectly compliant with the subnetting scheme. Which, in-turn meant that the 32 bit bitmask format stays. Later on, it was so hard, and hence unpopular, to have a non-contiguous subnetted network that routers stopped supporting it. Now, with CIDR and it's slash-notation, non-contiguous subnet masks are just plain illegal [link].

Which, as you might surmise, draws a case against the 32 bit subnet bitmask in present machines, and toward a 5-bit BCD encoded subnet mask. IPv6 makes this the standard. But IPv4 doesn't, as it would break all the current routers. True, but following the spirit of XCIDR, we might change the router and end-node logic without changing the IP, IGP/BGP/etc packet structure to acheive an increase in the size of IPv4 address space. I call this version of XCIDR as XCIDR2. It aims to increase the IPv4 address space from 232 to 258 !

Here's how:
A subnet mask has 32 bits. Only the count of the number of 1s is needed off the subnet bitmask. The maximum number of 1s that can be in a 32bit field is 32. Representing it in BCD will require log232, or 5 bits. Now we are free to do anything with the remaining 32-5 = 27 bits.

If we are to allot some of the 27 bits to the IP address bits, then we need to allot extra subnet bits to the subnet mask to act as subnet mask bits for the new address bits. How to split the subnet mask bits now? With 5 bits the subnet mask can be used with a 32bit address field. Increasing the bit count by one will make the subnet mask 6 bits long. A 6 bit subnet mask in BCD can represent 26=64 contiguous 1s (ones). This is more than enough, for when you add the remaining bits (27-1=26 bits) to the IP address, you get 32+26 = 58 bits.

So, finally what we have is an Ipv4 scheme with a 58 bit IP address, which can support about 288,230,376,151,711,744 hosts (288 quintillion). It's not much compared to an IPv6 address space, but can take care of any address space shortage before the IPv6 flag day, which by the way is not expected before the year 2025.

[Just for the 'ooh' factor: Ipv6, with its 128 bits, has been described thusly: If the earth were made entirely out of 1 cubic millimeter grains of sand, then you could give a unique address to each grain in 300 million planets the size of the earth.]

As in XCIDR, the IP address field and subnet mask field remains the same. This means that packet structures and routing tables need not be modified. Only the packet handling logic needs to be changed, both in the router and the end-nodes. The exact changes to the logic will be as in my XCIDR blog post. The only place it deviates from the plan is at the router.

As in XCIDR, we have an issue which can have many solutions. Then, it was the choice of XX and XY implementation. Now, it is the issue of choosing the division of the 26 extra address bits. The problem is obvious and straightforward: 8 is not a divisor of 26. This means that the highest octet in the address will not have 8 bits in them when you split it into 8 bit portions. 2 bits remain (26/8 = 3.25). In other words, the address will look something like this:
11.1111 1111.1111 1111. 1111 1111.1111 1111.1111 1111.1111 1111....

This question arises only because we are accustomed to such addreses which was introduced in a classful addressing system. With CIDR and VLSM, it makes no sense. Right? But we still 've got the human factor: Dealing with arithmetic involving upto 255 (28) is better than dealing with arithmetic involving numbers upto 67,108,864 (226). So, I am gonna go with a partitioned space rather than an unpartitioned 26 bits. But how many bit partition will be the optimal? '13/13', or '2/8/8/8', or maybe a '10/16' scheme? I'll leave that discussion for later. For now, '2/8/8/8' bit scheme seems good and standard to me.

A router, will have to store an address of the form 4.255.255.255.255.255.255.255 in order to address an XCIDR2 network. This can be accomplished by storing the bolded part, as explained, in the subnet mask bits. When the router encounters an IP packet addressed to such a host, it simply concatenates the 26bits from the subnet mask and the 32 bit IP address in memory and runs the longest-prefix algorithm of CIDR just like always.

To address the issue of carrying the extra 26 bits in a standard IPv4 packet, I'll stick to the trick used in XCIDR of using the Options field in the IP packet. The reserved option mode ('11') can be used for this purpose. The only precaution a end-node/router will have to take is to ensure that the router it is sending the packet needs to be XCIDR compliant.

For all it's promise, XCIDR and XCIDR2 are far from realization because of the same problems plaguing IPv6: Less demand and cost of migration. And of course, the fact that this is a 'hack' at best is enough to turn heads...in the opposite direction :) But I am still keeping my fingers crossed for a chance at an RFC.