也说范跑跑

其实我挺理解范跑跑的,他非常非常爱家中尚在襁褓的幼女。那么幼小的生命,会让父母觉得要不惜一切来保护他/她,这一切之中,包括了自己的生命,或许也包括了对职业操守的坚守。如果他的女儿已经8、9岁,初长成了,也许就可以在那个危机时刻欣然赴死了。

在小小出生之后,我也曾回想过那个经典的命题,如果孩子、妻子和父母同船落水,你会先救哪一个。我和老婆的答案都是,先救孩子。我原先到国外出差的时候,保险的受益人是老婆,现在就改成了小小(也感谢老婆对此的理解)。如果有什么大灾难发生在我身上,我也一定会想尽一切办法活下来。这活下来的信念,即让你坚强,也让你脆弱。

我不能设想、也不允许,小小在6岁之前,长时间离开父母身边。尽管父母、岳父母有信心带好他,而我们也对此没什么太大的异议,但同时我们也坚定地相信我们能做的更好。

谁在说谎?

CCTV说,伊利在市场上销售的产品检测到了三聚氰胺,但是供应给奥运会的奶制品是没有问题的,言下之意是供应奥运会的产品是不同的,这也暗示着伊利其实是知道市场上销售的产品是存在质量隐患的。伊利则声明说,供应奥运和市场上的产品是相同品质的。而22家产品69批次产品检测的结果告诉我们,乳业公司其实是知道某些地方的奶源品质可能有问题,而这也基本上成了行业的一条潜规则。

希望能把整个事件调查清楚,不要仅仅是下架、销毁、赔偿就了事。一定要严惩!

从凤凰卫视抄来的,中国人在食品中完成了化学扫盲:

  • 从大米里我们认识了石蜡
  • 从火腿里我们认识了敌敌畏
  • 从咸鸭蛋、辣椒酱里我们认识了苏丹红
  • 从多宝鱼我们认识了孔雀石绿
  • 从火锅里我们认识了福尔马林
  • 从银耳、蜜枣里我们认识了硫磺
  • 从木耳中认识了硫酸铜
  • 今天三鹿又让同胞知道了三聚氰胺的化学作用 

iconv and non-identical/non-reversible conversions

According to the man-page, iconv(3C) would return the number of non-identical (or non-reversible in Gnu's vocabulary), when that happens. But what's the non-identical/non-reversible conversion? Try the following example:

$ echo "abc测试" | iconv -f UTF-8 -t ASCII
abc??

As you can see, the last two characters are out-of scope of ASCII, however they are legal/valid UTF-8 characters. In this case, iconv(3C) shall convert them to another two characters (non-identical-conversion character, in some cases it's '?'), and returns 2. However, Gnu's iconv raises an error (return -1, and set errno to EILSEQ) in this case. Though, according to its manpage, EILSEQ is set to indicate there is an invalid multibyte sequence in the input.

So, it not a portable way to use this method to tell if the target encoding is capable to represent the source contents. And you should not either rely on the non-identical conversion numbers. A successful conversion may return -1 and with E2BIG when output buffer is exhausted, meanwhile non-identical conversions may happen. And there is no flag in iconv(3C)/iconv_open(3C) to control whether to perform non-identical conversions or to raise an error.

In gernal, iconv(3C) is not a well-defined interface.

P.S., this post is a summary of the discussion between JDS/Evolution team and myself, to locate/isolate an iconv(3C) related bug.

glibc on OpenSolaris

Just saw the message on [osol-discuss], that David is working on porting gnu-libc porting to Solaris/OpenSolaris, and made really impressive progress. Likes the efforts for porting glibc to BSD, it makes the GNU/kOpenSolairs (which means OpenSolaris Kernel + GNU userland) to be reality.

Here are the references:

  1. http://csclub.uwaterloo.ca/~dtbartle/opensolaris
  2. https://savannah.nongnu.org/projects/glibc-bsd

22家婴幼儿奶粉公司69批次产品检出三聚氰胺

新闻联播播出了,22家婴幼儿奶粉公司69批次产品检出三聚氰胺。包括圣元、伊利、蒙牛、雅士利等一线品牌,还有许多二线的地方品牌。真是触目惊心啊!而同公司的产品,供应奥运会的、或者出口海外的,就没有问题,真是令人愤恨!少年强则中国强,现在连祖国花朵们的生命安全都得不到保障。

不仅各相关人员企业应该严惩,各级质检部门的负责人应该集体引咎辞职并追诉渎职罪!

python and Gnu-libreadline

You may know that the interactive shell of python uses Gnu-libreadline (in GPL) to implement the history retrieving feature. However, does this impact your own python program or application with python interpreter embedded in?

I did a little study on the python interpreter, libraries and built-in modules on linux (which were built with libreadline), looks like there is only one extension module links to libreadline, /usr/lib/python2.5/lib-dynload/readline.so. And this module would only be loaded by the interactive python shell. When I launch an ordinary python script directly, or embed python interpreter to a C/C++ application, this module would not be loaded, unless the script imports the readline module explicitly. (P.S., I used pmap(1) to verify if libreadline.so is loaded in runtime.)

I think only the readline ext module is under GPL term, and it should be safe to build python with libreadline. :)

scim packages are available on pkg.opensolaris.org

Just enjoy it :)

pkg:/SUNWscim-anthy@1.2.4,5.11-0.96:20080825T192330ZInfoManifest
pkg:/SUNWscim-chewing@0.3.1,5.11-0.96:20080825T192330ZInfoManifest
pkg:/SUNWscim-hangul@0.3.2,5.11-0.96:20080825T192331ZInfoManifest
pkg:/SUNWscim-pinyin@0.5.91,5.11-0.96:20080825T192331ZInfoManifest
pkg:/SUNWscim-sunpinyin@1.0,5.11-0.96:20080825T192335ZInfoManifest
pkg:/SUNWscim-tables-chinese@0.5.7,5.11-0.96:20080825T192355ZInfoManifest
pkg:/SUNWscim-tables-extra@0.5.7,5.11-0.96:20080825T192401ZInfoManifest
pkg:/SUNWscim-tables-india@0.5.7,5.11-0.96:20080825T192401ZInfoManifest
pkg:/SUNWscim-tables-japanese@0.5.7,5.11-0.96:20080825T192401ZInfoManifest
pkg:/SUNWscim-tables-korean@0.5.7,5.11-0.96:20080825T192402ZInfoManifest
pkg:/SUNWscim-tables@0.5.7,5.11-0.96:20080825T192354ZInfoManifest
pkg:/SUNWscim-thai@0.1.0,5.11-0.96:20080825T192402ZInfoManifest
pkg:/SUNWscim@1.4.7,5.11-0.96:20080825T192322ZInfoManifest

Our next plan is to integrate libm17n and scim-m17n. Stay tuned.