28 July 2010

Hey Buddy

Another draft from 3/1/08

In a chat room
x: Hey buddy
y: Dei, Now I have done laser da

x & y are Tamil people

buddy != புட்டி

i-pod

உன்னை
பாடும், உன் ipod-ம்
உன் eye பாடும்
என பாடும்


LOL. It is funny to read this, which I had saved as draft on 24/7/09. Publishing Today. :)

13 June 2010

Hackweek V


I had been toying with the idea that, to split a file on my hard-disk, I have to read and write to a new file and then truncate the old file. But isn't it lots of unnecessary I/O. I already have all the data on disk. I should be able to change the meta-data alone and mark the file contents after some length as a different file.

So during this hackweek, I implemented 2 system calls on Linux, sys_split and sys_join. And added support for these calls to the FAT file-system. http://lkml.org/lkml/2010/6/9/200 With this patch one can split a file into 2 or join 2 files without doing much I/O!

Why FAT?
Normally creating a new file and then truncating a file approach, needs temporary free space as well. I once had a need to split files when there was no free space available. On advanced filesystems, sparse-file support(i.e., files with holes) helped. But FAT does not support sparse files. Also I wanted these to work on thumb drives which are mostly formatted as FAT32.

SLE11 SP1 release
This Hackweek was scheduled to follow the release of SLE11 SP1. And all the Bangalore employees, who worked for SLE11 SP1 were given a portable 160 hard-drive as a gift in the middle of hackweek. The transcend disk has a one-touch back up button, which works to sync selected folders, using a proprietary software available only on Windows. No support in Linux or Mac.

gnireenignE one-touch button

I thought, if the button press could be detected, I could use it to unmount the disk! So I set out to reverse engineer it. Usbmon + KVM + windows XP. Got the usbmon traces. I was expecting to see a simple Interrupt endpoint. But it was a bulk end-point only interface. And the software was continuously polling to get the button status. It was quite interesting to decipher the USBS and USBC's, but the SCSI/ATAPI payload had an unknown command DFh. And I assumed that by sending the command, if a button had been pressed in between, I would get a different value. And was trying hard for hours. But failed. Then took few more traces using Windows. Tried hard. When I almost gave up, I found couple of return bytes slightly different! Voila. The return value is different, only if the button is held down during the command. Now, I have a script to sync/unmount with a one-touch button! If you have this device, you can modify the script to do what ever you want it to do. Let your creativity flow freely.

06 April 2010

English == UK || English==USA ?


I know sometimes UK is called as English. For the first time, I saw US as being called as English. So Googlificially, by default, English is US English, not UK English. No wonder there are more people in USA, India, and Nigeria than in UK, who can speak English!

05 April 2010

Who is Linux?

Yesterday, I was bored in the afternoon and had a digital camera with me. I thought of making my own steadicam, but then when I saw the tux over my TV, this contest came to my mind. And the result is an entry to the competition.

I spent only few minutes. I think it is quiet OK, given its very low production value. I am not trying to win, but just like I send crappy patches to Linux and waste kernel developers time, I uploaded it to waste 43 seconds of your time.

30 March 2010

Do you know Mahatma?

The Indian 5 rupee coin comes in so many size/shape/design now-a-days.



And it is going to be a tough task to have automatic vending machines accept them. The picture has only few types of 5 Rupee coins, I had at a time. There are many more in circulation.



Till I saw one of the 5 rupee coin which had "MAHATMA BASAVESHWARA" inscribed on it, I assumed Mohandas Karamchand Gandhi is the only Mahatma!




So who is this Mahatma Basaveshwara ? Are there any other people, who are called Mahatma? I found Jyotirao Phule.

Guess, now coins are released in memory of people, incident etc.. instead of stamps. Can you think of anything equivalent that could be done digitally? Or something is already in use?

22 March 2010

Back from National Free Software Conference - 2010

I, along with Chen, the Maintainer of Gnome Evolution project gave a talk in National Free Software Conference - 2010, Bangalore. Our talk was titled "Developing a Free software, Inside story"

I talked about who all are developing Linux Kernel, and how one can get started etc... Then Chen talked from his perspective. It was an inspiring speech, even I felt greatly motivated by him. He started with how he was excited, when he made changes to the software he used and showed it to his friends when he was new to open-source. Later he talked about Gnome and Evolution community. In the end he had lot of fans around him, and it took him nearly an hour to leave the hall after the talk!

Before our talk, we attended couple of talks. "Free Software Business Model – Software as a service" by someone from CGI. It was the usual corporate talk explaining CGI's business and then what is SaaS, PaaS, IaaS,... There was "Debate on Open Standards draft 2.4" by Venkatesh Hariharan, Policy Director, Red Hat and Prabir Purkayastha, Knowledge Commons. It was about Indian government's policies regarding mandating open standards and formats.

I came to know about this conference only 2 days ago for the first time. It was hosted by the Free Software Movement of Karnataka(FSMK), co-sponsored by Dept of IT Karnataka, Kerala IT Mission and Govt of West Bangal. The punch-line of the conference was "Free Software is the Future... The Future is ours..." I predict in future, Conferences won't provide network as everyone would have mobile Internet themselves. And this conference was ready for tomorrow already!

20 March 2010

Weird binary!!

I read about weird binary at Varun Kumar's blog (http://varunkumar-n.blogspot.com/2010/03/weird-binary.html)

Number system with base as –2 (minus two) is commonly referred to as “Weird Binary”. Like binary number system, weird binary also uses the binary symbols 0, 1. The bit positions in weird binary represent the powers of (-2). For example: 11001 in weird binary represents 9 in decimal system. Weird binary
This number system reminds me a saying in Tamil regarding tough situations, "For every foot of climbing, Slipping 2 feet". ஜான் ஏறுனா மொழம் சறுக்குது .

So How to convert from decimal to weird-binary(base minus 2)?

But I didn't want to check-out others solutions to the problem, before trying it myself. I wanted to find a pen and paper way to calculate it, similar to the one we use to convert from decimal to binary. And found it interesting!


Just at every alternate step, instead of going for the maximum multiple of 2 less than previous balance, find the minimum multiple of 2, greater than previous balance.
IOW, at alternate steps, if the remainder was 1, add 1 to next balance(quotient).

Weird-binary can be used to represent negative numbers without any special sign-bit. But I still couldn't think of any use for this negative two base system. Can you? Is it being used anywhere?