9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kris Maglione <bsdaemon@comcast.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] equivalent of fstat | grep $portnumber ?
Date: Tue, 19 Jun 2007 12:57:49 -0400	[thread overview]
Message-ID: <20070619165749.GC67517@kris.home> (raw)
In-Reply-To: <14ec7b180706190953x7a25471crbad6ec13e9763960@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

On Tue, Jun 19, 2007 at 10:53:16AM -0600, andrey mirtchovski wrote:
> why is ps written in C when it may as well be written in rc?

Because ps is a much more complex program and used much more 
extensively. Aside from having quite a few options to process, the work 
that it does would be much more expensive to do in rc, although a fairly 
speedy implementation could probably be written without much trouble.

But your lsof is equivalent to about 3 lines of rc script, done almost 
entirely by programs written in C, and is much clearer. I doubt that 
there's any noteworthy difference in speed, or that it would matter much 
if there were, so I just can't imagine why you'd want to write it in C.

-- 
Kris Maglione

The worse your line is tangled, the better is the
fishing around you.

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2007-06-19 16:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 15:27 Matthias Bauer
2007-06-19 15:39 ` Skip Tavakkolian
2007-06-19 16:09   ` ron minnich
2007-06-19 16:13   ` Kris Maglione
2007-06-19 16:17     ` andrey mirtchovski
2007-06-19 16:49       ` Kris Maglione
2007-06-19 16:53         ` andrey mirtchovski
2007-06-19 16:57           ` Kris Maglione [this message]
2007-06-19 17:16             ` andrey mirtchovski
2007-06-19 17:38               ` Kris Maglione
2007-06-19 18:09                 ` Roman Shaposhnick
2007-06-19 18:08                   ` Kris Maglione
2007-06-19 18:53                     ` Kris Maglione
2007-06-19 18:13           ` jmk
2007-06-19 18:21             ` jmk
2007-06-19 18:28               ` Roman Shaposhnick
2007-06-20  0:46             ` Russ Cox
2007-06-20  5:48               ` Bruce Ellis

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=20070619165749.GC67517@kris.home \
    --to=bsdaemon@comcast.net \
    --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).