The Inferno



The Inferno :: It is a fallacy to state that something exists just because it can’t be proven that it doesn’t
Archive for February, 2010
2/21/10
12:01 am
The General

Yilan smiled and watched the cities in the smoke, and the passing shapes of friends. Enkindu, Patroclus, Hephestion, and Antony and a thousand others. “Patroclus,” he called him. “And Lancelot. And Roland. O my friend…do you see, do you yet see? Sometimes we meet so late…you’re always with me, but so often born late, my great, good friend. Most of my life I knew I was missing something, and then I found you, and Gunesh, and I was whole. Then it could begin. I didn’t know in those years what I was waiting for, but I knew it when it came, and now I know why.”

Shimshek’s eyes lifted to his, spilling tears and dreams, dark as night his eyes were now, but they had been green and blue and gray and brown, narrow and wide, and all shades between. “I don’t know what you’re talking about.”

“Yes. Now I think you do. Cities more than this one…, And Gunesh… she’s always there…through all the ages.”

“You”re like my father, Yilan Baba; more father than my own. Tell me what to believe and I believe it.”

He shook his head. “You’ve only known me longer; give your father his honor. There was not always such a gap of years, sometimes we were brothers.”

“In other lives, Baba? Is that what you mean?”

“There was a city named Dur-sharrunkin; I was Sargon; I was Menes, by a river called Nile; I was Hammurabi; and you were always there; I was Gilgamesh; we watched the birth of cities, my friend, the first stone piled on stone in this world.”

Shimshek shivered, and looked into his eyes. “Achilles,” he murmured. “You had that name once. Did you not?”

“And Cyrus the Persian; and Alexander. You were Hephestion, and I lost you first that round – ah that hurt – and the generals murdered me then, not wanting to go on. How I needed you.”

“O God,” Shimshek wept.

Yilan reached out and caught Shimshek’s strong young arm. “I was Hannibal, hear me? And you Hasdrubal my brother; Caesar, and you Antony; I was Germanicus  and Arthur and Attila; Charlemagne and William; Saladin and Genghis. I fight; I fight the world’s wars, and this one is finished as far as it must go, do you hear me, my son, my brother, my friend? Am I not always the same? Do I ever hold long what I win?”

“Yilan Baba -”

“Do I ever truly win? Or lose? Only you and Gunesh…Roxane and Cleopatra; Guenevere and Helen…as many shapes as mine and yours; and always you love her.”

Terror was in Shimshek’s eyes, and grief.

It’s from The General by C. J. Cherryh. A good story, and there are better ones in the compendium of short sci-fi stories by the author. Pick it up and read it for a good sense of a sweeping scale, an inkling of man’s infinitesimal presence in the epic transformation of ages.

2/20/10
4:32 pm
Direct Upload to FTP

Many’s the time I’ve surfed the vast wonders of the cybernetic ocean and wondered, “Wouldn’t it be nice to have this bit of coral back home, resting peacefully on the mantelpiece?”. Well, perendinate no longer! I present to you my first Firefox add-on, an add-on that lets you upload images you see on webpages directly to your website. Let me explain. If I see an image I like or wish to re-post on my blog, I have to do the following:

  1. Right click on image
  2. Save to hard drive
  3. Fire up an FTP client, Filezilla in this case
  4. Connect to my FTP server
  5. Load the directory with the downloaded image in the left pane, and the appropriate FTP directory in the right pane
  6. Upload the file

My add-on automates these steps. Since I don’t know how to use Javascript to upload a file to an FTP server, the script calls a PHP script which does the heavy lifting. I repeat that again: you must have a PHP-enabled webserver to run this add-on successfully. It doesn’t need to be a hosted one, I just run apache on my box and point the javascript to localhost. More detailed instructions are at the bottom. First, we look at how it works.

If you’re on some random site and think you want an image for your personal post or to share with others without being a leech on the original host, you right click on an image to see the context menu augmented by the “Upload To FTP” sub-menu.

Select the first option, “Images”. The second menu, “Fav 2″ can be customized to whatever you want, if you’re so inclined, but it’s mostly there to show that other options can be added. If you right-click on a non-text element the context menu is still augmented. I followed the Mozilla instructions but wasn’t able to get the sub-menu to not show up on non-image environments. If anyone figures it out after looking at my code, please drop me a line.

If you try to upload the non-image element, you get an error message stating that non-images cannot be uploaded at this time.

Finally, we check the folder on my website where the images were sent to. If you try to add a file with the same name more than once, it increments the file name by the next digit. I don’t know if this will be useful, but I have often come across several image files with the same name and different content (think Google image search for: Canada) and I’d hate to see them overwritten and end up being the same file. We see:

Here is the zip file containing both the XPI installer for the Firefox add-on, and the imgupload.php file. You can install the add-on by opening it with Firefox (File -> Open File). I’ll submit it to the Firefox add-on repository soon.

UploadToFTP zip file.

As for the PHP file, note that it does no error-checking whatsoever. Use it at your own risk. You’ll need to fill in parameters such as the FTP server name, login, password and upload folder. Once that’s done, host it in the root of your webserver’s public HTML directory and you’re done. If you host it in any other location, such as a subfolder or whatnot, then you need to update the “overlay.js” file in your Firefox profile’s extensions/uploadtoftp@viren.kumar/content folder.

Enjoy, and let me know if this is useful for you or if you’d like to see any upgrades or features.

2/13/10
2:07 am
Police State

Today I learned that there are snipers atop buildings in the downtown core, in case any “terrorists” attack or there isn’t enough cheering when $country wins $medal. Click to enlarge the pics.

Anybody know what kind of sniper rifle that is?

EDIT – The comments have taught me that the two guns aren’t “sniper” rifles. In my ignorance of all things firearms-related, I assumed they were so. Thanks, Reddit.

2/10/10
8:36 pm
Don’t Ask, Don’t Tell

Should have let them all drown, Alan. Down to the bottom of Davy Jones’ locker where the fish could pick them clean for millennia. And by extension, let them starve. In the hundreds of thousands. The things you could have exacted for a modicum of respect.

2/06/10
3:04 pm
Cultural Values

This is interesting. I’d never heard of this before, but it warrants some analysis.

Look at where we sit. more individualistic AND more secular-rational than the good ol’ US. Japan and Sweden are at the top, who would have thought? I wonder how old this is, it shows Eastern and Western Germany. It also misspells Czech as “Chech”. Look how close Poland is to India, it’s not too hard to believe, I guess. How is Turkey more traditional than India or Poland? Kemal must be turning over in his grave.

Also, Uruguay’s secular enough to belong to “Catholic Europe”. I guess they broke out of Latin America after all. Let me know your thoughts.

2/01/10
9:46 pm
Just how long again?

If you’ve ever wanted to see how long you’ll be playing a particular artist’s music for, if you were to play their entire discography, I present a one-liner in bash that will show you just that.

find . -type f -name '*.mp*' -exec exiftool '{}' + | grep Duration | awk '{x += $3; print x;}'

The venerable find command needs no introduction. Suffice it to say that the type switch restricts it to files, and the *.mp* restricts the files found to MP3s or MP2s.

Exiftool is a nifty command-line processing tool for tags of all kinds, as seen by its name. In this case, we want just the ‘Duration’ field of each song. Once we have those, we pipe those to awk and get a running total, which shows us how long the entire discography is when the final total is printed.

Now I know that I have 5668.14 minutes of Zappa goodness, or a mere 208 minutes of godly Death. You need to run this in the folder that has all the albums by the artist, or of course, you can adapt it to a script and pass in parameters and so on.