选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……
Pretty interesting project: Haiku.
It looks like that it uses a lot of FreeBSD code by creating glue between FreeBSD and BeOS API, on the other hand they are using MIT license for most of their code, making sharing code easy.
Read more...I have taken some time to rewrite memchr(3) to utilize similiar algorithm as my strlen(3) did. Two different formular, however, would have a roughly 1/3 difference.
Currently I have taken an approach that when memchr(3) is trying to match a pattern of 8-bit, then consider the string as 8-bit, which uses the first formular which is expected to have uniform O(n) time complexity by reducing unnecessary branches.
This approach, however, might be bogus since if you find 7-bit character within a 8-bit string, in that case, memchr(3) would perform poorly, if there are a lot of characters having their MSB as 1.
Read more...今年 1 月 27 日发表的 《GCC运行环境豁免条款 (英文版)》 再次狠狠地打了苹果的耳光。
原先的豁免条款如下:
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
As some of you already know, FreeBSD, along with some other Open Source projects, is moving away from GCC due to GPLv3. From a technology perspective, this also makes sense since the (likely) candidate, BSD-style licensed, LLVM based clang, a C compiler, is making reasonably good progress.
So, what should we expect from LLVM or clang?
Here is a good comparison between GCC and clang. Despite GCC is popular, considerably more mature, and supports more languages (especially C++, which clang’s support is incomplete at this moment), clang provides cleaner AST (Abstract Syntax Tree), much more modularized (if you take a look at GCC’s history, Richard Stallman intentionally made GCC’s code not reusable in other software), provided much more information for optimizer, is much faster and use much less memory, etc.
For FreeBSD, currently, clang can compile its kernel with only very few tweaks.
Read more...committed against -HEAD. This is a long story, to put it short, I had proposed assembly version of some string operations at the point of 2005, but these was never committed due to a hard disk failure, and as Bruce pointed out, having the hand optimized assembly code use a different algorithm is not good in general.
Therefore, I have take some time on it and reimplemented the idea in C, resulting in a portable (say, you can use it on any 32-bit or 64-bit processors, and it can be easily extended to 128-bit) version.
So, is it important for *YOU*?
Generally speaking, it should not. Performance sensitive programs should, by all means, avoid C style string operations. Think a 5x better strlen(3) would boost performance of your application since it uses strlen(3) in critical path? Think again!
However, I found it valuable. There is difference in worldstone, where I saw some minor improvements. Micro-benchmark indicates that this version is at most 2x slower when the string is very short, but 5x faster for strings that is at least word-length long.
\[1\]Note: the version has been further revised to provide better comment and match style(9).
Read more...Ok so it’s something that happen only once in 12 years - this year, we have the Bull as totem of the lunar year in China, the pronounciation of the Chinese character, “牛” is very similar to English word “new”.
So, happy new year, and happy 牛 year, my friends.
Read more...忘记在哪里看到的了,应该是小时候看过的某本书。先不要管故事的合理性,我只是想说明一个很简单的道理。
说从前有一个国王,他有两个儿子,这两个儿子总是互相攀比,搞的国王头疼不已。
有一天,国王想出了一个主意。他把两个儿子带到沙漠边上,给了他们一个人一匹马。他对两个儿子说,你们两个穿过这片沙漠,但是今天不要比谁的马快,我要比的是你们谁的马后走出沙漠,后走出沙漠的人就可以得到王位。
两个儿子在沙漠里互相抱怨着父王的这个馊主意。突然,哥哥灵机一动,对弟弟说了几句话。
接着,两个人骑马飞奔而去。
故事讲完了,你知道哥哥的主意是什么吗?
Read more...ভুলবো না আর সহজেতে
সেই প্রাণে মন উঠবে মেতে
মৃত্যু মাঝে ঢাকা আছে
যে অন্তহীন প্রাণ
বজ্রে তোমার বাজে বাঁশি
সেকি সহজ গান
সেই সুরেতে জাগবো আমি
সেই ঝড় যেন সই আনন্দে
চিত্তবীণার তারে
সপ্তসিন্ধু দশ দিগন্ত
নাচাও যে ঝঙ্কারে
বজ্রে তোমার বাজে বাঁশি
সেকি সহজ গান
সেই সুরেতে জাগবো আমি
很不错。有空发中文大意。
Read more...第三块硬盘了……
Read more...许多老派的 FreeBSD 用户喜欢用源代码方式升级。运行了十多年的基于 cvsup 的同步机制由于有很多镜像支持因此一直没有遇到太大的问题,但是 FreeBSD 6.1 开始引入的 freebsd-update 提供了新的以二进制形式更新系统的方法,最近几年 FreeBSD 内核的许多改进已经使编译自定义的内核不再像以前那样重要了。
最近几天发布的 FreeBSD 7.1-RELEASE 引发了升级的热潮。由于 7.1-RELEASE 导致的流量冲击,而现存的 freebsd-update 服务器和 portsnap-master 是同一台,导致现在 portsnap 服务不太正常。目前 security officer 已经在建立新的 FreeBSD update 服务器。
Read more...