Some regular expression performance surprises

Part of the fun of performance tuning is all of the unexpectedthings you find out. Since I spent some of yesterday doing work in the guts of DWiki 's DWikiText toHTML conversion, what I've been finding is some regular expressionperformance surprises.

My big surprise was the relative performance of ' [A-Z] ',' [A-Z][A-Z]* ', and ' [A-Z]+ ' for scanning text where they didn'tmatch (the


專欄的難度


明天又要交稿
我還可以寫什麼(而不覺得無聊)
陷入嚴重的創作困境
重看2005年寫過的專欄文字(都很無聊)
在公司修改了40頁文件
有點害怕再碰中文字
只想把汽車內的音樂開到最大聲
像報復似的聽陳綺貞“慢歌3”

圖片

An interesting IDE to SATA migration problem

A coworker here ran into a novel problem migrating a system from an IDEdisk to a SATA disk: he ran out of partitions. He had 16 partitions onthe IDE disk, and on Linux you can only have 15 partitions on a SATAdrive. (Fortunately he found a partition he didn't really need.)

On the surface, this limitation is because SATA drives on Linux areconsidered to be SCSI disks , and all SCSI diskscan only have 15 partitions. Of course, that just


20060216網摘 – 賀香港動漫研究所成立

New


錯配

冷雨敲窗不可聽。挑燈夜讀牡丹亭。人間亦有癡於我。傷心豈獨是小青。——馮小青

現在這個時刻,該是看《華蓋集》的,但手上只有重刻舊版的《朝花夕拾》。看過自然頹喪不堪,冷雨、挑燈這些意象都來了。若屋裡有一扇窗

博客地圖的定位問題

最近有一個博客地圖推出,以 Million Dollar Homepage 的意念,推出專為 Blogger 而設的收費廣告服務,標榜收費便宜,目的是增加博客間的交流。對此,有人 支持 也有人 反對 ,掀起了一番爭論風波。我在想如果同類事件,是由 Oui 或者 Blog-you ,以「留紀


人生苦悶,奇文共賞

網上輾轉傳來一篇浸會大學學生會外務副會長的講辭,查將於學聯周年大會上宣讀。人生苦悶,難得好文,不禁要與眾同樂。 浸大的朋友尤其應要格外留意,因為有人如此令你們的學校蒙羞。 此文充斥一種 當明星的虛榮心 態,對

腐朽和期待


我第一次寫小說而不存底稿立心跟這個小說決裂了
可能因為寫到中期電腦硬盤壞了之前的章節都消失了
找不回之前的線也找不回設定的結局
這一次破紀錄的寫了五百多天該有三十五萬字
可惜又一次浪費了心血和時間

原來寫作可以

只知道此刻愛妳


結婚之後,男人是否都會覺得太太很煩?

女人,則會感應到丈夫的冷淡。

這是真的。

大家都不明白為甚麼會這樣,總覺得有點不對勁,但又不能具體地說明出了甚麼問題。

初時會以為是自己做得不夠好,漸漸又會懷疑是對方態度

Fun with control characters and the web

Yesterday, I broke WanderingThoughts ' syndication feeds (and madethe main page not validate). I did this by accidentally putting a ^Dcharacter into an entry ; oneof the editors I use makes this unfortunately easy to do by accident,and hard to spot.

Neither HTML 4.01 Transitional nor XML (which the Atom syndicationformat is a dialect of) allow control characters (apart from tabs(and linefeeds)). A lot of things are forgiving of crappy HTML, butthings that eat Atom