31 Aug 2006

thebeststuffintheworld

the best stuff in the world is the best

Beststuff

this is such a fun and useless site. vote what you think is the best stuff in the world.

out of all the review sites and meta review sites that allow people to review everything, this is one that in my opinion is the best executed and fun to use.

here's my profile.

... Read More


30 Aug 2006

ze frank's TED 2004 talk

if you don't know who ze frank is, then you're missing out on one of the best creators of entertainment and comedy on the net.

TED, a conference where people who matter give talks and share ideas on how to change the world, invited ze frank to speak. it is a very funny and interesting talk that eventually looks at what he has done to promote participatory activity on the net.

Ze Frank Boobies


this is one video of a whole series of talks that are all really insightful and interesting. see more of it on their TED blog.

... Read More


29 Aug 2006

fun with wine

there ground breaking research that proves there is a statistical relationship between the size of the "dimple" on the bottom of a wine bottle and the price of the wine.

although i prefer beer over wine, here is one trick you can't do with pint glasses:

 Modules Galerie Portfolios Album20 Abi

... Read More


29 Aug 2006

plotkit 0.9.1 bug fix release

i've just rolled up the latest plotkit from svn and made that the 0.9.1 release. it includes a bumper crop of bug fixes thanks to many contributors on the mailing list.

too many changes to list, but you can see them in the documentation page here. the release is long overdue, and everyone currently using it should seriously check this release out.

... Read More


24 Aug 2006

why rails on leopard?

matt webb has a pretty insightful article about what ruby on rails might mean on leopard. i doubt this will happen in leopard, but with the appearance of web snippets/dashcode and the news that tixe (python and webkit to enable quick app prototyping, kinda like dashboard on steroids) will be in webkit means that creating applications is just as important as using them for the mac.

in terms of a platform strategy, it is their way to gain market share. we all know why windows is able to maintain their monopoly, it is because they have a massive number of application developers. no matter how good and passionate mac developers are about their platform, there are probably more windows programmers than mac users.

although allowing html and javascript programmers to design full blown apps is a scary thought, then again, videos playing inside flash going mainstream was equally scary. stranger things have happened.

ps. i hadn't heard of tixe before now, but what a cool domain name, end.com and tixe, i suppose that is the reverse of exit?

... Read More


24 Aug 2006

notes about gentoo on ubuntu with initrd

i use ubuntu on a machine that i use for some contract work. rest assure, that is the only linux machine that is not running gentoo that i admin.

everything people say about ubuntu's installation is true, it is incredible how easy it is to install ubuntu. in fact, those people who say they accidentally fell over and installed ubuntu are not lying. i did hit one snag when i tried installing it -- i downloaded the wrong CD.

i wanted to install ubuntu on an LVM because of the nature of work i do. turns out that i downloaded and booted up with "desktop" install disc rather than downloading the "server" disc. i spent half an hour looking up documentation in which people claim that they see an LVM partitioning option that i couldn't find. i only realised this mistake after i relented and just installed it on a regular partition and left the rest of the space for the LVM.

Xen on Ubuntu

ubuntu works fine for me, and apt-get is neat until you need the latest version of something, then you have to figure out how to make your own debs. but trying to get xen-unstable to work on it was a fairly trying task. there is a lot that i can go into, but it all boils down to this fact:

"mkinitrd on ubuntu makes a cramfs image that the vanilla + xen kernel sources do not understand. instead use mkinitramfs or yaird!"

Gentoo on Ubuntu

of course, now that i have a xen-enabled ubuntu, i wanted to start some VMs to really see it in action. there are some ready made domU (the terminology for the VM) images that have gentoo on them from places such as jailtime. but where is the fun in that. so i made a LVM and extracted a gentoo amd64 stage3 into it, followed the gentoo quick install guide (it's not as quick as it used to be any more, i think there is scope for the gentoo install cheatsheet, but that is for another day.)

i hit a couple of snags while trying to get a gentoo domU working on ubuntu, so here are some tips if you too are trying to particular setup, mainly dealing with the fact that the default xen-unstable kernel compiles everything as modules, so you will need to use an initrd:

1. use mkinitramfs rather than yaird when making the domU initrd.

problem with yaird is that it hardcodes the root device in the init script rather than getting it from the kernel boot params. mkinitramfs does the right thing, but it isn't quite enough. (see below)

2. do not include every module under the sun in your initrd

when making an initrd for your domU, be careful not to use the default mkinitramfs settings on ubuntu which just includes all your modules into the initramfs, which results in a 6M ramdisk image. that is just too big and will result in a kernel panic when you boot up your domU.

so try manually listing the modules by replacing MODULES=most with MODULES=list in /etc/mkinitramfs/mkinitramfs.conf and manually list the modules you think the domU will need /etc/mkinitramfs/modules. remember it is a domU, so it hardly needs any of the drivers apart from the bare minimum.

3. ubuntu's initrd script will conflict with gentoo's startup

ubuntu's init script in initrd will mount /proc and /sys when it mounts the root partition, and gentoo's init does not like that at all. i personally think that gentoo's init should be able to cope with that, but there may be a good reason why it doesn't. the solution here is to add an extra cleanup script just before it boots into the gentoo rootfs. i had to add a script in /etc/mkinitramfs/scripts/init-bottom, which as the name suggests, runs the script at the end of the whole init process.

#!/bin/sh -e

PREREQ="udev"
# Output pre-requisites
prereqs() {
echo "$PREREQ"
}

case "$1" in
prereqs)
prereqs
exit 0
;;
esac

umount /sys
umount /proc
# clean up after ubuntu's initramfs
umount ${rootmnt}/dev/.static/dev

4. ubuntu's utf-8 vs gentoo's ascii terminals

ubuntu does the right thing (in my opinion) to have utf-8 in alot of places. one snag i hit was that my terminals were all supporting utf-8 encoding while gentoo's default terminal encoding was ascii, this meant that certain punctuation were appearing as weird characters. the solution here is to get into /etc/rc.conf and change UNICODE to equal "yes".

... Read More


24 Aug 2006

ukonline rocks!

we've been using ukonline for our ADSL at home because it was the cheapest when we first signed a 12 month contract (but they had to drop the price a month after we joined).

we started off with a 1Mbps for £14.99, and then after a month, they dropped the price of 2Mbps to £14.99! anyway, the one year contract is up, so i went online to see which number i should call to hassle them about upgrade. turns out that you can get upgraded in 4 steps on their web site. i did this yesterday night and tonight i already notice my connection is up to 2Mbps! awesome!

of course, this is nothing if you think about how 6 years ago i was using 3Mbps cable internet in australia for AUD$70/month, which is around £25/month, and you can get 100Mbps in HK for the same price.

now it only takes a measly 3 days to download all those DVDs instead of 6! (of course i'm kidding..)

... Read More


21 Aug 2006

british kaiten sushi

i was in london on saturday having some kaiten sushi (sushi train for the uninitiated). each plate was £1.50 or you could have unlimited for £14.

i couldn't resist having one of these british sushi delicacies:

Prawn Sushi

i counted, there were five pieces, which means each piece is worth 30p. what a bargain.

... Read More


14 Aug 2006

python 2.5 beta 3 ebuilds

i've been playing around with python 2.5b3 in the past week. i've have a set of updated patches and ebuilds in my overlay, but they should make it into portage hard masked sooner or later.

some highlights, even though i haven't used any of this in code that i write:

1. ternary statements (like in C's int a = b ? c : d). the new syntax is `x = true_value if condition else false_value`. i haven't had the chance to use it properly, but i would probably use it like this:

>>> x = {}
>>> y = 1 if x.get('y') else 0
>>> y
0

2. partial functions. this is quite cool because it means finally we can have proper partial functions, not like the interesting currying methods used in things like django, and demonstrated on the activestate pages.

3. try: except: finally: now works like java's exception handling. this was one of the things that irked me about python with their condition that finally and except cannot mix.

4. elementtree and sqlite are now part of the standard library. that is great because i do all my XML parsing in elementtree, so now i don't need to install it everywhere. sqlite is a nice addition, it will be a good alternative to berkdb and gdbm that is already in python standard lib.

speaking of new python features, i've only just really started getting the concept of decorators (introduced in 2.4). they're pretty awesome once i finally got my head around getting to work (which involves a decorator-function that returns a decorated-function calling the decoratee-function!)



... Read More