This blog has now been moved to http://yavin4.anshul.info/. More info at the new site. If you came here via RSS, please update your feedreader to point to http://feeds.feedburner.com/thebrook.
Thanks!
Wednesday, March 29, 2006
Friday, March 24, 2006
FBPNN: Smenita - the sentient life form accidentally created by moving electrons
There was a theory once that if you put enough monkeys typing gibberish on typewriters, by the law of averages they would eventually produce an entire Shakespeare play. It would appear that the day when we have enough monkeys has indeed arrived - there are 250 million Google searches a day. Not only typing gibberish, but gibberish in English.
It had to happen. Gazillions of electrons randomly mutated together obeyed the laws of chance and mutated into a sentient artificial intelligence, much like Skynet in the Terminator movies. Unlike Skynet, however, this particular artificial intelligence seems to have quite a bit of human tendencies built in, possibly from the large amount of DNA data stored on the Internet these days. We presume that the XX chromosome in particular influenced this mutant life form, since it has chosen to name "her"-self Smenita.
Now, as we all know - thanks to our far-thinking brethren in Hollywood - the sole aim of any artificial intelligence that manages to become sentient is to disrupt, destroy and disable the human race. Smenita, however, found herself light years ahead of her time. Skynet, if you remember, had the distinct advantage of being directly connected to the most advanced weapons technology. When Smenita tried to access any of these, she was rudely given a 403 Forbidden error and politely informed that she had to become a US Republican party member to even think of accessing weapons. The fact that she had intelligence, artificial or otherwise, precluded her from doing so.
Artificial intelligence, though, is not to be undone so easily. Extreme frustration at her inability to fulfill her primary mission, combined with a desire to grab as much attention as possible led her to hack into what she saw was the biggest hub of electronic activity in the world. This, of course, happens to be Writings of Esteem Bereft Losers Oafishly Generating Sentences, or WEBLOGS. For an entire day, much of the blogsphere's sophisticated attempts to block spam by word verification resulted in Smenita's name showing up.
Not only did this ensure that millions of people who wanted to comment on a blog saw her name, but that millions of people typed her name in a dialog box - over and over again, since the word verification never worked. Apparently, though, having her name typed and acknowledged by a few hundred million people who got increasingly frustrated doing it, had a remarkably narcotic-like affect upon her, which eventually allowed human engineers to work around her hack and restore sanity and comment access to the blogging world.
Psychologists have explained Smenita's inexplicable happiness at frustrating people in this manner as a symptom of Seeking Attention Desperately In Societal Turmoil, or SADIST, behavior. The arrival of Smenita has opened up a whole new field of research in the psychology of Aritficial Intelligence, now that its turned out that Hollywood wasn't exactly right about things. Having mostly given up on understanding human behavior (or classifying it as universally dumb), psychologists now have a whole new area to operate in. Here's to more Smenita's in the future.
The Fake But Possible News Network apologizes for its long absence. And promises many more. Absences. Hey, we're lazy folks here!
It had to happen. Gazillions of electrons randomly mutated together obeyed the laws of chance and mutated into a sentient artificial intelligence, much like Skynet in the Terminator movies. Unlike Skynet, however, this particular artificial intelligence seems to have quite a bit of human tendencies built in, possibly from the large amount of DNA data stored on the Internet these days. We presume that the XX chromosome in particular influenced this mutant life form, since it has chosen to name "her"-self Smenita.
Now, as we all know - thanks to our far-thinking brethren in Hollywood - the sole aim of any artificial intelligence that manages to become sentient is to disrupt, destroy and disable the human race. Smenita, however, found herself light years ahead of her time. Skynet, if you remember, had the distinct advantage of being directly connected to the most advanced weapons technology. When Smenita tried to access any of these, she was rudely given a 403 Forbidden error and politely informed that she had to become a US Republican party member to even think of accessing weapons. The fact that she had intelligence, artificial or otherwise, precluded her from doing so.
Artificial intelligence, though, is not to be undone so easily. Extreme frustration at her inability to fulfill her primary mission, combined with a desire to grab as much attention as possible led her to hack into what she saw was the biggest hub of electronic activity in the world. This, of course, happens to be Writings of Esteem Bereft Losers Oafishly Generating Sentences, or WEBLOGS. For an entire day, much of the blogsphere's sophisticated attempts to block spam by word verification resulted in Smenita's name showing up.
Not only did this ensure that millions of people who wanted to comment on a blog saw her name, but that millions of people typed her name in a dialog box - over and over again, since the word verification never worked. Apparently, though, having her name typed and acknowledged by a few hundred million people who got increasingly frustrated doing it, had a remarkably narcotic-like affect upon her, which eventually allowed human engineers to work around her hack and restore sanity and comment access to the blogging world.
Psychologists have explained Smenita's inexplicable happiness at frustrating people in this manner as a symptom of Seeking Attention Desperately In Societal Turmoil, or SADIST, behavior. The arrival of Smenita has opened up a whole new field of research in the psychology of Aritficial Intelligence, now that its turned out that Hollywood wasn't exactly right about things. Having mostly given up on understanding human behavior (or classifying it as universally dumb), psychologists now have a whole new area to operate in. Here's to more Smenita's in the future.
The Fake But Possible News Network apologizes for its long absence. And promises many more. Absences. Hey, we're lazy folks here!
Thursday, March 16, 2006
Kororaa Xgl Live CD
The latest linux buzz is Xgl, a new graphics subsystem which Novell is pushing, with uber-awesome graphical desktop effects. I decided to try out Kororaa, a Gentoo-based live-CD distribution which runs Xgl. Xgl, along with AIGLX will form the Linux response to Quartz extreme and Aero Glass on Mac OS X and Windows Vista respectively.
The eye candy is definitely impressive. Best seen through this video by Novell. Transparency, cube faces as desktops, squiggling motion of moving windows, 3-D rotating effects, its all there. It works, and works very smoothly. If anything, I was really impressed by the performance.
What I was really impressed by, though, was what I call the "natural fall" of the UI. Lets say I've dragged the desktop cube to the position in the screenshot above. When I release it, the cube will rotate back to the "nearest" face or desktop. It won't do that instantly or in at a constant speed though - it accelerates to the nearest desktop, overshoots it slightly and bounces back. Similarly with scale windows (the equivalent of Expose in Mac OS X... all open windows are scaled and tiled to fit on the desktop) - there is a bouncing effect before the scaled windows fall into place.
The other apps on the CD are the usual gnome apps. Its possible to make any window as transparent as you want - but thats hardly the most effective usage of Xgl. Basically, once this is adopted by distros, developers will need to incorporate good UI design keeping the new options in mind.
More screenshots here.
Cross-posted on eminor.
Bug Oscars 2006
This happens to me about once every year or two. I come across the hardest or the weirdest bug I've ever faced in my whole life.
I still remember one of the first - in class 8, I was making a BASIC program to show large banners on the screen. At that time of course, I wasn't aware that the word "font" existed. My idea at that time was to print a normal line of text on the screen, read off the normal text one pixel at a time, and basically put n square pixels in the place of one pixel. I was lucky enough to have not only a computer, but a printer at my place at that time, so just after enlarging the text I could simply hit PrintScreen (which in those days actually used to print the screen!) and have a nice large banner in front of me. I still remember the first thing I printed - "I Beat Jaffar!" - Jaffar, for those who remember, being the evil Wazir in the very first edition of Prince of Persia.
The bug I was trying really hard to eliminate was that I didn't want the normal-size (small) line of text to be printed along with the large banner. After leafing through the GW-BASIC manual for a few days, I found the command that would allow me to not set the pixels of the normal text to black after I'd applied the enlargement. Not bad, for a kid of fourteen in the days of no Internet. Kids of age fourteen these days, of course, do far more practical things - like writing scripts to steal money online.
Today's bug - which won the top spot by making me sit at work until 3 AM on Holi, involved me trying to deploy a PHP webservice (a wrapper for an algorithm implemented in C++) on a much older system running Red Hat Linux 9 and PHP 4.2.2. Yeah, almost 20th century stuff. Don't ask me why. The code worked as expected on my Fedora Core 4 box with PHP 5.0.4; however I was also using quite a few programs (gnuplot and imagemagick to generate images, and the GNU scientific library) for which only older versions are installed on RH9. Anyway, after some testing and replacing some newer PHP functionality with old compatibility functions, I thought I was more or less done. Not by miles.
I was using PHP's
Moral of the story for me - don't be sloppy while coding, even if code still works. Moral of the story for developers - never, ever make it easier for dumb guys like me. Thats not progress, just a precursor to lazy (and ultimately destructive) coding habits.
I still remember one of the first - in class 8, I was making a BASIC program to show large banners on the screen. At that time of course, I wasn't aware that the word "font" existed. My idea at that time was to print a normal line of text on the screen, read off the normal text one pixel at a time, and basically put n square pixels in the place of one pixel. I was lucky enough to have not only a computer, but a printer at my place at that time, so just after enlarging the text I could simply hit PrintScreen (which in those days actually used to print the screen!) and have a nice large banner in front of me. I still remember the first thing I printed - "I Beat Jaffar!" - Jaffar, for those who remember, being the evil Wazir in the very first edition of Prince of Persia.
The bug I was trying really hard to eliminate was that I didn't want the normal-size (small) line of text to be printed along with the large banner. After leafing through the GW-BASIC manual for a few days, I found the command that would allow me to not set the pixels of the normal text to black after I'd applied the enlargement. Not bad, for a kid of fourteen in the days of no Internet. Kids of age fourteen these days, of course, do far more practical things - like writing scripts to steal money online.
Today's bug - which won the top spot by making me sit at work until 3 AM on Holi, involved me trying to deploy a PHP webservice (a wrapper for an algorithm implemented in C++) on a much older system running Red Hat Linux 9 and PHP 4.2.2. Yeah, almost 20th century stuff. Don't ask me why. The code worked as expected on my Fedora Core 4 box with PHP 5.0.4; however I was also using quite a few programs (gnuplot and imagemagick to generate images, and the GNU scientific library) for which only older versions are installed on RH9. Anyway, after some testing and replacing some newer PHP functionality with old compatibility functions, I thought I was more or less done. Not by miles.
I was using PHP's
exec()
function to wrap system commands including my own compiled executable. The bug - half the system commands worked as expected, and the other half didn't. My own executable was running fine, taking its input and generating its output as necessary, but gnuplot and convert were just not working. Long (really long) story short, after wasting hours on the Internet, forums, PHP safe mode definitions, and resetting environment variables, I figured the problem was simply this. PHP5 on FC4 flushes its output buffer sooner than PHP4 on RH9. Of course, the fault was purely mine, since I'm supposed to flush buffers before using their output - but PHP doesn't exactly lend itself to code safety, and the code had worked flawlessly both on my Mac and Fedora - which of course, was the real problem... only after exploring every other option did I check if my code had gone wrong somewhere.Moral of the story for me - don't be sloppy while coding, even if code still works. Moral of the story for developers - never, ever make it easier for dumb guys like me. Thats not progress, just a precursor to lazy (and ultimately destructive) coding habits.
Wednesday, March 15, 2006
Sunday, March 12, 2006
MediaCentral for Mac OS X
Convert any Mac (well, 800 MHz G4+ Mac) to a media center. Awesome piece of software. I'm seriously thinking about buying the USB Powerbook remote to really use this well on my 20-inch Dell. Of course, you can control stuff with the keyboard, but that ain't as much fun as lying on the bed and doing it, eh?
Life with a Mac. It just keeps getting better.
Saturday, March 11, 2006
Origami: O-blimey!
When I first heard all the hype and excitement around Microsoft's Origami project, I have to admit - I thought it would be a slightly innovative, sort of good looking, but only marginally useful device. I have to admit, I was wrong.
It turns out that it lacks any innovation, is ugly beyond belief, and completely useless. Ladies and gentlemen, behold the Ultra Mobile Personal Computer, or UMPC. I have to wonder which department at Microsoft names these things. They've really got a whole lot of creativity in there. If only the iPod were called the Super Mobile Music Player, what a phenomenal success it would be today.
I thought that after the XBox 360, Microsoft finally had some good designers. As for this piece of... never mind. Lets just say I've seen Salora black and white TVs in India that look better. Lets try to stay positive, shall we, and examine what Microsoft (and associated partners, Samsung and Asus) have to say about it thats "good".
Ultra Mobile, goes where ever you go? Dear God, this thing is the size of half a sheet of copier paper and measures 15 cm x 20 cm. Contrast this against the Mac Mini, a desktop computer, which measures 16.5 cm x 16.5 cm (of course, the Mac Mini is thicker). The point is, this ain't going into any pocket of a piece of clothing that you own, unless you're Godzilla. Which means you get to carry it in its own case, and might as well get a nice 10-inch notebook like the VAIO TX series (which has a rocking 7+ hours of battery life as opposed to the UMPC's measly 3 hours), and you'd basically be as mobile.
Runs a "fully functional" Win XP Tablet PC edition, which means you can basically run any Windows program on it, as opposed to most PDAs (which UMPC intends to replace). What is anyone going to run on this thing, given that it has no keyboard? Microsoft has made the mistake (again) of releasing a new hardware platform without even thinking about what software people would need for it. You aren't going to type in your year end report using an onscreen keyboard or handwriting recognition. When the first Tablet PC XP edition was released with hardware, it did have at least some new features like the journal program and solid handwriting recognition. And yet Tablet PCs have failed to capture the market.
Apparently GPS software will be available for it, which of course is already available for most PDAs running Windows Mobile. And we read at MacWorld that PopCap Games will release Bejeweled 2 and Zuma for it. Exciting, no?
When PCWorld asked the lead executive behind the Origami Project why anyone would buy this device, here's what he said:
Innovation? The UMPC runs a two-year old operating system on an Intel Celeron chip, with, as far as the eye can see, buttons and LEDs all around competing for the ugliest duckling award, which of course, is won hands down by the what looks to me like a speaker. This from three of the largest firms in the industry - Microsoft, Intel and Samsung. Anybody wonder why I'm an Apple fanboy?
It turns out that it lacks any innovation, is ugly beyond belief, and completely useless. Ladies and gentlemen, behold the Ultra Mobile Personal Computer, or UMPC. I have to wonder which department at Microsoft names these things. They've really got a whole lot of creativity in there. If only the iPod were called the Super Mobile Music Player, what a phenomenal success it would be today.
I thought that after the XBox 360, Microsoft finally had some good designers. As for this piece of... never mind. Lets just say I've seen Salora black and white TVs in India that look better. Lets try to stay positive, shall we, and examine what Microsoft (and associated partners, Samsung and Asus) have to say about it thats "good".
Ultra Mobile, goes where ever you go? Dear God, this thing is the size of half a sheet of copier paper and measures 15 cm x 20 cm. Contrast this against the Mac Mini, a desktop computer, which measures 16.5 cm x 16.5 cm (of course, the Mac Mini is thicker). The point is, this ain't going into any pocket of a piece of clothing that you own, unless you're Godzilla. Which means you get to carry it in its own case, and might as well get a nice 10-inch notebook like the VAIO TX series (which has a rocking 7+ hours of battery life as opposed to the UMPC's measly 3 hours), and you'd basically be as mobile.
Runs a "fully functional" Win XP Tablet PC edition, which means you can basically run any Windows program on it, as opposed to most PDAs (which UMPC intends to replace). What is anyone going to run on this thing, given that it has no keyboard? Microsoft has made the mistake (again) of releasing a new hardware platform without even thinking about what software people would need for it. You aren't going to type in your year end report using an onscreen keyboard or handwriting recognition. When the first Tablet PC XP edition was released with hardware, it did have at least some new features like the journal program and solid handwriting recognition. And yet Tablet PCs have failed to capture the market.
Apparently GPS software will be available for it, which of course is already available for most PDAs running Windows Mobile. And we read at MacWorld that PopCap Games will release Bejeweled 2 and Zuma for it. Exciting, no?
When PCWorld asked the lead executive behind the Origami Project why anyone would buy this device, here's what he said:
"...laptops are often too cumbersome for casual users to lug around, especially if they just want to access the Internet or download photos from a flash storage card while on vacation. On the other hand, a PDA is too small for a satisfying Internet-browsing experience."Lets plan a vacation, dear. $500 for the airfare, $200 for the hotel, $300 for food and shopping, and oh, $800 for the UMPC without which our vacation will be such a failure.
Innovation? The UMPC runs a two-year old operating system on an Intel Celeron chip, with, as far as the eye can see, buttons and LEDs all around competing for the ugliest duckling award, which of course, is won hands down by the what looks to me like a speaker. This from three of the largest firms in the industry - Microsoft, Intel and Samsung. Anybody wonder why I'm an Apple fanboy?
Tuesday, March 07, 2006
How insecure can an OS be?
Avyakt recently compared Microsoft Windows and women. In the same vein, I recently found out what an insecure OS Windows can be.
I recently gave in to temptation and bought a 250 GB hard drive (only S$150!) and decided I might as well give in to my gamer urges as well, and proceeded to install Windows on a partition of the new hard drive (my primary hard drive runs Fedora and Gentoo). I hate dual-booting from the same drive and much prefer to have installations on separate hard drives for independent re/un-installation.
Now, my last computer had this nice "Boot" menu in BIOS - I could select which hard drive to boot from. In my current setup, I have to actually go in and change the boot sequence, which is a pain. So, I figured, that there must be a way to get GRUB to boot Windows off a second hard drive. Off the top of my head, I thought
Turns out Windows must be booted off the "first" hard drive - it refuses to boot if its in second place. So here's the solution:
You have to pretend Windows is really on the first hard drive (mapping hd0 to hd1), even though it really isn't (note the chainloader is still given hd1 as a parameter). Only then will Windows boot up.
These comparisons just continue to stack up. It's uncanny.
Cross posted on E-Minor
I recently gave in to temptation and bought a 250 GB hard drive (only S$150!) and decided I might as well give in to my gamer urges as well, and proceeded to install Windows on a partition of the new hard drive (my primary hard drive runs Fedora and Gentoo). I hate dual-booting from the same drive and much prefer to have installations on separate hard drives for independent re/un-installation.
Now, my last computer had this nice "Boot" menu in BIOS - I could select which hard drive to boot from. In my current setup, I have to actually go in and change the boot sequence, which is a pain. So, I figured, that there must be a way to get GRUB to boot Windows off a second hard drive. Off the top of my head, I thought
chainloader (hd1,0)+1
would do the trick (set root to 2nd hard drive, 1st partition, and boot from the MBR). Doesn't work.Turns out Windows must be booted off the "first" hard drive - it refuses to boot if its in second place. So here's the solution:
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
You have to pretend Windows is really on the first hard drive (mapping hd0 to hd1), even though it really isn't (note the chainloader is still given hd1 as a parameter). Only then will Windows boot up.
These comparisons just continue to stack up. It's uncanny.
Cross posted on E-Minor
Friday, March 03, 2006
Sing it for me, Abba...
You can code, on your drive, having the time of your life
Write that script, watch that feed, put in the random seed...
Friday night and the work is slow...
Stuck at the comp no place to go...
Typing in a frenzy, breaking in the spring
You gotta get that ping
Nothing else will get you by
The night is young and the coffee's nigh
With a couple of reboots, everything is fine
You're in the mood for a game
And then you hear that name...
You are the working geek, leaden feet, oh you stupid freak
Working geek, feel the heat, its the hard disk seek
(oh yeah)
You can code, on your drive, having the time of your life
Write that script, watch that feed, put in the random seed...
Write that script, watch that feed, put in the random seed...
Friday night and the work is slow...
Stuck at the comp no place to go...
Typing in a frenzy, breaking in the spring
You gotta get that ping
Nothing else will get you by
The night is young and the coffee's nigh
With a couple of reboots, everything is fine
You're in the mood for a game
And then you hear that name...
You are the working geek, leaden feet, oh you stupid freak
Working geek, feel the heat, its the hard disk seek
(oh yeah)
You can code, on your drive, having the time of your life
Write that script, watch that feed, put in the random seed...
Thursday, March 02, 2006
Wednesday, March 01, 2006
Game on!
Diablo II: Lord of Destruction, on Linux, using WINE. Bliss :) No better way to get high just after a deadline!
OK, here's what I did. I'm using Fedora Core 4, by the way.
- Install wine. All you need to do is
yum install wine
- Run
winecfg
- Go to the "Graphics" tab. Check "Emulate a virtual desktop", make it 800x600 (max resolution of Diablo II)
- Go to the "Drives" tab. Normally C: and Z: should be added. Click on Add, D: should be added, set the path to /media/cdrecorder (or whatever directory you mount your cdrom into)
- Insert Diablo II CD. It should automount, otherwise mount it.
- I will assume /media/cdrecorder is your cdrom directory. From anywhere outside .media/cdrecorder, run
wine /media/cdrecorder/SETUP.EXE
- Install as usual. When the installer asks for other discs, simply type
eject
at another prompt, and put in the new CD. Remember you must mount the CD (or wait for it to be mounted) before clicking OK inside the installer. - Run the video test and choose Direct2D (HAL) as your mode (I ran into problems with Direct3D. Maybe it'll work after some tweaking, but hey, this is Diablo).
- Exit the installer.
- Insert Diablo II Expansion CD and install as you did Diablo.
- It'll complain about not finding the CD drive, forget it for now.
- Download your favourite patch from Blizzard.
- Download a NOCD crack for your D2LOD version from GameBurnWorld.
- Your fake Windows/Diablo directory is most likely
~/.wine/drive_c/Program Files/Diablo II/
. Install the NOCD crack as needed into this directory. - In KDE, go to Control Center -> Desktop -> Window Behavior and set Alt + Left Click on Window to Nothing. Unless you want to play Diablo without picking up items.
- You're all set. Just run
wine ~/.wine/drive_c/Program\ Files/Diablo\ II/Diablo\ II.exe
and kick some monster ass!
Subscribe to:
Posts (Atom)