Trust Google to come up with the best video ads. Always.
This’ll be my last post on this blog.
Alow me to explain. When I first jumped into blogging, I had a blog at Blogger.com. Then I moved up to WordPress.com, before I began self-hosting my own WordPress blog. I was always a big fan of WordPress. It was easy to use, and reasonably easy to tweak.
Now that I’m a proper Computer Science student per se, it striked me that WordPress is the exact opposite of efficient when it comes to their architecture. For every request, WordPress must run a copy of itself, parse tens of files, open connections to the database, run queries and when the page is rendered, shut itself down. This is a gigantic waste of resources.
So I’m just going to write my own blogging software. I’m starting from scratch and abandoning a lot of WordPress stuff that I’ve gotten used to in the process. No shortcodes, for example. Like HTACCESS files, they’re pretty convenient, but hell for performance.
It’ll all be open source. I’m thinking something like ASL or BSD. Yes, it’ll be GPL free.
The only thing I see is that it’ll be some time between when the new blog comes online and when the content from the old blog (this one) is imported in.
So long, WordPress!
The humble potato begins its life as a tuber. At one point of time, when they’re more or less done with their growing, they are harvested, put on a truck and shipped off to a factory operated by McDonalds.
The potato enters the cooking line through a washing chamber, where it is sprayed with high-pressure jets of water. This cleans off all the grime on the potato, and softens its jacket. Then the potato proceeds to a gigantic rotating drum whose blades are replaced every 20 minutes. The rotating drum peels the jacket off the potato, and the potato then drops into a conveyor belt.
The potato passes through a grid of fine blades, and ends up as long strips. These long strips enter a 3 stage oven where it is treated with water heated to 120 degrees Celsius before being fried and then frozen. The frozen fried strips of potato are then vacuum packed and shipped to various McD outlets worldwide.
At the outlet, when someone orders a pack of French Fries, the chef unpacks the strips of frozen fried potatos and fries them again in a basin of heated oil for exactly 45 seconds. These French Fries are then taken to a table and consumed.
The potatoes now pass through the oesophagus into the stomach and the intestines, where most of it is absorbed into the bloodstream. Some of it collects in the rectum. The next morning, the guy/girl who ate the potato goes and sits on the pot. The potato is then excreted out and travels through a network of pipes into a septic tank.
Anaerobic bacteria then convert the potato into methane and other substances, which are mostly used as fuel, or collected by the local waste disposal management to be used as fertilizer, possibly on a field where potatoes are being grown.
And the cycle repeats again.
I was at this stand-up comedy event at Kala Mandir yesterday evening. The event was called Make Chai, Not War. Pretty imaginative name, but like most of American English, grammatically incorrect.
People make a lot of things. They make dinner. They make food. The make babies. Yes, if people make love, it should logically follow that they make war too, except that they don’t. People wage war. They don’t “make” war.
And then there was the pronunciation.
“Make China War” “Make China War”
It took me a moment to realize that this “China War” was “Chai, Not War”. So at the meet and greet after the show, I told Rajiv Satyal that.
“Oh, that’s hilarious! No one’s ever told me that before. You are funny!” he said, dripping with sarcasm.
Of course that’s hilarious, you Amyearikhun SOB! You just khaant hear it!
Anyway, here’s a picture of me with the comics:

The 12311 Up Howrah Delhi Kalka Mail for 22nd December was 12 and a half hours late. Yes, 12 and a half hours. It thus left at 8:10 AM on December 23rd. It was thus at 6:30 PM that it reached Mughalsarai Jn.
The train stopped for almost 45 minutes at Mughalsarai. They attached a Pantry Car and removed a couple of coaches. That was plenty of time to see some “this happens only in India” antics. What was more, we didn’t even have to leave our seats.
We were booked on coach B2, an AC 3 Tier coach. We were on berths 1, 2 and 3, which is like one extreme end of the coach. About 30 minutes into the stop at Mughalsarai, we saw a beggar enter the coach from the other end, sitting on the floor and dragging himself from coupé to coupé.
Our coupé had a BSF administrator. Him and his friend was having dinner. When the beggar reached us and asked for alms, he said:
“Nahin denge. Hum logo ko bhi aise nahin milte paise, kich kaam na karke. Aap jao, chaye waye bana lo station pe.”
“We won’t give you any money. Even we don’t get money without doing anything. Why don’t you go and make tea at the station?” [People will buy that. On Indian trains, in a single journey, the average person will consume a week’s worth of tea.]
The guy kept whining. Finally, the BSF guy said:
“Mere paas change nahin hai.”
“I don’t have any small change”
The guy replied:
“Aap do na. Mere paas change hai”
“Give me whatever you have. I have change.”
Just to remind you, we’re talking about a beggar who’s dragging himself along the floor of the coach because he can’t walk.
Anyway, the BSF dude gave him a few coins.
Then the beggar calmly stood up, brushed himself, opened the door to the vestibule and walked straight out.
Sunday is suddenly my all-the-tuitions-in-the-world day. I have Physics at 7:30 AM, which thankfully is a short walk from home. So I get some fresh air and a forced morning walk. I suppose its healthy, but waking up so early leaves me burnt out throughout the day.
Next up is Chemistry. And its a Ballygunge. It takes me an hour to get to the place from home by bus. On the way home though, I take the train. Kolkata’s Commuter Trains aren’t as well used as the Mumbai ones are, but it still makes for a hell of an end to a day, especially the chilled air hitting your face with gale force as the train makes a very fast run between Ballygunge and Lake Gardens. And its winter, so its pitch dark when I return.
Here are a couple of photos I took a few weeks back:
[gallery link=”file” orderby=”rand”]
Was reading through O’Reilly’s Programming C# 4.0 6th Edition, and found this particularly hilarious example.
string raceStatus = args[3];
if (raceStatus == "YellowFlag")
{
Driver.TellNotToOvertake();
}
else if (raceStatus == "SafetyCar")
{
Driver.WarnAboutSafetyCar();
}
else if (raceStatus == "RedFlag")
{
if (ourDriverCausedIncident)
{
Factory.OrderNewCar();
Driver.ReducePay();
if (feelingGenerous)
{
Driver.Resuscitate();
}
}
else
{
Driver.CallBackToPit();
}
}
else
{
Driver.TellToDriveFaster();
}
The book has been awesome so far. The author seems to be a Jenson Button fan. Hehe!
When I bought my laptop back in March last year, I was shit excited about getting an ATI. I had an nVidia on my desktop, and Nouveau wasn’t able to handle 3D back then, while Radeon was. Goodbye proprietary drivers! AMD also had people actually working on the open source drivers, so I figured I was in for a good one. Damn, how I was wrong.
Two months into the laptop’s life, I realized I was getting random lockups while I was on battery. And my three-hour battery life was down to 40 minutes. WTF?
Switching to the proprietary drivers solved the problem. So I was back to square one. Proprietary drivers. Binary blobs. The whole deal.
Anyway, with nVidia, the binary blobs worked. Well, not just worked, worked extremely well. With ATI, the binary drivers didn’t even work. They were worse than the free ones. I was getting about 3 times the performance, no lockups and good power management, but no suspend-resume, no multi-monitor (I couldn’t attach a bigger display to my laptop, no. Not even a projector. The whole thing would just crash my system). What good is a laptop that I cannot suspend?
And then there was the breakage every two months. Two months after the latest FGLRX release, X.Org would put out a new version. It’d take FGLRX four months to support it. And then two months later, the whole fiasco would repeat. Again. So I could basically half-use my laptop for only 4 months a year. Brilliant! A machine becomes seasonal!
I’m now on Arch. Free drivers, yes. Gallium3D’s fixed the performance somewhat (I mean its 50fps against 150fps, but 50fps is still acceptable). I can suspend-resume, but I’m still on 30 minutes of battery, and I keep locking up, even while on power.
So, dear AMD, you better FUCKING GET YOUR SHIT TOGETHER. HOW IS IT THAT YOUR MAIN COMPETITOR CAN PUT OUT DRIVERS FOR X EVEN BEFORE X RELEASES ITS NEXT VERSION? WHY THE FUCK DO YOU MAKE SOMETHING THAT PLAIN DOESN’T WORK? WHY DO YOU MAKE US WASTE OUR MONEY AND TIME? IT JUST DOESN’T WORK! YOUR HARDWARE IS JUST A SHEET OF TOASTED SILICON WITH WEIRD DESIGNS ON IT. IT DOESN’T WORK. IT SPEAKS HEBREW, WHILE THE REST OF THE COMPUTER IS TRYING TO SPEAK ENGLISH. YOU FAGGOTS WHO WRITE THE DRIVERS ARE A DISGRACE TO HUMAN BEINGS. YOU DO NOT DESERVE TO BE CALLED ENGINEERS. YOU’RE JUST A BUNCH OF CLOWNS. FUCKFACE.
At least the FOSS driver guys are trying. They have something that works, and they have to make do with the microscopic amount of documentation that you guys make available. At least they’ve got way more skills than you overpaid geezers.
So apparently now I can blog from my ultra cheap Nokia 5233, thanks to the official WordPress for Nokia app available in the Ovi Store. It weighs in at a meagre 671KB, but needs a 8.14MB download of Qt, which is a bit of a drag on EDGE. The 5233 has neither WiFi nor 3G, so, well…
The app is reasonably usable. Even if you don’t make regular posts with it, it’s a nifty tool to approve/unapprove comments.
I believe it supports only a single blog. It’s open source, so maybe you could tinker with it. Amazing, innit, so much you can do nowadays while lying on your back.
Adios.
EDIT: This was my 50th blog post. Nice, I made it special without even knowing about that.
How does she manage to jump around like that, and still play it all so flawlessly?
The song’s “The Coast Of Galicia”, by the way.
That day, I was at a computer store, and a typical “Bangali babu” came in. He wanted a hard disk.
Typical Bengalis have a pronunciation that can kill Englishmen.
So this guy wanted a hard disk. The typical Bengali will pronounce an ‘sk’ as a ‘ks’, or an ‘x’. So this guy, who wanted a hard disk, asked the guy:
“Dada, hard disk ache?”
Which in English, is:
“Dude, do you have a hard disk?”
Except that when he said disk, he, like all Bengalis, pronounced the ‘sk’ as a ‘ks’.
So Disk became Diks.
Dicks.
And his question became:
“Dada, hard dicks ache?”
In English:
“Dude, you got hard dicks?”
It wouldn’t stop at that. Poor shopkeeper, he kept hard disks of varying capacities. So he replied,
“Koto boro chai?”
Which in English would loosely mean, “How big do you want?”
Now the word “boro”, in proper Bengali means big. In everyday Bengali, it also means long.
No wonder people don’t want floppy disks anymore.
I don’t get it.
This chick was on TV, ranting about some walk. “I was walking on the Red Carpet. It was so exciting.”
I walk at least 2 miles everyday. It isn’t even remotely exciting. But obviously, to this chick, walking for 10 metres on a red surface is so exciting she’s virtually orgasming.
On the bright side, chicks are easily satisfied. I mean, It’d take me a new supercomputer in my bedroom to get me as excited as this walking chick. Supercomputers cost a million dollars. You can walk for free.
So I’ve decided I’m gonna get excited at the most mundane things.
“OMG it was so exciting, brushing my teeth! It felt like I was cleansing my soul of all that plaque and tartar I’d accumulated!”
“I drank water. It was so pure! I felt like I was on seventh heaven!”
“Damn, pooping is so exciting. That yellow stuff…”
In between catching little snippets of my Physics book for the exam tomorrow (All basics - vectors and motion and shit) I’m to get some real work done on this OS thingy I’m trying to write.
First of all, the 600 page System Programmer’s Manuals from Intel and AMD are a real help. They’re also a real PITA to read on their own - I’ve continuously got to cross-reference between the Intel and the AMD ones to make sense of anything.
Here’s what I’m trying to do. I’m trying to get a 256TB virtual address space up in preparation for a jump to 64bit Long Mode. It’s pretty simple. You set up PAE-compatible 4-level page tables, set up the CR3 register with the pointer to the PML4 page table, enable PAE and Paging, and do a long jump into some 64bit code.
Eh? What the fuck is a PAE-compatible 4 level page table?
So I go ninja on my mouse, quickly move the cursor to the top-left corner of the screen to get a listing of all my open windows, open up the Intel Manual, and search for the whole paging structure thingy. It’s lucidly explained in a great table, and on the next page, in a big diagram. But wait, Intel has no instructions. Only the description.
Anyway, I got the page tables up in about 70 lines of C code (5 structure definitions). Before I realized something.
So here’s the deal. The page tables are 4-level. A PML4 table has 512 entries, each entry 64 bits long. Each entry maps a 512GB chunk of memory. That makes a total of 256TB. The PML4 itself is 2 kilobytes big.
Now every entry in the PML4 maps to a 512-entry PDPT. Each entry in the PDPT maps a 1GB chunk of memory. Again, the entire PDPT is 2 kilobytes long, but there must be 512 PDPTs, because each entry in the PML4 must refer to a PDPT. That makes 2*512KB, which is 1MB.
It doesn’t stop here. Every 1GB chunk of memory is further divided into 2MB chunks using the PDT. Same stuff - a 512-entry PDT is 2KB, but this time you must have 512 PDTs for every PDPT. You have 512 PDPTs, so you have 512*512 = 262144 PDTs. Every PDT is 2KB. This is 512MB.
But even this is not enough. You finally have the actual page tables, which maps the actual 4KB chunks of memory, or each page. Same deal - a 2KB Page Table for every entry in a PDT. 262144 PDTs make for 134217728 PTs. At 2KB each, that’s 262144 MB. 256GB.
Right. Total space spent to initialize a 256TB address space: 256GB + 512MB + 1MB + 2KB. Most desktop machines have no more than 2GB of RAM. I have 4, but even that won’t be able to fit in even the 1.5625% of the page tables.
No wonder Linux doesn’t use virtual memory.
Adios.