getting into android
I am a late comer to the Android craze. I got to play with one recently at the Linux Symposium in Montreal, and I decided I have to get one. I ended up picking up a pair from ebay – one to hack on, and one to carry in my pocket. I’d like to work on the core platform and not so much the apps. Anyway, my storey is boring so far. Below are the interesting links I found so far while researching the platform.
importing an old project into git
I have recently been asked to revive an old project. Way back when I used to use bk for tracking changes. But today, I don’t even have a working bk tree. Moving the history to git is easiest done by taking the tarballs I’ve published and creating a commit per tarball. Below is a simple script that will do just that.
Why pick Git?
Someone on the Git LinkedIn group asked “why pick Git?”. I started writing a response on LinkedIn but quickly realized I had more to say on the topic than I’d care to leave behind closed doors of LinkedIn. If you already use Git, none of the stuff I talk about below will surprise you. But if this sparks your interest see my Git talk.
select loop for X events
I am not a huge fan of threading when it can be avoided. I always thought that it was OK for GUI programs to be threaded. I just discovered that you can handle X events from a select loop. dis = XOpenDisplay(DISPLAY); fd = ConnectionNumber(dis); FD_SET(fd, &in_fds); select(fd+1, &in_fds, NULL, NULL, NULL); ...
portable printf
I was squashing some warnings in [uzbl]{tags/uzbl} code: printf("set %s = %d\n", (char *)k, (int)*c->ptr); Ignoring the fact that, at first glance, it’s weird to cast a pointer to int (ptr is defined as void**), compiling this code on 64bit would warn you that you were casting a pointer to an int. That’s because a pointer is 64bit and an int is 32bit.
switching to uzbl
I’ve been using vimperator for a long time now. I love this firefox plugin, but firefox is pretty slow at times. Today I decided to more seriously look at uzbl. I am surprised how much I like it. I’ve put up my configuration on github and will try to blog about it again as I convert more of my usage to uzbl.
Linux Symposium
I will be attending the Linux Symposium/2009 in Montreal in under a month. It’s been for for 11 years now, and I am looking forward to the break from work. I hear that the conference is not yet sold out… so you can still attend.
bringing git-format-patch to bzr
It should be of no surprise to readers of this blog that I am a fan of Git. If you know me, you will also know that I am no fan of Bzr. I was working on something today and wanted to export a patch… you know, like git format-patch does. Well, bzr does not seem to have an equivalent.
nfs local caching with fscache and cachefilesd on Lenny
The idea is to put a caching layer between filesystems, that tend to be slow, and the user, who is impatient. This is accomplished by the fscache kernel module, and the cachefilesd user space daemon. The kernel module intercepts what would be disk/network access and redirects it to the daemon. The daemon uses local media, which supposedly is faster, to cache recent data. The new Linux native implementation is very generic, and can be used to accelerate anything like floppies and CD-ROMs. I am interested in this because I find NFS slow. Read more about it at Linux Magazine.
Scott Chacon smacks git around
I came across a RailsConf talk given by Scott Chacon last month. As previously, his git work is really good. His presentation style has also guided my Git the basics talk which I gave about a year ago. Anyway, I want to summarize what I learned from Scott’s presentation…