A bash irritation

Presented in illustrated form:

; cat foo#!/bin/shcat "$@"; ./foo /etc/termcap | sed 1q >/dev/null./foo: line 2: 3632 Broken pipe  cat "$@"

This behavior is new in Bash 2, as far as I know. I find itextremely irritating, because programs having broken pipesis perfectly normal in Unix. Many filters and so on don'tconsume all of their input, and


A pleasing Python regularity with __future__

The other night I was writing a Pythonprogram that wanted to divide two integers and get a floating pointresult. Normally integer division in Python produces integers, followinga C style model of distinct numeric types; however, Python is slowlymigrating towards a model where the types of numbers are more of animplementation detail.

The general way to get early access to an incompatible change likethis is a magic statement at the start of your module: from__future__ import whatever . I knew that the change in


Some quick SMTP connection statistics

Recently I've been wondering about the usage pattern of zombie machines.Do spammers typically make only a few connections from each zombie andmove on, or do they use the same machines over and over?

Through my weekly spam stats I know thatsome machines that we reject at connection time try again and again.But what's the distribution like? For example, do most IP addressesget refused once or twice and then go away? So I grabbed our logs andstarted looking.

All of these figures are


五四


前天接受某青年社團訪問,主題是對“五四”,因為對方是十多年前與我一起在紅街市青少年牧民中心文學小組認識的朋友,我也就試著去亂講一通。

“五四”對我來說最大的影響是一大批出現在“新青年”雜誌上的作品,訪問

“文學小組”舊憶

大一那年,在同學的介紹下參加了紅街市青少年牧民中心文學小組,度過了一段很愉快的學習時光。

初到牧民中心就被圖書館的文學書吸引了,我記得我是在這兒“邂逅”西西小說的。“文學小組”是其中一個興趣班,當中的學

2006046網摘 – 韓流降溫

探討韓流降溫


Some things about smpatch

smpatch is the official Sun thing for dealing with Solaris patches forSolaris 8 and 9 (Solaris 10 apparently has an all new system, hopefullybetter). I got interested in smpatch not just because it's the officialSun tool for this stuff, but because it has one feature that pca doesn't: it can reliably tell whatpatches are safe to be installed on a live multiuser system.

(While pca can skip patches that require reboots, it doesn'tcurrently have a 'skip patches that


小遊東龍洲

假期去了東龍洲,行了兩個小時左右,到了炮台遺址,拍了些沿途風光。現試用 23hq 的服務,相關相簿到 這裏 。

The other dynamic linking tax

I've already talked about one dynamic linking tax , but here's another one.Presented in illustrated form:

; cat true.c#include int main(int argc, char **argv){    exit(0);}; cc -o true true.c; cc -o true-s -static true.c; diet cc -o true-d true.c; ls -s true true-d true-s  8 true    4 true-
                    
                
                
                    
                
            
            
            

Keeping up with new Python features

I have a new resolution: every so often, I'm going to read over thecurrent builtins section ofthe Python documentation.

I've come to this because recently I was reading through a page onPython idioms to see ifit had anything new, and stumbled over the mention of an enumerate() builtin, new in Python 2.3. Well, I'm using Python 2.3, and I hadn'tremembered enumerate() , and I could have used it recently. Whoops