9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Anselm R. Garbe" <garbeam@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] 9base ports to unix
Date: Fri, 19 Aug 2005 14:32:13 +0200	[thread overview]
Message-ID: <89d1e7b8050819053245099105@mail.gmail.com> (raw)

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, wc, 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


             reply	other threads:[~2005-08-19 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19 12:32 Anselm R. Garbe [this message]
2005-08-19 13:52 ` Steve Simon
2005-08-19 14:10   ` Anselm R. Garbe
2005-08-19 19:58     ` Scott Schwartz
2005-08-21 20:16 ` Russ Cox
2005-08-22  6:13   ` Anselm R. Garbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89d1e7b8050819053245099105@mail.gmail.com \
    --to=garbeam@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).