Less port of http://scratch.mit.edu/discuss/topic/19929/