When is a Closure not a Closure?

July 22nd, 2008

Answer: When it’s a PHP closure. It appears that PHP will have closures in 5.3. But as per usual, it does not work in ways that you would expect it to work. See the comment by “sapphirecat” on this . There still appears to be a problem when you “rope” off a global:

So they seem to have taken the usual half-broken approach: you can have read-only closures which are immune to changes to a global variable, or you can have read-write closures which remember changes, but those changes leak back into the global variable.

Oops! Closures are not supposed to do that! It sort of defeats the purpose of having closures in the first place. There is a workaround to the problem but that is one more quirk that you have to remember when working with PHP. Two steps forward, one step back.

Radiohead - House of Cards Music Video

July 15th, 2008

Radiohead’s House of Cards music video is made of awesome.

Google Code has a behind the scenes look at the technology and techniques used in making this video.

The Mysterious “Search Page”

July 15th, 2008

I was working on getting the latest GTK# to compile from source using Microsoft’s tool chain the other night. I eventually gave up because of too many errors that I just did not want to take the time to fix. However, while I was coercing the build environment trying to get things to work I kept typing “vim” out of habit on the Windows CMD window. Eventually I got tired of trying to remember that I must use either Notepad or Wordpad. So I decided to download and install Vim for Windows. I typed in vim.org on my browser’s address bar and this is what I got:

This shows up instead of the real vim.org home page.

I have seen this page before. Berger had the same problem when we were moving our arsenic.ph domain to our shiny new server. Here’s what he was getting at the time:

Berger\'s Arsenic.ph \"Page\"

It also appears that we were not the only ones affected by this issue. There are others who are also getting this strange page.

Read the rest of this entry »

Updated encfs Source Packages for Arch Linux

July 13th, 2008

So I wanted to decrypt an encfs encrypted directory on my laptop recently. I was greeted with the following error:

encfs: error while loading shared libraries: librlog.so.1: cannot open shared object file: No such file or directory

It turns out that there has been a recent update to rlog and the encfs package was somehow left out of the rebuild. It also appears that the encfs package has disappeared from the Arch Linux Community Repository.

I have been rolling my own Arch Linux packages for quite a while now. I have been using a few locally built packages on my system. Since I already have two custom packages that I wrote myself, I figured it would be a good idea to share them. I’m too lazy to register with AUR and upload these packages and it would be likely that I would forget about updating them as well. So I am posting them here for consumption by the general public.

Download the Arch Linux source package for encfs here. To build this:

  1. Make a directory to hold the files contained in the encfs source package.
  2. Unpack the tarballed source package into the directory you created.
  3. Install boost. Boost is a C++ library that is used by recent versions of encfs. You will also need to install fuse in case you don’t have it yet.
  4. Change into the encfs source package directory you made and run makepkg -c. This will download the source for the current version of encfs. When makepkg finishes you will end up with an installable package in your current directory.
  5. Install the package using pacman encfs-1.4.2-1-i686.pkg.tar.gz (replace encfs-1.4.2-1-i686.pkg.tar.gz with the correct filename for your custom-built package.)

There you go. You should have encfs working now.

You can also find pyme in my AUR directory.