More on slot wrapper objects

Following up on the first installment :

Slot wrapper objects do not directly call the C functions that theywrap up. Instead they check that they are being called with a self argument that is an instance of the type that they are wrapping,create a 'method-wrapper' object with the self memorized, andcall that .

We're not done yet, because there is another level of indirection:instead of directly calling the C function, the method-wrapper objectcalls a generic handler function for the particular sort


MALFUNCTION

在離開皇后趕往看《惡童》之的士上,麥catcat替我惡補《惡童》背景,我突然說,遲D再講,現在malfunction。電台正在播《EYES ON ME》。作為一個王菲迷,其實我並不算很迷《EYES ON ME》,以前只是聽到「 Maybe yes, maybe no」便覺得騰飛懸浮,除此

Thinking about types of bugs (and static analysis)

Someone from Coverity recently gave a talkto the local Unix hacks group abouttheir static analysis tools, and in the process got me to thinking aboutthe different types of bugs that I see.

As a first approximation, I think that I can split relatively commonbugs into three different classes:

  • mistakes like using the wrong variable or off by one errors.
  • oversights like forgetting to free memory or unlock a lock under somecircumstances.
  • logic errors, where the code is accurately expressing your desire andyou got all the details right

6月23日公民抗命集會及遊行


日期:2007年6月23日(六)
時間:下午4:00出發
路線:由皇后碼頭,經立法會到軍器廠街警察總部集會
























致各關心警權問題的朋友:


抗議公安惡法 反對政治打壓
警方濫用權力 白色恐怖可恥

自特首選舉前後,而至近期高

即使早起,亦要到一日完結,才想得起今日該做的事。

1. 十年香港文學
嘉賓:陳智德

陳生病懨懨的,還連赴幾個約會,作為令他辛苦的人之一,實在不好意思。

***
2.
悲憤

寫些不重要的小文章,偏要在網上到處亂看一整天。有一個網站叫生日密碼,2月25日那天,看了臉上

如雨滴中的淚水

在黑米的 科幻天下 群組見到有人搜集《 Blade Runner 》的 文章 ,不由自主到 YouTube 回顧這永遠經典的一幕:

I’ve seen things you people wouldn’t believe. Attack ships on fire off the shoulder of Orion. I watched c-beams glitter in the dark near the Tanhauser Gate. All those…moments will be lost…in time. Like…tears…in rain. Time…to die.


Cashback – 停住這時光

「時間會不會暫停,能讓我未做的做完?」

明顯地,《Cashback》的主角 Ben 可以,而且還多到不知要怎樣花。嚴重失眠使他每日多了八個小時,但這多出的時間是痛苦的,因為那是失戀所帶來的傷痛。為打發時間, Ben 去了做超市夜更,


新玩具


過去我用電腦都是請朋友幫我砌機

不過這東西不時會壞

我是電腦盲

有時間寧願多讀幾本書多寫幾篇稿

絕對不會時時刻刻把電腦拆了又砌砌了又拆

因此壞電腦是我生活上一件十分困擾的事

過去幾星期我原來的電腦總是不穩定直接影

What are slot wrapper objects?

I got curious about what 'slot wrapper' objects are after I encounteredthem in FindingMethodProviderII , so I went digging in the CPythonsource. It turns out that the answer requires understanding the internalstructure of CPython.

Python types written in C start with a big structure that definesvarious details about them, including a large number of pointers tofunctions that implement various basic operations such as deallocatingobjects of this type, getting and setting attributes, comparison, andso on. Many but not all of these correspond to Python level


我唔係話乜野

皇后碼頭上蓋露宿風景。這張照片留在我的數碼相機裡,大概是朱凱迪拍的吧。 冷笑話四則

我唔係話乜野。不過。睇下個活動LIST。真係。又是,那些「喉頭一甜,張口噴出一口鮮血」的誇張畫面,才能消解的,辛酸。


本土行動