Productivity tools

I recently set out to refresh my systems and update any software that I use to later/more interesting versions. I have been using PmWiki for a long time for my notes, but I always wanted a To-Do list program. I now use mytinytodo, which has a simple interface and is backed by SQLITE on a PHP server. Similarly, my calendar is synced through Baïkal calendar.

The server stack is Debian Linux/Apache/PHP and SQLITE. The whole thing runs on the SheevaPlug. I synchronise it with my laptop using Unison-gtk.

Reusable glass bottles

I recently came across this website, which reminded me of an idea I had a while ago. I personally think the phonebloks idea is not technically feasible at the moment, but I wanted to share my own idea about glass bottles. This post should be regarded as a living draft, and I will improve it if I receive advice/opinions.

My idea would help to reduce the use of plastic in making bottles, and to enable reusable glass bottles to become the norm.

There should be a standard, agreed by several companies that supply the consumer market, that defines 3 (or 5? or more?) sizes of bottles, that cover for example small (100mL), medium (500mL), large (2L), where these are used for everything. Instead of everyone designing their own bottles to stand out, everyone uses the same bottles that are interchangeable.

Of course we could have some special features to identify edible from inedible bottles very clearly (which immediately doubles the number of possible sizes), for example by having a different cap size, etc.

The companies will  complain that they want their own products to stand out – let them do what they want, but *we the people* can also vote with our feet and our wallets.

At a sweep, glass bottles will be reusable across the consumer market with simple washing/boiling, rather than having to be melted and re-cast.

In fact, the long lasting plan means they can invest money in making the bottles unbreakable, or shatter into small pieces.


The Gay Holocaust brewing in Russia

While I am very upset with what is happening to the LGBT people of Russia, I won’t try to summarise the story myself. I’ll simply quote a more eloquent man, Stephen Fry. Source: pinknews.

Dear Prime Minister, M Rogge, Lord Coe and Members of the International Olympic Committee,

I write in the earnest hope that all those with a love of sport and the Olympic spirit will consider the stain on the Five Rings that occurred when the 1936 Berlin Olympics proceeded under the exultant aegis of a tyrant who had passed into law, three years earlier, an act which singled out for special persecution a minority whose only crime was the accident of their birth. In his case he banned Jews from academic tenure or public office, he made sure that the police turned a blind eye to any beatings, thefts or humiliations afflicted on them, he burned and banned books written by them. He claimed they “polluted” the purity and tradition of what it was to be German, that they were a threat to the state, to the children and the future of the Reich. He blamed them simultaneously for the mutually exclusive crimes of Communism and for the controlling of international capital and banks. He blamed them for ruining the culture with their liberalism and difference. The Olympic movement at that time paid precisely no attention to this evil and proceeded with the notorious Berlin Olympiad, which provided a stage for a gleeful Führer and only increased his status at home and abroad. It gave him confidence. All historians are agreed on that. What he did with that confidence we all know.

Putin is eerily repeating this insane crime, only this time against LGBT Russians. Beatings, murders and humiliations are ignored by the police. Any defence or sane discussion of homosexuality is against the law. Any statement, for example, that Tchaikovsky was gay and that his art and life reflects this sexuality and are an inspiration to other gay artists would be punishable by imprisonment. It is simply not enough to say that gay Olympians may or may not be safe in their village. The IOC absolutely must take a firm stance on behalf of the shared humanity it is supposed to represent against the barbaric, fascist law that Putin has pushed through the Duma. Let us not forget that Olympic events used not only to be athletic, they used to include cultural competitions. Let us realise that in fact, sport is cultural. It does not exist in a bubble outside society or politics. The idea that sport and politics don’t connect is worse than disingenuous, worse than stupid. It is wickedly, wilfully wrong. Everyone knows politics interconnects with everything for “politics” is simply the Greek for “to do with the people”.

An absolute ban on the Russian Winter Olympics of 2014 on Sochi is simply essential. Stage them elsewhere in Utah, Lillyhammer, anywhere you like. At all costs Putin cannot be seen to have the approval of the civilised world.

He is making scapegoats of gay people, just as Hitler did Jews. He cannot be allowed to get away with it. I know whereof I speak. I have visited Russia, stood up to the political deputy who introduced the first of these laws, in his city of St Petersburg. I looked into the face of the man and, on camera, tried to reason with him, counter him, make him understand what he was doing. All I saw reflected back at me was what Hannah Arendt called, so memorably, “the banality of evil.” A stupid man, but like so many tyrants, one with an instinct of how to exploit a disaffected people by finding scapegoats. Putin may not be quite as oafish and stupid as Deputy Milanov but his instincts are the same. He may claim that the “values” of Russia are not the “values” of the West, but this is absolutely in opposition to Peter the Great’s philosophy, and against the hopes of millions of Russians, those not in the grip of that toxic mix of shaven headed thuggery and bigoted religion, those who are agonised by the rolling back of democracy and the formation of a new autocracy in the motherland that has suffered so much (and whose music, literature and drama, incidentally I love so passionately).

I am gay. I am a Jew. My mother lost over a dozen of her family to Hitler’s anti-Semitism. Every time in Russia (and it is constantly) a gay teenager is forced into suicide, a lesbian “correctively” raped, gay men and women beaten to death by neo-Nazi thugs while the Russian police stand idly by, the world is diminished and I for one, weep anew at seeing history repeat itself.

“All that is needed for evil to triumph is for good men to do nothing,” so wrote Edmund Burke. Are you, the men and women of the IOC going to be those “good” who allow evil to triumph?

The Summer Olympics of 2012 were one of the most glorious moments of my life and the life of my country. For there to be a Russian Winter Olympics would stain the movement forever and wipe away any of that glory. The Five Rings would finally be forever smeared, besmirched and ruined in the eyes of the civilised world.

I am begging you to resist the pressures of pragmatism, of money, of the oily cowardice of diplomats and to stand up resolutely and proudly for humanity the world over, as your movement is pledged to do. Wave your Olympic flag with pride as we gay men and women wave our Rainbow flag with pride. Be brave enough to live up to the oaths and protocols of your movement, which I remind you of verbatim below.

Rule 4 Cooperate with the competent public or private organisations and authorities in the endeavour to place sport at the service of humanity and thereby to promote peace

Rule 6: Act against any form of discrimination affecting the Olympic Movement

Rule 15 Encourage and support initiatives blending sport with culture and education

I especially appeal to you, Prime Minister, a man for whom I have the utmost respect. As the leader of a party I have for almost all of my life opposed and instinctively disliked, you showed a determined, passionate and clearly honest commitment to LGBT rights and helped pushed gay marriage through both houses of our parliament in the teeth of vehement opposition from so many of your own side. For that I will always admire you, whatever other differences may lie between us. In the end I believe you know when a thing is wrong or right. Please act on that instinct now.

Yours in desperate hope for humanity
Stephen Fry


Yesterday, my boyfriend Dan and I graduated from the University of Exeter. Dan obtained his MMaths (First Class) in Mathematics, and I got my Doctor of Philosophy degree in Physics. Dan’s parents took us out to dinner the night before, and then we all had fun on the day itself.

Dan looking like a scholar.

Dan looking like a scholar.

Dan and I got some couple pictures for our mantelpiece, for the day when we can afford one.

Dan and I.

Dan and I.

Dan and I.

Dan and I.

Despite his general forgetfulness, my PhD professor, Frédéric Pont remembered to attend the ceremony (he came all the way from the mountains of Switzerland!), and had to wear an even more ridiculous costume than I did. I don’t think I would have put up with the two hours of pomp myself, just to see my student graduate!

My professor Frédéric Pont and I.

My professor Frédéric Pont and I.

Dan’s parents didn’t like the heat very much. Nobody else did either.

Dan and his parents.

Dan and his parents.

The Chancellor of the University of Exeter, Floella Benjamin, told Dan to go be a superhero and change the world. As a first step, Dan had to practise his flying skills.

Dan as a superhero.

Dan as a superhero.

No faith in science


Scientists question everything. (source)

During past discussions with scientific creationists, religious supremacists and other cranks in general, I have been accused of having faith (in the religious sense) in science. I would like to clear up this misunderstanding now.

I do not have faith in science. I prefer to describe my world view as engaging with reality. For the purpose of any communications I engage in, I define reality as that which is described by multiple independently reproducible and consistent pieces of evidence.

Faith, as it is generally understood in the religious sense, requires the adherence to a belief without, or in spite of the available evidence.

As Bertrand Russell explained many decades ago, the purpose of science is not to construct new dogmas that will be held beyond criticism forever, but to build models of Nature that are consistent with the observations that are available at the time, with the explicit understanding that these models will be modified by successively better approximations as new observations are made.

Scientists do not believe in the theory of evolution by natural selection because of their faith in science. They believe in the said theory because of the overwhelming evidence available to support it.

The only premise of science is that we have to look at the observations. If repeated observations lead us to discover rules that link certain observations consistently, then this is something useful. We usually call it a law of physics, a scientific theory, etc. That is how science really works.

Recommended reading:

This blog post by Phil Plait on Discover Magazine covers the same topic.


I have played with GPU computation using CUDA on my desktop computer, where I have an old 16-core NVS290 graphics card. Recently, I wanted to play with CUDA on my Mac Book Air, which unfortunately does not have an Nvidia graphics card. I turned to the emulator gpuocelot, but I did not manage to install it on OS X Mountain Lion. Eventually, I managed to get it to work in a Linux installation (Debian 7, Wheezy) inside Virtual Box.


(TBD) These versions worked for me. I had trouble using Cuda 5.0 and the latest gpuocelot (and the 2011 release version for that matter).

  • Debian 7.0 Wheezy
svn checkout gpuocelot-read-only

Shrinking the virtual hard disk (vdi file)

I used a dynamically expanding virtual disk in Virtual Box. Unfortunately, after a few hours of installation and attempts to compile different versions of gpuocelot, I ended up with a large vdi file, which does not shrink automatically when the unwanted files are deleted. So I had to perform the following steps to reduce the filesize back to the real amount of space used.

I booted the virtual Linux installation in the normal way, and installed zerofree, which fills in the unused portions where the ghosts of deleted files remain, with zeros. Installing zerofree on Debian:

$ sudo apt-get install zerofree

You cannot run zerofree on a running system with the hard disk mounted as read-write. You need to reboot into single user mode, and change the boot parameters to the kernel. I rebooted the virtual machine, and selected the e key before the GRUB boot menu timed out. This allowed me to edit the boot commands. I selected the kernel line, and added


to that line. Then I followed the on-screen command for booting. This dropped me into a single-user command line, with the hard disk mounted as read-only. I ran zerofree on the hard disk

# zerofree /dev/sda1

and then turned off the virtual machine when it was done. Now the virtual hard disk was properly prepared for the compacting part of the process. I opened up a terminal on OS X, and navigated to the vdi file. I ran the following command:

$ VBoxManage modifyhd e3516052-6028-4b29-be25-88975adb3676 --compact

to do the job. The hexadecimal name is the UUID of the hard disk, as reported by

$ VBoxManage showhdinfo Debian.vdi

where Debian.vdi is my virtual hard drive. This allowed the hard disk image file to shrink from 11 GB back to the 3 GB that was actually used.

Yet another blog system

I have now finished my PhD at the University of Exeter, and will be moving on to something even more interesting soon! This blog will chronicle my hobbies/thoughts over the next few years.

This time, I am using WordPress, instead of hand-coding, wiki, or Habari blog. The main reason is that for a long time, my blog was hosted by a friend, and I did not have access to the MySQL database, so I couldn’t use WordPress. When I moved to my own hosting account, I couldn’t be bothered to change from Habari to WordPress, so I left it as it was. Now that I have some time on my hands, I’ll set this up to use WordPress.

You can still access the old pages at this link: Ancient versions.