From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <89d1e7b8050819053245099105@mail.gmail.com> Date: Fri, 19 Aug 2005 14:32:13 +0200 From: "Anselm R. Garbe" To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: [9fans] 9base ports to unix Topicbox-Message-UUID: 794b8e38-ead0-11e9-9d60-3106f5b1d025 Hi there, just wanted to let you know, that I ported following base tools of plan9 to= Unix in a single package, based on Russ' plan9ports: basename, cal, cat, cleanname, cmp, date, dc, diff, echo, eqn, factor, fmt, fortune, freq, fsize, grep, idiff, join, ls, mkdir, p, rc, readcons, rm, sed, seq, sleep, sort, split, strings, sum, tail, tee, test, time, touch, tr, uniq, w= c, xd All binaries are statically linked (also with the host-OS libraries) by default. I included libregexp, libbio, libutf and libfmt into lib9 to simplify the build process (the libs are still in separate directories though, just a question of linking). All tools don't need mk to be build, because I wrote Makefiles to get rid of the mk dependency (which would make the package bigger). The whole package is a tarball with 260kb and can be downloaded here: http://wmi.modprobe.de/snaps/9base-20050819.tar.gz (Note, bash-3.0 has about 2,3mb(!!!)) I did so, because for writing rc scripts, which is my favorite scripting language already, it sucked to be dependent on dynamically linked bloat binaries from GNU. I measured that a simple sleep call to the default sleep program of Debian consumes about 2MB memory. Since sleep might be rarely used, the problem of GNU test still occurs, which needs the same amount. With times(1) I measured running equivalent scripts (nearly doing the same) written in bash and rc, bash using the GNU tools, rc using these 9base tools, and conclude that rc is about 50 times(!) faster. My suspicion is, that this might be related to dynamic linking and the overhead on process forks, but also due to the unnecessary bloat contained in a shell, which has 2,3MB compressed source code. Before the base port I created a 9rc package, which I already announced in an earlier stage and which is available separately for those who are only interested in the original rc (without libregexp and libbio inclusion to lib9). This package can be downloaded here (130kb): http://wmi.modprobe.de/snaps/9rc-20050814.tar.gz Regards, -- Anselm R. Garbe ><>< www.ebrag.de ><>< GPG key: 0D73F361