undefined symbol: _Z14lua_pushstringP9lua_StatePKc

You’ve built Lua as C or are using a liblua built as C, but trying to compile as C++.

Wrap the include with extern “C”:

extern "C" {
#include <lua.h>


vim color settings

I was having trouble applying a colorscheme in vim. I copied over my vimrc and .vim directory from another computer, but the colorscheme was not applying. All other settings from my vimrc were loading, but not the colors. If I set the colorscheme manually or re-sourced $MYVIMRC, then the colorscheme applied, so it was very strange. echoing g:color_scheme threw an error.

There was a color scheme file saved in ~/.vim/plugins instead of ~/.vim/colors from a long time ago. It had never loaded, so I forgot about it. vim must load plugins after running the vimrc file, overwriting my set colorscheme.

Runtime.exec() is not fork(2)

I had a process which would hang when executed from Java using Runtime.exec(). Running strace showed the process hanging on a write system call. The problem is that Runtime.exec() in Java does not just fork and execute a process, it also redirects stdio to the parent Java process. So using BufferedReader and Process. I just piped the stdout of the child process to System.out.

This is all explained in http://download.java.net/jdk7/docs/api/java/lang/Process.html

How to install an SSD in a Toshiba NB305 netbook

When using a solid-state disk (SSD), it is recommended to use an operating system supporting the TRIM command to prevent performance degradation. I recommend reinstalling your operating system when moving to a new hard drive instead of using disk imaging, to ensure that ssd support is fully enabled.


  1. The installation media for your operating system. You may need to create recovery media if no disks shipped with your netbook.
  2. A T-6 Torx-style wrench. These have become very common at hardware stores.
  3. A new HDD or SSD.


  • First, back up your files and settings to another computer or disk.
  • Shut down the netbook.
  • Unplug all attached devices and the power cable, and remove the battery
  • Using the Torx wrench, remove the two Torx screws on the bottom of the netbook.
  • Life the access panel from the screw side.
  • Slide the hard drive off of its SATA connectors and then remove it.
  • Slide the new disk into its place.

Put everything back together, install an operating system, and have fun. You may want to use the old hard drive as a portable hard drive using a dirt-cheap hard drive enclosure. These conveniently convert the disk’s SATA interface internally to a USB connection.

Adding AIM accounts (back) to Empathy

I use Empathy on Ubuntu and I needed to contact someone over AIM chat recently, but I had uninstalled the telepathy-haze package which is required to use AIM in Empathy.

After reinstalling the telepathy-haze package, there was still no option to add an AIM account to Empathy. Even after closing and restarting Empathy, the option was not on the menu.

After quitting Empathy again, I searched the running processes for telepathy:
$ ps x | grep telepathy
9370 ? S 0:00 /usr/lib/telepathy/mission-control-5
9738 pts/0 S+ 0:00 grep telepathy

Bingo, I need to kill mission-control-5.
$ killall mission-control-5
Upon restarting Empathy I was then able to activate my AIM account.