dict.setdefault() as a concurrency primitive

One of the things I do in the back of my mind is to keep my eyes openfor Python things that could be useful for concurrency (especiallysince I still have a concurrency problem that Ihave to solve one of these days). Because of what the GIL protects , one of the useful things to look for isinteresting operations on builtin types.

All of which is a roundabout way of saying that it recently struckme that dict.setdefault() is a limited test-and-set operation .All


本週末變態日程

7月26日星期六
1130-1330 葉輝 主講「開卷與開懷——讀書人的EQ管理」,鄧小樺主持,書展會議室406-407
(呢個題目,有乜可能唔係玩我呢?)

1430-1600 張大春主講「華文世界語境的衝突和交流

無聊抒發篇

1) 不看《功夫熊貓》的原因:

熊貓是世界上最可愛的動物之一,它是這個樣的

而不是這個樣的!!!!





















2) 兩宗因新聞采訪引發的動粗事件的啟示


北 京 採 訪 搶 購 奧 運 門 票 now 記 者 遭 公 安 粗 暴 對 待



女兒李嫣遭拍,李亞鵬向記者動粗

Birth

My colleague raised questions about the developmental milestones of babies and toddlers this afternoon. Can we imagine what we are able to do after birth? To be honest, not much.

As I reflected on what I managed to do after birth – I had premature birth - I was drawn back to those scenes of National Geographic, where a newborn elephant (not to mention our immediate ancestors chimpanzee) is able to walk with the herd and hold onto his mother on the very first day of life.

To that matter, what

書展遇上渣


你就開心啦,有動漫Maggie陪你!

同場加映 —— 有兩名青春玉女在我身旁低呼:「咦!追渣沽呀。」


點解搵隻猩猩王扮Phil Collions打鼓會贏今年Cannes最佳廣告片大獎?

這是今年康城廣告獎的最佳廣告片大獎得主,作為廣告行中的最高榮譽,頒獎禮後很多人都覺得不以為然,更有很多人看完覺得不明所以,覺得這條來自英國的廣告片,有乜咁特別,唔通真係文化差異?

究竟吉百利朱古力同隻扮


2008書展心頭肉

書展兵荒馬亂,我總是忍不住害怕,以致於躲在路邊靠牆坐下,就看書。今年的三本書總算是出來了,死死活活總算出來了。對出版社盡自己的責任,推廣開始。請大家熱烈尋找以下可能被忽略的非暢銷類書籍,或者在書展,或
Continue reading...

How packaging systems should handle kernel updates

As a system administrator, I have some relatively strong opinions on howLinux distributions and packaging systems should handle kernel updates.Since I have just gone through the experience of yet another mass kernelupdate of our servers, I feel like writing them up:

  • you should be able to have multiple kernels installed at once.
  • it should be easy to tell which package's kernel you are running,and thus whether or not you are running the most current kernel.
  • installing a kernel update should never overwrite an existingkernel image;

One thing that I dislike about typical debuggers

One of the things that I hate about typical debuggers is that they wantme to hold their hand all the time. Okay, this is not entirely fair;they default to having me hold their hand, and generally don't do areally good job of supporting hands-off operation.

This is not really their fault, because debuggers have a differentview of how they're going to be used than I do. A classical debugger(like gdb ) expects to be used by people who are carefully narrowing


大娛樂家-(第6集)

大娛樂家-(第6集)

梁朝偉、劉嘉玲拜{啫}神勁搞笑

袁彌明大爆港姐內幕

袁彌明鬧爆新晋{才}女 ,都有贊既