About This Blog

This is Chunhao's Blog

I'm writing something about life and technology here. As a practice of English writing.

My Chinese Blog: http://blog.chunhao.net

My Chinese Page: http://chunhao.net/index-cn.html

Subscribe

The books I’m reading

The items I’m interested in

License

22 June 2008 - 0:54Slax Linux, with Chinese

A few days ago, I decided to installed linux on my 1GB USB Drive. In order for the ability to do some recovering when my system crashes(hope not) and for fun.

After considering several distro, I chose slax linux. I think I’ve been influenced a lot by my friend Jiawei who had used slax linux when his hard drive was down.

After installing slax linux on my USB drive correctly following the official manual, I found it didn’t support Chinese at all. When I googled that, I found fanx, a localized slax. Since I am the people who like solving problems in a more challenge way, I didn’t choose that.

For the first thing, I downloaded the modules for i18n of Chinese packages from here. The only packages I needed are the files start with 001, 002, 003, 004, 010 and 011. Put them on /slax/modules on my USB drive.

After started it(don’t choose the “fresh mode” or “copy to ram” mode), modify /etc/profile.d/lang.sh. Added the following lines:

export LC_ALL=zh_CN.UTF-8

export LANG=zh_CN.UTF-8

And commented all other lines by add ‘#’ at the first of the line. So simple!

You may also want to use your favourite fonts. Then, copy the ‘.ttf’ fonts to the folder /usr/share/fonts/TTF

Every thing is OK now. After short configurations, it can display Chinese characters as well as with Chinese input method available. Let’s enjoying the beautiful, lightweight and portable linux.

Before writing 70-647 and 640-816, make sure that basics like 70-271 and 70-293 are cleared well in advance for PMI-001 and eventually 350-018.

5 Comments | Tags: OS, linux

17 June 2008 - 22:36How do we rely on technique

我们是多么地依赖技术?

我们用电脑做什么?网络的发展,尤其是各种各样的在线服务,让我们在使用电脑的时候充满了乐趣。 每天我们都要检查邮件,阅读新闻,然后再分享一下自己的资源。正是网络,让我们每天都在学习,时刻都在娱乐。

不知你有没有发现,我们对网络的依赖越来越严重。 想象这么一天,打开电脑,发现上不了网, 你能做什么?只是面对一台与世隔绝的电脑玩扫雷,还是写点自己的程序,然后遇到问题的时候发现没有东西可以参考,没有人可以交流。又可能有这种情况,你把你的邮件、文档都放在google的服务器上,然后在自己需要而没有网络的时候却无论如何都无法得到它们。那时,你除了向你的ISP抱怨还能做什么?

听一个教授说过,他经历过3天没有网络的生活后发现 ,没有email,没有手机的生活是那么惬意。这大概就是至高境界。没有网络,那是世外桃源。

对网络的依赖如此,对其它技术呢?人们喜欢把信息都存到电脑里,包括书籍,文章,音乐,图片。而书籍的作用在慢慢淡化。好吧,到了3000年,甚至4000年,当人们(如果还存在的话)拿起一张2008年的光盘、磁盘 ,他们恐怕只能从中获取一堆1和0的序列了。除非他们懂得他们2000年前数据编码的方式并且有相应的设备。

全球的信息量在以不知道什么级数的方式增长,GB,TB,PB,Exabyte… 或许人们足够聪明,设计出一个能有效管理如此巨大的信息的方法,否则,信息会不断地丢失。我们正被淹没在1和0的海洋中,正在从历史中消逝…

No Comments | Tags: Thinking about life

13 June 2008 - 23:02Decaf Language Compiler

Not everybody know the decaf as a programming language. Actually, it’s a language used as part of Compilers courses in several universities. Due to it’s lightweight and simple, it’s a useful tool for learning compiler courses and practice.

This version of decaf varies quit much from other versions. You may read the specification first to start your practice. I wrote it at Fall, 2007 while I’m taking CMPT 379 at SFU and finally got A+ :) . The course was introduced by Anoop Sarkar, who is a genius and kind professor.

To run this program, you should have g++, bison, flex and spim installed. For more detailed information, you may see readme.txt in the package. This is a very trivial compiler which only consider syntactic parsing and semantic check. I didn’t take code optimizing in account. Hope this can give you some help on learning compiler.

decaf.tar.gz

Only those professionals are cleared for 70-642 and 642-642 series who have courses like 642-825 and 642-845 to their credit in addition to 642-552, in order to stand qualified for EX0-101.

1 Comment | Tags: project

12 June 2008 - 21:18There’s no heaven in the world

Everybody want to go to heaven, but nobody wants to die.

每个人都想上天堂,但没有人想死。

地震整整过去一个月了, 人们已经渐渐地从地震的惊恐、忧虑中恢复过来,我也慢慢地淡忘了当时是怎样的心情。我不是一个感性的人,当时没有像很多人一样伤心地落泪,也没有难过地寝 食难安。我竟然也未曾为他们祈祷,因为我不相信上帝、佛祖能让那死去的六万人复活,能让灾区活着的人逃过劫难,哪怕是给亡灵小小的告慰。

我能做什么?我做了什么?除了捐款、默哀,我似乎无济于事。有人说:做好自己的本职工作就是最灾区最好的支持。 我不想过多的思考这句话,不想用理性的思维冲淡我对灾区哪怕微不足道的关心。然而,天往往不随人愿,余震不断地发生,遇难人数也在不断增加。没人知道到底 有多少人永远被埋在了废墟之下,也没人知道他们究竟能否上了天堂。

这个世界没有天堂,因为每个人都想上天堂,却没有人想死。

children.jpg

看看这些孩子,她们还没明白是怎么回事,就被压在坍塌的教室下,无法动弹,无法呼吸,无法思考。生命无法挽回,人们只能这样安慰自己:她们在天堂很幸福。然而她们的老师、父母、朋友,以及所有看到这照片的陌生人都宁愿她们不上天堂而留在他们身边。

天堂遥不可及,死亡却又无法想象。 我们只能不断地欺骗自己:生亦合欢,死亦和惧。

No Comments | Tags: Thinking about life, other