Monday, 13 August 2007

The future of C++ as seen by Dr. Bjarne Stroustrup

Dr. Bjarne Stroustrup is credited with creating the ever popular C++ programming language. While there are pure object oriented programming languages such as 'smalltalk' for instance, it was C++ which shot the object oriented programming paradigm to popularity.

In this video interview, Dr. Bjarne Stroustrup answers a number of questions such as the following ....
  • Do you think you'll ever design a new language from scratch?
  • How long after the standard is out do you expect to see a production compiler?
  • Is it possible to do garbage collection cleanly and efficiently in C++?
  • How soon after you created C++ did you see it start to take over the industry?
  • Is there any particular naming convention you subscribe to?
  • What's your opinion about the Microsoft implementation of C++?
Very interesting questions indeed... which ask for equally interesting answers from Dr Bjarne Stroustrup. Watch the video.

Friday, 10 August 2007

Free Software Sticker Book - free download

Are you looking for that exact sticker to stick on your machine, on your car's windshield or anywhere you fancy, in order to proclaim to the world that you support GNU Free software ? Then look no further because a group of three people have compiled a book featuring hundreds of stickers of various hues and shapes and which is made available for free download as a PDF document.

So all you have to do is to download the book and print out your favorite sticker from the lot. And then you are ready to advertise your personal preferences as far as computing is concerned. For all you know, you might even be able to persuade people close to you to try out the Free software in the process. Here is a screenshot of a subset of the collection of stickers you will find in this very beautifully compiled book.

Fig: A sample of the variety of stickers you will find in this book.

You can download the book of stickers from the following link.

Wednesday, 8 August 2007

Tip: Download Accelerator for Linux

There are different ways of downloading files from remote locations. While all web browsers support downloading files via http or ftp, I have found that in the case of Firefox (at least), it doesn't support resuming downloads. While this is not a problem for files of small size, when it comes to downloading huge files such as ISO images of Linux distributions, this lack of support for resuming downloads from where you had left off earlier would mean you have to start downloading the file again from the beginning.

The most common and fail safe method of downloading huge files in Linux is to use the wget tool. By using the -c option, you can resume the download of the file at a later stage in the event the downloading fails due to connection time out.

I usually use the following wget command to download Linux distributions.
$ wget -c full_path_to_the_linux_iso
Using Curl to speed up your downloads
But here is a nice tip to speed up your download of files by a significant factor. This tip is applicable for people who have a large bandwidth internet connection in the lines of 4 MBps and above. Usually different mirrors have different speeds. A Linux distribution mirror in say Japan may have a 100MBps connection but another mirror in a different location will be connected only to a 10 MBps pipe. More over these mirrors throttle the bandwidth made available for each individual connection thus providing a upper limit of download speeds.

What you can do is split the file (in our case the ISO image) you are downloading into a number of pieces and download each piece from a different mirror simultaneously. At the end of the download, you can combine all the pieces together to get your file in one piece. This is known as download acceleration where the software connects to more than one location simultaneously and splits the downloads among the locations. This feature is commonly found in many download managers for Windows but is hard to find in those available for Linux.

You can get the same feature in Linux too by using the program curl to download your files. Let's say I want to download the Ubuntu ISO image of size 700MB. I split the download into 4 parts as follows :
$ curl --range 0-199999999 -o ubuntu-iso.part1 $url1 &
$ curl --range 200000000-399999999 -o ubuntu-iso.part2 $url2 &
$ curl --range 400000000-599999999 -o ubuntu-iso.part3 $url3 &
$ curl --range 600000000- -o ubuntu-iso.part4 $url4 &
Where url1, url2, url3 and url4 are as follows ...
url1=http://ubuntu.intergenia.de/releases/feisty/ubuntu-7.04-desktop-i386.iso
url2=http://ubuntu.virginmedia.com/releases/7.04/ubuntu-7.04-desktop-i386.iso
url3=http://es.releases.ubuntu.com/7.04/ubuntu-7.04-desktop-i386.iso
url4=http://ftp-mirror.internap.com/pub/ubuntu-releases/7.04/ubuntu-7.04-desktop-i386.iso
This creates four background download processes, each transferring a different part of the ISO image from a different server. The --range option specifies a subrange of bytes to extract from the ISO file. The -o option provides the name of the file to which the data is to be saved. So once all the four curl processes finish their download, you will have four files namely ubuntu-iso.part1, ubuntu-iso.part2, ubuntu-iso.part3 and ubuntu-iso.part4 in your current directory.

To get the original Ubuntu ISO file, I just combine the files using the cat command as follows :
$ cat ubuntu-iso.part? > ubuntu-7.04-desktop-i386.iso
As I said earlier, if you have a high speed Internet connection then this method will considerably shorten the time taken to download huge files.

As an aside, I have entered all the commands in a file as follows :
#FILE NAME : da.sh (Download accelerator)
#!/bin/sh

url1=http://ubuntu.intergenia.de/releases/feisty/ubuntu-7.04-desktop-i386.iso
url2=http://ubuntu.virginmedia.com/releases/7.04/ubuntu-7.04-desktop-i386.iso
url3=http://es.releases.ubuntu.com/7.04/ubuntu-7.04-desktop-i386.iso
url4=http://ftp-mirror.internap.com/pub/ubuntu-releases/7.04/ubuntu-7.04-desktop-i386.iso

curl --range 0-199999999 -o ubuntu-iso.part1 $url1 &
curl --range 200000000-399999999 -o ubuntu-iso.part2 $url2 &
curl --range 400000000-599999999 -o ubuntu-iso.part3 $url3 &
curl --range 600000000- -o ubuntu-iso.part4 $url4 &
... set the executable bit of the file and then I run it.
$ chmod u+x da.sh
$ ./da.sh

Sunday, 5 August 2007

Oxygen wallpaper contest

Oxygen is the team behind the beautiful icon sets you will get to experience in KDE 4.0 when it is released sometime this year. The goal of Oxygen icon set is to create a set of icons for use on the desktop which are beautiful, support usability and accessibility and in a way, better fulfill the needs of the users.

The Oxygen team has announced a contest. Put your creativity to task and create a wallpaper. The wallpaper can be of jpg jpeg bmp gif png svg svgz formats. The theme for the wallpaper you create can be any of 3D art, vectors, photos, and pixmaps and it can be of any standard wallpaper dimension but bigger the better.

Fig: A sample set of Oxygen Icons

Once you have created the wallpaper, upload it to their website. If you are lucky and your wallpaper is selected, it will be included in the wallpapers that will ship as default set in KDE 4. More details here.

Friday, 3 August 2007

Google phone based on Linux in the making ?

After getting tired of all the iPhone hype one saw in diverse media, now the rumor is that Google is planning to roll out its own branded Phone. And one can find sneak peaks at a prototype (See photo below). No details of the specification of the phone are yet available.

The phone is supposed to be an ad-supported phone which means the consumers ie the end users can look for a free lunch by way of heavily subsidised call rates which cost next to nothing (again a rumor). And Wallstreet Journal is reporting that Google has invested hundreds of millions of dollars in its cell phone project and is courting U.S. and European mobile operators.

And most obviously the Google phone (for now nicknamed GPhone) will be powered by Linux. Check out this prototype of a GPhone which is floating on the net.

Fig: A prototype of GPhone [Courtesy: VOIP blog]

Runes of Avalon - an enjoyable game for Linux

In my teens I was addicted to playing computer games. We all are at some point of our lives. And I have played a wide variety of games from arcade to RPG and simulations. But the most enjoyable ones were games which had simple controls. Some of the classic games of yore I have immensely enjoyed are Pacman, MS-Pac, Dig Dug, Snake and so on. More recently, I enjoyed playing the two games Fizzball and Prof Fizzwizzle and the molten mystery which the regular readers of this blog would have already read a review of.

Two weeks back I had the opportunity to try out another very interesting game called "Runes of Avalon". This game is the brain child of Roman Budzowski the founder of Anawiki Games - a professional game developing firm based in Poland. "Runes of Avalon" game has been released for the Linux platform apart from that for Windows and MacOSX.

The game is played entirely with the aid of the mouse and the objective of the game is to clear out runes which are nothing but small tablets of varied colors with inscriptions on it. On first glance the game has some semblance with a tetris game in that you have to match three or more tablets (runes) of similar colors to make them disappear from the board. You can rotate the runes by clicking the right mouse button. And the runes come in different combinations so some mixing and matching is in order. But the similarity to tetris ends there.

Fig: Play Quest mode main page

Fig: Game play in progress

The game has three modes of play. Them being "Play Quest", "Time attack" - where you have just one minute to clear the board of runes and "Endless play".

There are a total of 105 different levels in the "Play Quest" mode. In this mode each time you bring together three or more runes of same color together to form combinations, it gets recorded in a beautiful energy meter on the top left corner of the game board (See figure below). And once the specified quota of energy for each color of rune is met, the level is completed.

Fig: Different stages of the energy meter and timer

This very entertaining game also has a bonus game called "Gallery" where you have to put together jumbled images and make them whole again.

Fig: Completing this level provides you with additional spells or power-ups

It might be said that there are numerous games of these sort with similar game play. To some extent it is true but if you ask me, what makes a game a success and a joy to play is a combination of factors - them being ease of control, superior graphical effects and an entertaining game play. I found "Runes of Avalon" game to sport all these qualities.

It is also commendable that the game developers decided to release a Linux version of their game albeit a non-free game, which in my mind is a big thing in itself because as they all say, an Operating system is as useful as the applications which run on it. And as more and more game developers roll out games for Linux platform it will have a trickle effect in the rise in popularity of Linux.

Pros of Runes of Avalon
  • Very entertaining game play
  • Ease of control - You play the game entirely using the mouse.
  • Beautiful graphics.
  • More than one person can play the game simultaneously by managing multiple profiles and the game keeps track of individual scores.
  • Automatic saving of ones play levels so you can come back and continue playing where you left off.
  • Value for money
  • Has over 105 different levels in the "Play Quest" mode, with other modes containing more levels.
  • Can download additional levels from the net for free.
Any drawbacks ?
This game makes use of OpenGL libraries. So if you have an NVIDIA or ATI graphics card, you won't be able to play the game properly using their open source drivers bundled with all Linux distributions. You will have to download and install the proprietary drivers from the respective websites before you can play the game.

If you are using a Linux distribution such as PCLinuxOS or Ubuntu, downloading and installing the proprietary graphics drivers is a piece of cake and can be done using Synaptic. I tested this game in PCLinuxOS 2007 and the game played flawlessly.

What really makes me happy is that professional game developers are eyeing the Linux platform with increasing interest. The OpenGL framework on which many games could be based upon shows a lot of promise. The Beryl and Compiz project is proof of what could be achieved with OpenGL and that, is just the tip of the iceberg.

The game - Runes of Avalon - is nominally priced at $19.99 and you can download a time limited demo version of the game which is fully playable and test it out before making the jump to buy it. The simplicity of this game makes it an ideal one for kids and adults alike and provide hours of fun in the process.

Thursday, 2 August 2007

Poll shows majority favor Vi as their editor of choice

Two weeks back, this blog had run a poll which asked which was your favourite editor. The poll was open for voting roughly for a period of two weeks or 14 days. And nearly 750 people participated in the poll.

Guess what ? Over 50% of the people that is well over 375 people said their favourite editor is Vi or its equivalent such as Vim, GVim and so on. And I find this a pleasant surprise because I am myself an avid Vi user.

Fig: Pie chart representation of usage of the editors

The second place goes to GEdit - the default text editor in Gnome followed closely by Kate and Emacs. One thing worth noting is that perhaps the people who participated in the poll might have a programming or system administration background which could be why Vi editor fared so well over the notepad equivalent editors such as Gedit.

Or it could be that most Linux and Unix users are predominantly hard core techies who do programming or system administration for a living and who have already mastered the fine art of editing using Vi to appreciate its true power.

While GEdit is a far second in the poll having garnered just 13% of the votes, I suspect that it is quite popular with non-techies who use Linux since it is the default editor in Gnome. Many times I myself have reverted to Gedit when I couldn't find GVim on a Linux machine.

Finally, while I listed some of the most widely known editors, I forgot to include an 'Other' option in the poll and so the poll fails to indicate the percentage of Linux/Unix users who favor an editor not in the list.