Some notes on using socket.getaddrinfo()

Since I've been immersing myself in IPv6 I've naturally becomeinterested in finding out the IPv6 addresses of hosts, which means getaddrinfo() . In many ways, getaddrinfo() is a great API; it'swonderfully tuned for giving you exactly the information you need inorder to make connections to places. In other ways, it's less than idealand how to use its API is unclear.

(For the rest of this, I'm going to assume that you'


Ex-boyfriends' girlfriends

對男友或前男友的前任女友, 我沒有感覺.
她是美若天仙的完美情人, 與我何干, 他還是跟我一起.
她醜如女巫,性格像大便,與我何干, 他終於不用再受罪.

但對前男友的現任女友, 我卻不能自拔.

看到他找到賢良淑德的氣質

The purpose of configuration files

The common garden variety configuration file is generally terrible;hard to write, hard to read, and hard to use. That's because they'vegenerally been designed wrong, with the wrong purpose.

Much like programming languages, very few people create configurationsystems with the goal of communicating with both the program and otherpeople; instead they are almost always aimed just towards communicatingwith the program. When you are just communicating with the program, allsorts of things can be implicit , cryptic,and focused on the


王菲‧傳奇

王菲‧傳奇

久違了的歌聲,依然,動聽。


原唱者為李健。一樣唱得動聽。
Continue reading...

新氣象


本文寫於年初一早上,虎年所做的第一件事就是寫稿交稿,難免要寫樂觀一點的題目,難免會渴望見到一些新氣象。

每年新春,我們都寄望自己遇上好運,甚至會在一些習俗中追求一種送舊迎新的感覺。有些朋友相信全年的運程

第一次舞獅的前因後果

我住的小鎮雖然不算太小,人口大約十萬,但中國人卻不超過一千。正因為如此,所以這裏的中國人互相認識的很多,而且較有動力搞一些聚會甚至大型一點的活動。每年的重頭戲就是春節聯歡晚宴,有二百人左右參加(這裏沒

A Linux gotcha about daemons and bindv6only

First, the brief review. Linux's net.ipv6.bindv6only sysctl controlswhether an IPv6 socket can also accept IPv4 traffic (with IPv4 mappedaddresses), or whether it binds only to true IPv6 traffic. So if youwant to turn off dual binding (which I think youshould), you turn this sysctl on and then run around fixing up things towork.

Except there's a gotcha. Whether IPv6 sockets can also talk IPv4 isactually a


不敗雄心


奇連依士活導演的新作《不敗雄心》,由摩根費曼演南非前總統孟德拉,把複雜的政治問題簡化在振奮人心的球賽中,編導演都表現穩健,拍出大政治家的胸襟與魄力,其動人之處,勝過許多所謂「大片」。

電影講經歷二十七年

Tea Box

Everyone trusts old wives' tales. Our grandparents trust them. Mothers trust them. Most of all, doctors trust them. Even I trust them.

There are rules for doctors, I know, under the big name evidence-based medicine. What a splendid name to practice medicine, you must have thought. And who won't? The way to treat my recent febrile illness, of course, turns out to be a far cry from the evidence-based medicine. I was sick upon my way to work

做男人,都要學好梳理自己。

我真的懶理人家說我姿整,雖然未至於上美容中心做Facial,但定期到護膚品櫃台入貨,日常早晚做足基本的護膚三步曲(潔面、爽膚、保濕),我還算是頗能持之以恆的。

有些男士總覺得這是女人才做的事,所以會選擇不做,又或

Continue reading...