Posts

Showing posts from November, 2006

媒体的力量

媒体的力量真的太强大了 特别是权威媒体 在Linux和自由软件领域里,lwn.net无疑是这样的一个权威媒体 有些事,经它一报道,可能就会使整个舆论转向 比如最近的gaia事件 gaia是个开源的google earth,可是却被google叫停了 一看到这种事情,很多人都是膝跳反射式的数落google的不是 其实这件事上google有自己的苦衷 http://lwn.net/Articles/211153/

用链表申请专利被批准!

其实这篇文章是想谈谈软件专利。 首先声明我不是一个律师。这是一个很常见的声明,英文里常用这个缩写IANAL。 先来看一个软件专利具体例子。链表,一个最最基础的数据结构,2006年4月11日在美国被批准为专利。 http://www.patentstorm.us/patents/7028023-fulltext.html 知道什么是链表的人看到这里恐怕会禁不住笑起来。但是担忧是不必的。 就这个例子,我们来看看软件专利的一些基本特性。首先,专利意味着什么?如果我申请到了一个专利,如果你实现了这个专利,那么你就要付给我专利费。这是一种很高明竞争方式,兵不血刃。中国的整个DVD产业就是毁灭于国外相关组织的专利武器之下。我们花费血本搞TD-SCDMA也是不希望3G的舞台被外国人所独占。怎么对抗专利?一个是找到prior art。他不是说是他发明的么?我们就找证据证明在他之前就有人这么用。所以链表的专利是可以无视的。或者,我们也搞专利,让他避不过,你要告我,我也告你。具体到软件专利,值得注意的一点是不是所有的国家都承认软件专利。美国承认软件专利。但是在欧盟,软件专利是不存在的。中国跟随美国。所以才有联想把从/proc获取机器硬件信息来做为专利来申请。很多方面技术上的差距是天壤之别,但是在专利的sb程度上却是半斤八两。有人会想链表这样已经被人用了几十年的数据结构,怎么还可能被批准为专利呢?这就是另一个问题了,就是据说专利局的人批的专利数量和自己获益多少是正相关的,他们才不会去查prior art。美国几乎每个软件公司都有他们自己的patent portfolio,否则就无法生存。因为很多专利是很难避过的,为了不让别人告自己,自己也需要掌握别人无法避过的专利。有一些公司什么都不生产,唯一的产品就是专利,坐收专利费,这种公司被称为patent trolls。他们有一个优点,就是他们自己没有产品,所以没有可能侵犯任何人的专利,不怕别人来告,但他们可以随便告别人,只要对方用了他们的专利而未交专利费。微软就建立过至少一个这样的patent troll。Linux是否使用了别人的专利?是可能的。有人研究过,提出了很多,而且分属于不同的公司。但是到现在没有人追究,因为Linux如果没有了,对任何人,除了微软,恐怕都没有好处。事实上,如果每一个软件专利都严格的追究下去的话,整个软件产业就马上玩

Microsoft/Novell deal: something happened on a Chinese Linux forum

Image
I write this in English so that all people around the world could get a chance to know what's going on in one of the biggest Chinese Linux forum linuxsir.org . On SUSE Linux sub-forum of linuxsir.org, there were some threads talking about MS and Novell's deal recently. But unfortunately, someone with high privilege in the forum combined these threads and moved them to a place that few people visit. So people won't see it in its original place. Moreover, people can't found it through the link provided in the reply-notification email linuxsir.org mailed to them. The pictures below illustrate this: Unless you are familiar with the operation of vBulletin or use search function of the forum you won't see it again. So the discussion discontinued, or rather _stopped_ by external and yet irresistible force. Then someone expressed angriness about this in SUSE sub-forum, and more people followed him. The discussion went on. However, this thread again is "combined" n

Novell: We disagree

http://www.novell.com/linux/microsoft/community_open_letter.html Highlights: We disagree with the recent statements made by Microsoft on the topic of Linux and patents. Importantly, our agreement with Microsoft is in no way an acknowledgment that Linux infringes upon any Microsoft intellectual property. When we entered the patent cooperation agreement with Microsoft, Novell did not agree or admit that Linux or any other Novell offering violates Microsoft patents. Backgrouds: Ballmer on Novell, Linux and patents http://blog.seattlepi.nwsource.com/microsoft/archives/108806.asp?source=rss

惊悉开发SimSun的中易公司原来是半官方机构

Image
06-11-20, 15:30 第 143 帖 jblbose       注册会员     注册日期: Oct 2003   帖子: 190   精华: 0   引用: 作者: james_su 有没有调查过 Novell 在这方面的情况?把你这段话里面的 redhat 全部都换成 novell,照样完全正确。另外,你是否知道: 1. 在 openSUSE 社区版本里面不包含任何非 OSS 的软件(不敢说是 patent free的)。但为了让用户能够合法的使用 MP3 等有专利保护的媒体格式,novell 和 real networks 合作取得相关的合法授权,给用户免费提供合法的 RealPlayer。很快还会免费提供支持 Windows Media 格式的 RealPlayer 升级版。你觉得这方面 novell 做得有问题么? 2. Novell 从来都没有认可"微软对linux侵犯微软知识产权的专利主张"。但不等于用户没有这样的担心。为用户提供知识产权保障计划是对用户的负责,而不是承认侵犯别人的专利。难道你不知道 RedHat 也同样给用户提供这样的保障吗? 3. Novell 当然在"积极推动软件专利共用来保护开源软件的整体利益"。你难道不知道 Novell 是 OIN 的正式成员,而且 OIN Patent Pool 里面的很大一部分专利都是 Novell 贡献的么?有很多还是 Novell 花钱买过来然后免费贡献的。 关于字体的问题,我不在这里做过多阐述。只是做一个小小的广告,你

Fedora Linux on PlayStation3

http://www.youtube.com/watch?v=_ZXcuhJkwx4 我身上至少有近4千块钱,此刻起,已经不再属于我了。而是我代Sony暂时保管。

audacious-plugins的补丁已经被收入upstream

5天前 http://bugs-meta.atheme.org/view.php?id=632

记一下我的mp3转码的步骤

我几乎所有的mp3的album都是gbk,title和artist是utf8(不标准的) 所以我的步骤如下 1. 我用的脚本配合我的tagreader和tagwriter把所有mp3的album转为标准utf8 id3v2 tag储存方式 2. 利用python版的id3iconv,给已经是utf8的title和artist加上encoding标示字节。命令这么写find -name "*.mp3" -exec id3iconv -e UTF-8 {} \; 参考: http://zhllg.blogspot.com/2006/11/audaciousid3tag_12.html

中国:政府中心主义发展战略的沉重代价

http://guancha.gmw.cn/show.aspx?id=1231 这是光明网(光明日报的网站)上的一篇文章。文章深刻揭示了中国当前的发展模式的严重弊端。 文中主要观点如下: 中国成功地避开了舒尔茨陷阱, 中国的发展是一种不提折旧费用式的发展模式 低工资是国内分配严重不均衡的结果, 这个体制的独特优势在于:它可以未经国民允许就慷慨地牺牲本国国民的福利 竞次战略不走到不能承受的地步很难回头 劳动力无限供给的说法是有人故意强加给大众的一种学术蒙昧 跨国公司对中国政府的俘获能力要远大于本土企业 东方功夫最大的破绽:落后的政治体制,

I have reported the audacious-plugins' problem to upstream

http://bugs-meta.atheme.org/view.php?id=632 Here is the problem's description: In audacious-plugins' current implementation, when saving MP3's tags, unicode is enabled unconditionally. In save_cb() function in http://svn.atheme.org/audacious-plugins/trunk/src/mpg123/fileinfo.c, [ ^ ] there are two function calls: taglib_set_strings_unicode(1); and taglib_set_id3v2_default_text_encoding(); However, when reading MP3's tags, if chardet is enabled, unicode will be disabled. In fill_entries() function in the same file, there is a conditional compilation: #ifdef USE_CHARDET taglib_set_strings_unicode(FALSE); #endif This may not affect English only users. But for CJK users, this discrepancy of dealing with chardet will lead to MP3's title and artist being rendered as garbled characters.

PS3 Japan launch's Dark Side

http://www.kotaku.com/gaming/top/foreigners-and-fights-ps3-jpn-launchs-dark-side-214130.php

解决audacious写入id3tag乱码问题的补丁

首先说一说我对chardet的理解: 如果启用chardet,那么让taglib把所有tag的encoding当做Latin1,然后audacious自己来进行编码侦测。 如果不启用chardet,让taglib把所有tag当UTF8。 相比较amarok,audacious确实给用户多了一种选择。用户可以不转码。转的不"规范"的UTF8编码(也就是只转码,没加encoding byte)的tag也可以显示。 可惜我之前不知道,我用id3v2转了很多mp3,都属于此类情况。 现在我准备向"标准"靠拢。我准备不再用audacious的chardet功能。 我改写了taglib里的例子,用它配合我的id3转码脚本,在结合下面这个网页上的脚本,来把我所有的mp3都转"正确"的编码。 http://paste.ubuntu.org.cn/1090 这样一来amarok里也可以正常显示。否则像现在这样amarok里所有的歌都是乱码,除非不含tag的,可以正确显示文件名。 虽然我不用chardet,不过这个补丁还是要贡献出来。它应该有理由被upstream收录。gentoo-china overlay用户可以直接layman -S后,emerge audacious-plugins http://gentoo-china-overlay.googlecode.com/svn/trunk/media-plugins/audacious-plugins/files/audacious-plugins-1.2.2-mp3-id3tag-edit.patch

我错怪taglib了

在id3v2 tag的问题上。 StringList::toString()里虽然没有利用到encoding 但是在建立TexIdentifationFrame对象的时候,是用到了encoding的。 至于id3v1,那个问题我认为确实是个问题。虽然taglib说它只把id3v1的encoding当Latin1。 不是taglib的问题,那自然就是audacious的问题。确实如此。 在目前的audacious里,在写入时都当做是utf8。但是读取时,如果启用了chardet,那么就当成是latin1,这样读取出来的就是乱码。

audacious写入id3tag乱码问题

Image
我的audacious和audacious-plugins的版本及USE flag如下: [I] media-sound/audacious Installed: 1.2.1(chardet -gnome nls) [I] media-plugins/audacious-plugins Installed: 1.2.2-r1(aac alsa arts chardet -esd flac -jack -lirc -modplug mp3 -musepack nls -oss -pulseaudio -sid -sndfile timidity vorbis wma) 值得注意的一点是,我都加上了chardet USE flag,这样在UTF-8环境下就不必为本来encoding为GB码的mp3文件里的id3tag转码了。 只需要稍微设置一下: Preference->Playlit->Metadata: auto character encoding detector for: Chinese fallback character encoding: gbk 还有一点是,如果主窗口显示不出汉字。看看你是否选择了这个选项: Preference->Appearance->Fonts->Use bitmap fonts if available 请不要选中这一项试试。如果使用微软雅黑,同时选中这个选项,主窗口的歌曲名如果是汉字就会乱码。而不选则不乱码。 这两个地方设置过后,audacious已经几近完美了。不过还有一个问题,就是修改id3tag保存后,再打开该文件会发现id3tag乱码。 经过我的分析,原因大概是这样: 1. id3v2.4.0标准里定义了tag可以有4种encoding,可以在tag里标明,占用一个字节,其中UTF8的值为3。 2. 如果指定encoding为utf8,taglib在写入时会遵循标准的约定,在tag里用一个字节表示encoding,就是3。 TextIdentificationFrame::renderFields() 3. 但是在读取tag的时候,我发现似乎taglib根本没有考虑这里还有个字节表示encoding。而是把3看作字符串的一部分。 StringList::toString()仅仅是把list

Install Gentoo by coping LiveCD to harddisk

http://groups-beta.google.com/group/gentoo-china/browse_thread/thread/b059f759094c82d4/e1384ded3366dce7?hl=en http://groups-beta.google.com/group/gentoo-china/browse_thread/thread/f1e44fda204bffde/781b86d88c804514?hl=en

The prison in Prison Break

Conditional breakpoint in gdb

First you have to setup a break point. (gdb) b 'server::Checks::chkCleardigits(ost::Script::Line*, ost::ScriptImage*)' don't forget the leading ' before server, so that gdb can complete the whole function prototype for you. Check breakpoint info (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x080565f4 in server::Checks::chkCleardigits(ost::Script::Line*, ost::ScriptImage*) at checks.cpp:624 breakpoint already hit 1 time Run the program, and then you find that there are so many calls to this function. However, you are only interested in one particular call. And most importantly, you know a condition which is unique to this call, line->argc>1 Set condition: (gdb) condition 1 line->argc>1 (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x080565f4 in server::Checks::chkCleardigits(ost::Script::Line*, ost::ScriptImage*)

select.span

I was asked to analyze the usage of this "select.span" command. However, I've no idea wtf the so-called span is. What's worse, it seems that nobody else here could explain to me what it is. I am a totally newbie in this area(I mean IVR), and I think it is known to everyone. However, I did find some clue. I found normally those span should be initialized in the driver. Take capi20's driver as an example, BayonneSpan object is newed in Driver::startDriver(). But unfortunately, the synway's bayonne driver is not complete at this moment. The driver is in bayonne-nonfree package. In my opinion, the biggest problem now is this incomplete synway bayonne driver. If it is finished, many problems will not exist any longer. PS: This "select" thing is discovered by me, when I analyzing "connect". In startDialing() which is called by scrConnect(), there is a call to getPointer() with a single parameter in the form "select.%s". Then I found th

PS3 is coming

According to e-zone, a Hong Kong magazine, PS3 60GB version will be sold at HK$ 3780 in Hong Kong starting from Nov 17. This price is equal to 56,810 Yen according to the exchange rate on Nov 1, while the expected price of Japan version is 60,000 Yen. This price is also lower than that of US version. The 20GB version will be available in December in Hong Kong. The price will be HK$ 3180. The price is lower than I expected. However, I won't act before Winning Eleven PS3 version is out. :)

我的emacs

Image
This is my /usr/bin/emacs #!/bin/sh emacs.emacs-23.0.0 --enable-font-backend -fn "Consolas-12" "$@"

今天又搞了搞字体

Image
最终的选择是下面这些。近期应该不会再有大变化了 简体中文:微软雅黑 繁体中文:微软正黑 英文:Verdana 搞的过程几经周折,这里记录一下: 1. Vista里的英文字体 Vista里带了好几个新英文字体,都是C字辈的。包括几个serif, san serif和一个monospace。这几个字体是很好看,不过有一个通病,就是指定同等大小的情况下,比中文字体(比如雅黑)要小,比原来的Verdana那几个也要小。我的显示器是1680x1050的,字体小了看着很费力。(下次说什么也不买大个儿的笔记本了。)我尝试了一个方法,是把小于18 pixelsize的Candara的大小均强制改为18 pixelsize。不过感觉还是不太爽,感觉笔画比较细,看着费力,而且强制拉大的显得不太协调,粗体显的太粗。 <match target="font" > <test compare="eq" name="family" > <string>Candara</string> </test> <test compare="less_eq" name="pixelsize" > <double>18</double> </test> <edit name="pixelsize" > <double>18</double> </edit> </match> 2. Emacs字体设置和Vista新日文字体 今天发觉emacs里有些中文字显示不出来了。后来发现emacs是找meiryo,也就是Vista里的新日文字体来显示的。日文字体里的汉字自然是不全的。按理说Emacs应该从~/.fonts.conf的字体列表里找,看来现在还不是。不知道怎么设置,只好删掉meiryo不用,反正不懂日文。 3. Firefox的字体设置 个人觉得总体上说有3种选择: 一是让网页选择字体 二是不让网页选择但只指定seri