Build xchat 2.8.2 on Solaris nevada with SunStudio 11

I don't know why JDS does not ship xchat, so that I don't need to build by myself :(  

To build xchat 2.8.2 on Solaris nevada (build 62) with SunStudio 11, please download and install SunStudio 11 as well as CBE 1.6,

1. Download the source tar file from http://www.xchat.org/files/source/2.8/?S=D, and apply the patch,
2. $ ./configure --prefix=/usr --disable-dbus
3. $ make, # make install 

Build scim-1.4.6 on Solaris nevada with SunStudio 11

To build scim and its IME modules on Solaris nevada (build 62), please download and install SunStudio 11 as well as CBE 1.6,

Build scim-1.4.6 

1. checkout scim_1_4_6 branch of scim from scim.cvs.sourceforge.net, and apply the patch
2. $ export LDFLAGS=-lsocket, then execute ./bootstrap
3. $./bootstrap; $ ./configure --prefix=/usr; make
4. # make install (or $ sudo make install)

Note, after make install, you may need modify the /etc/gtk-2.0/gtk.immodules to add the following stuff (returned by gtk-query-immodules-2.0)

"/usr/lib/gtk-2.0/immodules/im-scim.so"
"scim" "SCIM Input Method" "scim" "/usr/share/locale" "ja:ko:zh"

Build scim-pinyin-0.5.91

1. checkout  scim_pinyin_0_5_91 branch of scim-pinyin from scim.cvs.sourceforge.net, and apply the patch
2. $./bootstrap; $ ./configure --prefix=/usr; make
3. # make install (or $ sudo make install)

Build scim-hangul-0.3.1

0. download libhangul 0.4.0, configure it and run make (the test/hangul.c would fail, just ignore it)
1. checkout scim_hangul_0_3_1 branch of scim-hangul from scim.cvs.sourceforge.net, and apply the patch
2. $./bootstrap; $ ./configure --prefix=/usr; make
3. # make install (or $ sudo make install)

Build scim-tables-0.5.7

1. checkout scim_tables_0_5_7 branch of scim-tables from  scim.cvs.sourceforge.net, and apply the patch
2. $./bootstrap; $ ./configure --prefix=/usr; make
3. # make install (or $ sudo make install)

Build scim-anthy-1.2.3

1. download anthy-8700b source tar file from http://sourceforge.jp/projects/anthy, and apply the patch
2. build anthy-8700b and install
3. check out RELEASE_1_2_3 branch of scim-anthy from cvs.sourceforge.jp, and apply the patch
4. build scim-anthy and install.

Build scim-m17n-0.2.2

1. download m17n-lib-1.3.4 and m17n-db-1.3.4 from http://www.m17n.org/m17n-lib-en/download.html
2. To build m17n-lib-core, ./configure --prefix=/usr --with-gui=no, make and make install.
3. To build m17n-db, download glibc-2.3.2.tar.gz from http://ftp.gnu.org/gnu/glibc, extract the tgz file, and ./configure --prefix=/usr --with-charmaps=glibc-2.3.2/localedata/charmaps/, make and make install
4. checkout scim_m17n_0_2_2 branch of scim-m17n from scim.cvs.sourceforge.net, build and install

Build scim-chewing-0.3.1

1. download libchewing-0.3.0 and scim-chewing-0.3.1 from http://chewing.csie.net/download/
2. extract libchewing-0.3.0 and apply the patch, make and make install
3. extract scim-chewing and apply the patch, make and make install

Build scim-bridge-0.4.10

1. checkout stable-0_4_10 branch of scim-bridge from scim.cvs.sourceforge.net, and apply the patch
2. ./configure --prefix=/usr --disable-debug --disable-documents CFLAGS=-DMSG_NOSIGNAL=0 CPPFLAGS=-DMSG_NOSIGNAL=0
3. make and make install

Note, after make install, you may need modify the
/etc/gtk-2.0/gtk.immodules to add the following stuff (returned by
gtk-query-immodules-2.0)

"/usr/lib/gtk-2.0/immodules/im-scim-bridge.so"
"scim-bridge" "SCIM Bridge Input Method" "" "" ""

I will try to build solaris packages, and deliver to our input-method OS.o project.

Install Solaris Nevada build 62 on Dell D620 Laptop

We all got one Dell D620 laptop for openwork (work from home) pilot program. But we have trouble to install the latest solaris nevada build (62) on it.

Here are some tips for you:

1. Disable "dual core" support in BIOS (otherwise the kernel in mini-root can not boot, while after the installation is completed, you could enable it again ;) )

2. Disable "PC card" support in BIOS (otherwise your installer would hang when the bge device driver trying to initialize the broadcom 5752m NIC. Thanks to Zeeshanul Huq in OPG-BeiJing bge driver team, he told me this workaround, and figured out it's a bug of PC card driver. Refer to bug 6471103.)

3. If your installer stopped after the system identification is completed, kill the installer processes, and launch the installer again manually (maybe a bug of installer), i.e., #install-begin

Good-luck for you :)

PS: You don't need to disable the dual core support in BIOS for recent nevada builds, e.g., 65 or 66. The kernel in mini-root can support it now!

在CSDN上做的一期关于Ruby的视频访谈,高手勿入!

作为《Programming Ruby 第二版》中文版的推广活动之一,参加了CSDN的一期视频访谈。我本非精深于Ruby的专家,对Ruby及动态语言亦无高论,无奈受出版社所托,只好硬着头皮参加了,这下子肯定是要贻笑大方了。整个谈话过程基本没有演练和彩排,而且是第一次在摄像机前讲话,还是挺紧张的。再有,很高兴结识了两位新朋友,都是Rails方面的高手。

Boot Macbook Pro off an external USB disk

I just bought a Macbook Pro (MA609) last weekend, it's so powerful and cool.

Though the Mac OS X Tiger is fantastic, I still want to install Ubuntu linux and Solaris on it. After reading the Paul's blog and Alen's blog (btw, thank you so much for sharing the experiences), I found I may need build a bootable USB disk (I don't have a fireware external disk) to restore my EFI partition type of my disk.

Since I am a beginner of Mac, I don't know how to do that. After searching the internet, I found the 1st step is to partition your USB disk as GPT (GUID Partition Table), and create a partition as "Mac OS Extended (Journabled)". Then you have following options:

1. Insert the instalation DVD, and install Mac OS X to your USB disk after a reboot. 

2. Clone your primary boot disk (i.e., Macintosh HD) to your USB disk, with SuperDuper! or Carbon Copy Cloner. (I only tried SuperDuper!, it works for me) It took me about 1.5 hours to clone my 24G boot disk.

3. Create a stripped Mac OS X system with PortableOSX, it just requires 1.3G for Intel Mac OS X. But maybe I did something wrong (I might give the wrong name for administration account), my box booted from the disk, but just show a blank screen :( .

And rEFIT is very handy for you to boot from other devices. You could install it as the 1st step.

《Programming Ruby 第二版 - 中文版》勘误

非常感谢广大读者朋友的指正,特别要感谢dreamhead!为了系统地管理本书的勘误表,将目前收集到的、和我自己发现的错误(未加感谢的部分,而应向各位读者致歉的各项错误),列在下面。

第xxii页,目录,附录
- 附录A Socket库 ... 653
+ 附录A Socket库 ... 763
感谢: kurt14204

第7页,第1章,1.2.2节
你也可以用Unix的 "shebang" 符号作为程序文件的第一行。
译注:"shebang" 取自 "#!" 的读音,"sharp-bang",作为脚本文件的第一行,用于指示执行该脚本的解释器。

第8页,第1章,1.3节
- 输入ir-c可以找到ri文档中的所有类的列表
+ 输入ri -c可以找到ri文档中的所有类的列表
感谢: anthrax

第15页,第2章,中间段落
- 如果表达式只是一个全局实例或类变量,则不需要提供花括号。
+ 如果表达式只是一个全局、实例或类变量,则不需要提供花括号。
感谢: anthrax

- puts "#$greeting,#$name"
+ puts "#$greeting,#@name"
感谢: hcc4hcc

第37页,第3章,倒数第4行
- "protected" 和 "private" 之前的区别很微妙
+ "protected" 和 "private" 之间的区别很微妙
感谢: kgo_yoi

第47页,第4章,第3行
- 更重要的是hash不支持多个键对应一个相同的值。
+ 更重要的是hash不支持重复的键(key)。
原文为: hash does not support multiple entries where the keys have the same value.
感谢: aqieee

第67页,第5章,5.3节,倒数第15行

#'
 * @volume
'#' * @volume
感谢:anthrax

第83页,第6章,正文第二段
- 如果你在一个正规参数前加上星号,那么传入这个方法调用的多个参数将会被装入一个数组。
+ 如果你在一个形参前加上星号,那么传入这个方法调用的多个参数将会被装入一个数组。
感谢:zgleo

脚注5
- Conrad Schneiker提醒我们世界上有类人:会数数和不会数数的。
+ Conrad Schneiker提醒我们世界上有类人:会数数和不会数数的。
估计文字编辑不够幽默 :)

第99页,第7章,正文最后一段
- 放弃了多态的好处,并把重构的福音带到你的耳侧。
+ 居然舍弃多态的种种好处而不用,就让重构的“福音”降至到你的耳旁吧。
感谢:anthrax 

第111页,第8章,代码第4行
- Errno::EWOULDBLOCK::Errno  --〉 5
+ Errno::EWOULDBLOCK::Errno  --〉 35
感谢:anthrax

第133页,第10章,10.4节标题
- 谈谈网络
+ 访问网络
原文为: Talking to Networks

第163页,第13章,13.1节
- Ruby -r debug [调试选项] [程序文件] [程序参数]
+ ruby -r debug [调试选项] [程序文件] [程序参数]
word的自动将首字母大写的功能,真是很恼人!
感谢: dreamhead

第179页,第14章,14.1.1节
- kcode可能是日语的一个编码:
+ kcode可能是日语的某种编码:

第233页,第17章,17.4节
- 妈妈现在很快乐,是去尝试一下她最近张贴菜谱的时候了。
+ 妈妈现在很快乐,是时候去尝试一下她最近张帖的菜谱了。

第229页,第17章,17.4.8节
- 最后但肯定不是至少
+ 最后但同样重要的是,
原文为: Last but certainly not least
感谢: dreamhead

第330页,第22章,22.4.1节
- 常量可以在方法体外定义
+ 常量不可以定义在方法内
原文为: Constants may not be defined in methods.
感谢: dreamhead

第346页,第22章,22.6节
- Methodname还可以以问号(?)……
+ methodname还可以以问号(?)……
这里methodname指的是上面的提到的符号,所以,应该小写。

-方法定义可能不包含类或模块定义。
+方法定义不可以包含类或模块定义。
原文为: Method definitions may not contain class or module definitions.
感谢: dreamhead

第413页,第26章,26.5.2节
- 我们有主程序mail.rb
+ 我们有主程序main.rb
感谢: dreamhead

第416页,第26章,26.6.2节,脚注2
- YAML代表“YAML不是标记语言”��但这并不重要。
+ YAML代表“YAML Ain't Markup Language",但这并不重要。
译注:类似GNU(GNU's Not Unix),YAML也是一个递归定义。

第418页,第26章,26.7节,
- 同时,如果你喜欢Sun的JavaSpaces样子(JINI架构的基础),你可能有兴趣了解drb是以一个短小的模块来发行的,它完成类似的事情。
+ 同时,如果你喜欢Sun的JavaSpaces的模样(JINI架构的基础),你可能会有兴趣知道,drb的发布中还附有一个短小的模块,也完成类似的事情。

第423页,第27章,each的说明
- Strin#each的参数具有默认值
+ String#each的参数具有默认值
感谢: dreamhead

注:本blog页将持续保持更新,新的勘误将直接添加,而不再创建新的blog页。