Why you can't use object.__new__ on everything

Here's an interesting error message, somewhat slimmed down:

>>> object.__new__(dict)
TypeError: object.__new__(dict) is not safe, use dict.__new__()

At first blush this seems a peculiar artificial limitation: object isthe root of the Python type hierarchy and thus its __new__ is theroot version of creating new objects, so why doesn't it work?

Like the last peculiarity this


空姐不想做空姐了

空姐不想做空姐了。

空姐每次踏入機艙,便開始掛念她的家人、她的朋友、她愛的人... ... 空姐一點都不愛香港,但她愛的人都在這裡,她甚麼地方都不想去。

空姐不想每天機械化地問:"Would you care for a drink?" "Would you care for chicken

位處不公平之地就須面對不公平的結果

儘可能依照下過的決定,儘可能不收回自己說過的話。而且,決定早就下了,合乎原則,照顧感性。無修改的理由(reason)。

而在不公平的地方就會有不公平的結果,或者此後需要咀嚼此果多年,任人說難聽的、不合理的話。這裡

A small update on comment spammer behavior

Back in CommentSpammerBehavior I wrote that checking the HTTP Referer header wasn't worthwhile because everyone got it right. That is nolonger true; a significant number of comment spam attempts come fromsome group that is using HTTP Referer headers of the (illegal) form'URL1, URL2, ..., MyURL' (where MyUrl is the URL of my 'write a comment'form); the number of URLs varies.

(A few times they have left out the spaces after the commas, making


ZFS's issues with long term storage management

Unfortunately, one of ZFS's current issues is that it does not have anydirect support for the sort of data migration you need to do for longterm storage management . There arethree possible approaches to this:

  • direct migration support: not present.
  • growing a pool with the new storage then shrinking it by removing theold storage: while ZFS can grow pools it can't shrink them.
  • add the new storage as a mirror and then detach the old storage: youcan't mirror raidz or raidz2

Painless long term storage management without disturbing users

One of the things I have become conscious of recently is that managingyour storage over the long term without lots of pain and withoutdisturbing your users requires an additional set of features that youmay not realize you need. (Partly I came to this realization by blithelyproposing a design for our next generation of storage without reallythinking about the issues, and then having people gently point out theproblems I had missed.)

(By 'painless' I mean that it does not take a lot of sysadmin effortto deal


The advantage of a SAN

It's simple: the advantage of a SAN is that it decouples your storage spacefrom your servers .

This means that you can deal with each side independently; you can addstorage or move storage without having to change the server hardware,and you can replace (and add) servers without having to do anything toyour disks. In turn this means that you can use common garden varietyservers instead of big monster servers that are designed to hold loadsof disks, which means it is much easier to maintain and


official saying


本人髮型的比喻包括:
.曹汶(本人發明,智海引為知言)
.貴婦(想稱讚又要扮cool者如謝某)
.美杜莎(學院派尤其文學系專用,如練仙和蠢材張某)
.戴左棵樹上個頭度(本人發明,受到artist 阿wing大力認同)
.法官(葉寶琳,
Continue reading...

流行曲接龍(不置頂了)

在豆瓣那邊看到愛看電影小組裡的 電影名字接龍遊戲 ,覺得好好玩好羨慕,只是因為電影的大陸譯名,有點隔閡。於是在香港文學小組開了一個 文學作品的接龍 ,興奮而混亂,組裡的人沒有參與forun習慣的事一目了然,但我還是覺

良好失眠

1. 友誼差距

我的數碼相機裡保持著兩幅相,讓每個人都爆笑:一是我把葉寶琳拍成這個樣子(如圖):
緊接的一張是她把我拍成 這個樣子 。真是那個樣子的。枉我還送她人皆艷羨的小背心。



2. 按摩的力量大概維持兩天,本人