One complexity of buffered IO on Unix

It is surprisingly challenging to get buffered IO completely correct onUnix, and one area that trips people up is correct handling of EOF. Yousee, there's an important different between EOF on files and EOF onterminals, as a consequence of how terminals generate and signal EOF : EOF on files is persistent, but EOF is onterminals is not.

If you read repeatedly from a file that has hit EOF, you will almostalways just get another EOF. But EOF on terminals is a transient thing,so


Be water my friend

這是很多很多年前的一段李小龍訪問片段,如今已變成經典。

最近看到有人用Kinetic Typography的手法,再次演繹這番話的意義,奧妙但不深奧。


今個星期日-有線節目《週日不講理》

與黃真真導演談香港女人心目中的理想男人.


最近在拍攝亞視環保節目《智慳任務》的其中一集.

將會主持有線電視全新節目, 遲d公佈詳情.

同時在處理 mi ming mart的大小事務, 所以最近比較忙.

大娛樂家-(第69集)












2009-10-14
主持人: 蕭定一, 袁彌明, 愛明
主題: 大娛樂家-(第69集)
Continue reading...

Arrivederci, USA! (Salve Italia!)

On October 19, 2009, the Redemptorist priests will hold their 2009 General Chapter in Rome, Italy ( Zenit news story ), and, since they thousands of priests and missionaries spread throughout the world, they decided to stream the events of the General Chapter online ( Ustream channel ). Through a series of wonderful events and conversations, I was eventually invited to help the priests with technical aspects of said streaming, and thus, I am headed over to Rome this morning.

I will


給天國的DK

Dear Donald Kwan,

雖然我跟你從沒有真正見過面, 但我的心告訴我, 我要走這一趟.

我不是沒有去過殯儀館. 出席不是親人的葬禮, 卻是第一次. 由我出發到紅墈的一刻開始, 心忽然驚恐起來. 想起你欣賞的《 禮儀師の奏鳴曲 》, 還有甚

台山阿嬸大戰黑人阿姑

集衝突,挑釁,暴力,民族感情,袖手旁觀,推波助瀾於一身
看來世界和平真是一個時時都要掛在口邊的理想


Why 'invite-your-friends' features are spam from you, not your users

Here is at least a superficially appealing question: why is the endresult of giving your website an 'invite-your-friends' feature spamfrom you , as opposed to spam from your users andthus not your responsibility?

(For the moment, let's set aside WordsForWebmailProviders .)

There is clearly a continuum of email responsibility that runs from'email you send unprompted' (which is clearly your responsibility),through 'form letters that your users ask you to send' to 'you're an


東亞運超人


尹光,有創意,我鍾意,正呀


兩生花

先容我說︰「如果我不是我,會怎麼樣?」

沒頭沒尾的一句,來自於我坐車時的幻想,即是假如這個我,只是較早前才由第二個人身上轉過來,不過和新身體的記憶搭上了,所以就滿以為我一直是同一個人,說不定我可以勾起前