Development

共 62 篇文章。

Moving toward a standarized qsort_r(3)

• Development

History of qsort_r(3)

First introduced in Research Unix V3 and eventually standardized as part of C Standard Library as of ANSI/ISO C89, qsort(3) provided an abstract interface where programmers can perform sort operation over an array of objects, by supplying a pointer to that array, the total number of the member objects, the size of individual member object,as well as a compare function. The compare function is expected to take two parameters, both pointers to a member object, and it shall return a negative number, 0, or a positive number, if the first object is considered smaller, equal, or greater respectively.

阅读全文… ( 本文约 2240 字,阅读大致需要 11 分钟 )

Google Summer of Code 2013 又快开始了

• Development

📜 历史文件已不具备现实意义

这是一个新闻事件。

今年的 Google Summer of Code 的学生报名还有两周左右就要开始了。 FreeBSD 今年已经确定参加,一些可供参考的项目在 这里 可以找到,我也提供了 一项提案。当然,有兴趣的同学也可以提出自己的想法,如果需要,我也可以帮你找到可能有兴趣的 FreeBSD committer。

阅读全文… ( 本文约 238 字,阅读大致需要 1 分钟 )

GNU libtool 和 FreeBSD 10

• Development

FreeBSD 开始用 10 以上的版本号有一段时间了。这个变动立刻导致了大量 ports 无法编译,多数情况下是因为开发者采用了较早版本的 libtool 导致的,具体来说,是类似下面的代码:

阅读全文… ( 本文约 198 字,阅读大致需要 1 分钟 )

有关"非正常终止"

• Development

多年以前在 USENIX HotOS 2003 论文集中看到了 一篇 关于 “Crash only software” 的论文,当时有一些想法,但很多没有认真地实践。最近做的东西用到的这方面的设计方法比较多,总结一下写出来。

阅读全文… ( 本文约 1189 字,阅读大致需要 3 分钟 )

Ruby用实际行动向GPLv3吐槽,Ruby 1.9.3将改用 BSD 许可证发布

• Development

Ruby 从下一个版本,也就是 1.9.3 开始,从原先的 GPLv2 许可证换成了 2-clause BSD 许可证(大体上相当于 MIT 许可证)。

早期 Ruby 采用的是自由软件基金会推荐的 GPLv2 or later 许可证方式。在实际操作中这种许可方式十分常见,这种许可证方式包含两层意思:

阅读全文… ( 本文约 1007 字,阅读大致需要 3 分钟 )

sizeof(void *)和sizeof(int(*)(void))

• Development

以前一直没注意过这个问题,今天在邮件列表看到 Matthew Flemming 发的邮件才知道实际上 C 标准并不保证 sizeof(void *) == sizeof(int(*)(void))。不过,几乎所有的现代系统上这个等式都是成立的。

阅读全文… ( 本文约 180 字,阅读大致需要 1 分钟 )

源代码有那么重要吗?

• Development

很多人在一个新产品发布的时候,往往会非常关心这个产品是否发布了相应的源代码。然而,对开发者来说,这毫无疑问是一种本末倒置的关注。

源代码能告诉我们的事情是,一件事情是"如何"去做的,而不是"为什么"要那样做。这事就有点像填写报税的表格,那个表格会告诉你在第1行到第20行每行填写什么数字,然后从第几行到第几行的数字相加,减去第几行到第几行的数字之后写到第几行。而当你想要知道为什么要这样做的时候,税表会告诉你"详见税法某某条"或"详见某说明",而提供了源代码的产品就不一样了,因为那些说明,往往要么是一些公司的内部机密文档,要么干脆没有。

阅读全文… ( 本文约 682 字,阅读大致需要 2 分钟 )

LLVM: 为什么你需要关注这个项目

• Development

LLVM 是 Illinois 大学发起的一个开源项目,它到底是什么呢?从字面上看,它是一个虚机系统,然而这又和之前为大家所熟知的 JVM 以及 .net Runtime 这样的虚机不同,它提供了一套中立的中间代码和编译基础设施,并围绕这些设施提供了一套全新的编译策略(使得优化能够在编译、连接、运行环境执行过程中,以及安装之后以有效的方式进行)和其他一些非常有意思的功能。

为什么这个项目很重要呢?对于普通的开发人员来说,LLVM计划提供了越来越多的可以使用、编译器以外的其他工具。例如代码静态检查工具 LLVM/Clang Static Analyzer,是一个 Clang 的子项目,能够使用同样的 Makefile 生成 HTML 格式的分析报告;而对关注编译技术的开发人员来说,LLVM提供了很多优点:

阅读全文… ( 本文约 725 字,阅读大致需要 2 分钟 )

Overhaul of libc Berkeley DB has been committed

• Development

First of all, thanks goes to all people who has helped me on this project, especially Pav (portmgr@) who gave it a twist on pointyhat.

It seems that this has taken me almost a month and 20 commits to get into the tree, after the code is ready. At the beginning, the changeset was ~200KB, and I believe it’s not good to just go ahead and commit it in one time, since it makes reviewing hard. Instead, I manually split it into smaller, functional related chunks, and commit it part-by-part.

阅读全文… ( 本文约 250 字,阅读大致需要 2 分钟 )