An illustration of the speed advantage of Python builtins
As a followup to my entry on the two sorts of languages , I decided to actually tryimplementing the string .find() method in Python to see how muchslower it is. The Python version uses the brute force C style approach,roughly:
for i in range(0, len(src)-len(sub)+1): if src[i:i+len(sub)] == sub: return ireturn -1
I actually did three versions, each with a different
少扣帽子,再談spin doctor
搞文學的人最怕重複,重複是因為被扭曲和無回應。扣帽子和假溝通的麻煩在於,它令所有的東西重複。不少人search「spin doctor,spin doctor」到此,大概很難接受世上真有人這樣姓屈,光天化日把人家沒說過的話塞到人家口裡。 spin doctor, spin doctor
My likely Firefox 3 extensions
My current personal version of Firefox is more than a little bit behindthe times, so I've been looking at upgrading to Firefox 3 (I compilemy own version with various hacks, and it's easiest to build from thebleeding edge CVS sources). As a result, I spent part of today tryingvarious of my essential extensions to see which ofthem still work.
Here's the current state of affairs:
- NoScript has beenupdated for the current Firefox 3 beta and works fine. It'
賣書之二(危樓狀態)
我最恨就是買重複書!
從上至下:
1. 《麻不甩》 ,鄒凱光著,輕鬆小品。是的,我什麼書都看。九成新,原價$68,現價25。這種書,最好就是買二手了。
2. 《「惡女」是這樣誕生的》 ,封面銀色反光,是為了反映我作
funny games
終於看了這電影
1997年的戲
現在才找到
足足錯過了10年
看時才知此片男主角就是"竊聽者"的男主角
女主角則是"鋼琴教師"那位女主角
真是超勁的組合
雖然早已知道故事內容
但看的時候依然震憾和不安
導演 Michael Haneke 真係勁
2
尊重的困惑
人人都知道尊重別人很重要,但大家總是會不自覺地傷害他人,傷人的方式
速度的壓力
現實就是超現實
——
Two sorts of languages
Here is a thesis:
There are two sorts of languages: languages where writing your own codeis (usually) almost as fast as using the builtin features, and languageswhere the builtins are an order of magnitude faster than doing the samework in your own code.
C is an example of the first sort of language; it is merely silly, notlaughably absurd, to reimplement your own version of strchr() . Pythonis an example of the second sort of language; it's utterly stupid towrite
電影節心水
周防正行潛伏十年之作.
19/3 林賽安德遜永不言悔 7:15 SM
Never Apologize. 君可見哪位導演有如此風骨?
20/3 警察樂隊來訪時 GC 7:45 PM
題材包含戰爭、和平和音樂的以色列電影
22/