A Robot Playing Ping Pong!

Woah. This is wicked! I wrote a ping pong game that had an AI player about two or three years ago in C++, the algorithm isn’t very difficult to figure out, but here’s one built-into a robot! RoboCup claims that they’ll win the international soccer championship by 2050, and I think table tennis will be much easier (because japanese are the best in robotics AND table tennis ;)

Pro Web 2.0 Mashups

Finally, I got the book about Remixing Data and Web Services and read about 3 chapters. It seems that everyone is already mixing up all kinds of data from sources like Google Maps and News, Flickr photos, delicious bookmarks, last.fm charts and others. The very first mashups like Housingmaps.com are brilliant, and with Yahoo! Pipes coming along, things seem to get much easier for people without any coding basics.

The Yahoo! Pipes service is a feed aggregator and manipulator, that lets you remix feeds from multiple sources. And many many more seems to be on its way :)

The author of the book is Raymond Yee and it’s published by Apress. You can browse it at Amazon here: Pro Web 2.0 Mashups.

And here’s a quick tip about linking to Amazon books. Find the book you like through Amazon search, go to its Product details and copy the ISBN-10 field value. The shortlink for your book will look like this: amazon.com/dp/159059858X, where 159059858X is the ISBN of the book. Nice huh?

More detailed examples can be found here: Linking to Amazon

Windows Live Writer

The Pro Web 2.0 Mashups book I wrote about earlier is going great and I finally got to the blogging chapters. Standalone blogging, yeah that was a news for me. I mean it is obvious that offline/standalone blogging is applicable to WordPress and other blogging systems, and that’s one of the main reasons why the XML-RPC protocol is supported by them, right? Well I just didn’t see the benefits of offline posting.

Actually, this is my very first offline post, so I’m not so sure that it’ll come out safe and sound, but I really do trust Microsoft in some ways, although I’m in love with Fedora Linux. Anyways, Microsoft Windows Live Writer seems great and has lots of cool features. It’s not just a plain-text editor that’ll post through XML-RPC, so I suggest you check it out: http://get.live.com/writer/overview. It supports most of the blogging systems that we use today.

I’m currently experiencing problems linking it to my russian weblog, maybe it’s because I self-customized the theme (losing some meta tags), or just no wordpress 2.6.2 support. I’ll be sure to upgrade and check that out next week.

UPD 5 minutes later: Yup yup! ;)

Google Maps and UTF-8

I bet everyone’s already using the UTF-8 encoding for all their pages. Well, windows-1251 remains the most popular russian encoding, although many people have realized that 1251 won’t go far.

I’ve been binding some Google Maps to a cp1251 page and hadn’t had any trouble viewing it through mozilla firefox and opera browsers, but when I switched to internet explorer, I had the google map all messed up. That’s probably because opera and firefox can handle multiple codepages, unlike explorer.

I’m pretty sure there must be a work-around this in the Google Maps API by passing some language parameters, though I still want my map to be in russian, not english. So I guess I’ll just have to stick to the UTF-8 encoding. Weird..

WordPress 2.7

There’s been a lot of noise after the 2.7 beta release and I really liked the First Look at WordPress 2.7 article by Weblog Tools Collection. So I’m really looking forward to upgrade. I’m currently running 2.6.3 and my WordPress keeps yelling for 2.6.5 upgrade, but I think I’ll stay to 2.6.3 cause it seems pretty stable, unlike 2.6.2 where I had some problems setting up WP-Cache and the WP Super Cache plugins.

As far as I know a WordPress 2.7 Release Candidate 1 is out today, but that still doesn’t encourage me to upgrade my current blogs, though I might find some free time to play with it locally. And I’m also thinking about trying out Typepad. It’s not that I don’t like WordPress. WordPress is great, I love it and I doubt that I’ll replace it with anything, ever. But Typepad seems okay too, so I just want to check it out, give it a couple of test shots, and try to get a design layed out for Typepad. Hell knows, maybe it’s great ;)

Yeah, and Windows Live Writer has Typepad integration too! I know lots of people that use Typepad. Yes, it’s expensive (unlike WordPress) but I’m sure it’s worthed.

Robotics in Russia

Hey, just had another exhibition here in Moscow, and we’ve finally presented the new AR-600 android robot. It looks a lot like ASIMO, but it’s totally new. It doesn’t know how to walk yet, but that’s only a matter of time – the mechanics are strong enough to hold that 100 kg robot on one leg!

If anybody’s interested, be sure to check out the photos and videos right here: androidov.net. The blog’s in russian, but you should get the most of it ;)

Regards.

Finally, WordPress 2.7

I’m so proud they finally did it. After the RC2 coming out I thought they’ll have problems up until January, but there they go! It’s nice to see that people are already upgrading their blogs, and as for Russia, we’ve got developers who’ve done the translation already, so I guess I’ll be running it in two or three weeks. Don’t wanna hurry though, and haven’t got much time neither.

Fedora Linux 10 Partitioning

Okay, so I had my Fedora 10 system running out of disk space a few days ago, so I started looking for solutions to re-partition my hard drive. Yeah, GParted seemed like a good one, but it hasn’t got the power to resize currently mounted partitions, nor to run batch-scripts like Symantec Partition Magic (windows) does. The structure of my hard-drive looked something like this in the exact same order physically:

  • Primary NTFS (C:)
  • Primary extended:
    • Linux /boot
    • Linux /
  • Primary Linux swap
  • Primary HP Recovery NTFS (D:)

The HP Recovery partition is the one used to recover my Windows Vista on C:. Anyways, I managed to resize the first primary NTFS with GParted, booted up my Windows Vista. Through Paragon Partition Manager I managed to move and resize the extended primary partition closer to the first primary C:, moving /boot and expanding /. And that was probably where I messed up.

I restarted my computer and GRUB refused to boot my Fedora Linux, stating that /sbin/init is not found. Alright, I booted back to Vista, opened Paragon Partition Manager and accidentally clicked on some button called "Boot Wizard" which popped out a dialog box saying "Complete!". And this is where the fun stuff began…

After another reboot, I realized that grub is dead, and instead I see a Paragon Boot Wizard asking me to pick either “Boot from C:” or “Boot from HP Recovery”. The first option didn’t work, so I booted HP Recovery. The Recovery program analyzed my system and recovered the Vista partition, together with the MBR. Okay, so now I can boot my brand new Vista :)) At this moment I quickly burned a Fedora 10 Live CD and restarted again.

I managed to recover my previous GRUB boot loader from the Live CD and noticed that my old linux filesystem was mounted in /media/- (tutorials stated that it should be mounted to /mnt/sysimage). Anyways, I tried to chroot /media/- which said that I’m missing /bin/bash, and an ls -a /media/-/bin got me shocked! It was almost empty. Jesus christ! Although the /home /usr /sbin and other directories were okay. So I backed up my home directory and reinstalled Fedora 10 in about 20 minutes (plus software installation for about an hour). Now I’m back online and happy (I still do experience some PulseAudio problems in Skype though).

Well, the bottom line is don’t use any windows partition editors, nor laptop recovery systems together with linux filesystems. I bet that the GParted Live CD would have done the job for me in minutes.

MySQL Charset Issues

And yet another MySQL character set problem solved. I had a remote FreeBSD server running MySQL 4.0 and a local Windows server running MySQL 5.0 (the XAMPP web servers package). I had no problems doing an export from MySQL 4.0 (running on cp1251 charset) to MySQL 5.0 (running utf8 charset) with something like this:

mysqldump -u -p --default-character-set=cp1251 dbname tablename > table.sql

Adding a few lines using vi at the beginning of the created file:

SET NAMES cp1251;
SET CHARACTER SET cp1251;

I imported the table dump into MySQL 5.0 and was able to see windows-1251 encoded characters using MySQL Query Browser. I’ve deleted two rows from the resultset, applied, then dumped back using mysqldump.exe:

mysqldump -u -p dbname tablename > dump.sql

When I tried to import the dump back to my remote MySQL 4.0 server

mysql -u -p dbname < dump.sql

I got some errors concerning the unavailable in MySQL 4 and lower SET NAMES and SET CHARACTER SET commands, which was fixed using the compatible flag during export:

mysqldump -u -p --compatible=mysql40 dbname tablename > dump.sql

That kept me going. Anyways, the dump back to MySQL 4 succeeded, but the character set didn’t match. I got utf8-coded cp1251 characters which looked weird, so I tried the following:

mysqldump -u -p --compatible=mysql40 --default-character-set=cp1251 dbname tablename > dump.sql

And got an error: mysqldump: Character set ‘cp1251′ is not a compiled character set and is not specified in the ‘C:mysqlsharecharsetsIndex.xml’ file. MySQL 5 was installed in C:/xampp/mysql, so I tried changing the [mysql] and [mysqldump] sections in the my.cfg file, but that didn’t help. It seems that mysql.exe, mysqldump.exe and other mysql utilities for windows are pre-compiled using a specific configuration.

The following solved my problem:

mysqldump -u -p --compatible=mysql40 --default-character-set=cp1251 --character-sets-dir=C:/xampp/mysql/share/charsets/ dbname tablename > dump.sql

Which got me a plain cp1251 encoded MySQL 4 compatible dump containing all my data. I’m not sure, but this seems to be a MySQL for Windows issue, cause I’ve seen posts stating same errors but using a standalone MySQL 5.0 server installation (unlike the XAMPP built-in). There you go ;)

Twitter on Fedora Linux

I got tired of using my web browser for twittering, so I looked for some twitter applications for linux. A list of the best ones can be found in the Twitter Fan Wiki. I’ve tried a couple, but Twitux suited me best. It looks pretty good, runs under Gnome and supports gui-notifications.

To install Twitux on a Fedora machine change to root and yum install it:

su -
yum install twitux

That will get you the latest Twitux installed and listed in your Applications – Internet menu. One thing that I didn’t like about Twitux is that ugly dinosaur icon that it came with, so I started searching the net for how to change it. Here are the locations of twitux icons which can be swapped:

/usr/share/icons/hicolor/scalable/apps/twitux.svg
/usr/share/icons/hicolor/48x48/apps/twitux.png

You have to be root to access those locations for writing. You can download a 48×48 Twitter PNG from iconarchive.com in the Web 2.0 Icons post. And thanks to lopagof you can get an SVG from deviantart.com. Don’t forget to logout and back in for your new icons to take effect.

I’m not sure about the task bar icon, cause I was able to change it just by right-clicking it in my Avant Window Navigator. GUI notifications still run that dinosaur icon though, so I turned it off :)

P.S. Follow me: twitter.com/kovshenin