Why not rewrite standard utilities in perl? 
Author Message
 Why not rewrite standard utilities in perl?

[I know this is closely related to question 1.10 in the FAQ, but I'd still
 like to see this discussed to some extent :-)]

I think there are some strong points in favour of rewriting most of the
'standard' Unix utilities (such as ls, grep, rm, ...) in perl:

1. Such a set of utilities would be more portable than one written in C,
   since there are fewer OS-dependent issues to worry about (you have to
   worry about these when you port perl).

2. If the manpages aren't verbose enough, it's easier to find out what a
   certain program does if it's written in a powerful and easy to understand
   scripting language like perl. Also, using a scripting language ensures that
   the source code will always be around.

3. Disk space (not very important with the recent price droppings for GB-
   Harddisks, but still an argument).

The obvious con's are, that using perl would be inefficient for small programs
which are invoked very often, and that there would be no point since the
GNU utilities (shell-, file- and text-utilities) are freely available and
well-written.

Has there been an attempt to implement a set of standard utilities in perl,
or has anyone considered it seriously?

Regards,
-nino
--
http://www.*-*-*.com/



Sun, 05 Apr 1998 03:00:00 GMT  
 Why not rewrite standard utilities in perl?

|> >The obvious con's are, that using perl would be inefficient for small programs
|> >which are invoked very often, and that there would be no point since the
|> >GNU utilities (shell-, file- and text-utilities) are freely available and
|> >well-written.
|>
|> Also don't forget that we'd have to load the whole Perl interpreter to run the
|> simplest tool-script, which will dwarf the compile and interpret times for many
|> of the Perl tool-scripts.
|>
|> Another thought: the Unix tools often get strung together in pipes.  Can we
|> imagine the extra cost of loading five instances of Perl to run something like
|> this:
|>
|>    grep ^Subject: 1??? | cut -c16- | sort | tee >test | wc -l
|>

Thus the argument was started on why perl should be bundled into the kernel ;-)

Murf

p.s. and for years we've been worried about the eventuality of /vmunix.el

--

345 Scarborough Road
Briarcliff Manor, NY 10510    One one-trillionith of a surprise: picoboo
(914)945-6216                 millihellen: The beauty needed to launch 1 ship



Mon, 06 Apr 1998 03:00:00 GMT  
 Why not rewrite standard utilities in perl?

Quote:

> >Thus the argument was started on why perl should be bundled into the kernel ;-)

> Howzabout a perlsh analogous to tclsh ?

Hmm, did you ever try
        perl -de 0
?
Ilya
[mailed and posted]


Tue, 07 Apr 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Why aren't standard modules standard?

2. How to use packages not in standard perl lib directory

3. Tk::Pod does not resolve link to standard perl pod

4. How to submit utility - not module - to CPAN

5. Catching standard error and standard out from a subprocess

6. standard input and standard error

7. why perl -nw not #/usr/bin/perl -nw

8. awk, scheme, tcl, and/or perl (was: Why you should not use Tcl)

9. simple unix commands rewritten in perl..

10. Parts of C news rewritten in Perl, anyone?

11. rewrite this 7-liner in perl?

12. Sendmail rewriting rules in Perl?

 

 
Powered by phpBB® Forum Software