From: ewright@convex.com (Edward V. Wright)
Subject: Re: More Defense of CLI (there, I changed the subject ... )
Date: Wed, 7 Oct 1992 20:04:09 GMT
Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

In <1992Oct7.010532.11244@cs.utwente.nl> heksterb@cs.utwente.nl (Ben Hekster) writes:
     
>>I doubt that very much.  Both C and PostScript files usually have
>>the same file type -- ASCII.

>Believe it!  The `file' command actually looks at the contents of
>a file and guesses the type of its contents by looking for certain
>`key information'.  Try this:

>	echo 'From Here to Eternity' >test; file test

>happily reports that "test" is a `mail folder'.  Or take your
>favorite 1MB PostScript file

Except, of course, that "test" is not a mail folder.

"[file] often makes mistakes.  In particular, it often suggests
that command files are C programs."  That's a direct quote from
the "Bugs" section of the man page.
 
Wonder what would happen if I put a strong containing C code
in that PostScript file?  Or wrote some macros in C to accept
a PostScript-like syntax?


>>The find utility knows whether a C file contains syntax errors? 
>>That's funny, the man page doesn't mention that.  However, you
>>forgot one thing about find.  "The syntax is cumbersome."  That 
>>isn't just my opinion, it's listed as a bug on the man page!

>The great power of UNIX is its ability to combine different programs to
>achieve something that wasn't explicitly built in by the programmer.
>For example, `find' has an "-exec" option which allows you to invoke
>the C compiler and test its exit status (and hence, find out whether a
>C program has syntax errors).  I haven't found the GUI that can do
>this, yet.

Well, not all errors will cause the C compiler to exit prematurely.
Besides, compiling every file in your hard disk just to figure out
which ones you want to print is awefully wasteful of CPU cycles. It 
certainly shoots the argument that this command is quick.  


>>>The fact is, UNIX is so modular that you can do anything you can  
>>>imagine.

>Precisely.

You're agreeing with yourself.  (Surprise, surprise!)

As I said, I can imagine a UNIX program that plays a sound file
on any UNIX workstation.  Now, you go write it. :-) 


>>Oh, rubbish.  Anyone who can do that is at least a quasi-expert
>>on UNIX scripting.  It would take a fairly competent Hypercard
>>programmer to do the same thing.

>He did say "relatively little".  Don't forget that most UNIX users are
>probably competent programmers and wouldn't have as much trouble coping
>with shell scripting as the typical Mac user would with Hypercard
>scripting.  Fundamental shell scripting skills are invaluable for
>making your own customized utilities, quickly and safely, without
>writing a line of C code.

Well, if the average UNIX programmer knows "relatively little"
about scripting, then the average Macintosh C programmer probably
knows "relatively little" about Hypercard.  However, you've made 
an interesting concession here: that you have to be a competent 
programmer just to get by with the UNIX interface.


>	IMO, a good command-line interface can be incredibly useful to
>a programmer, who is already trained to deal with command lines
>anyway.  

Well, linguists are trained to learn new languages.  Does that
they would benefit if all books for linguists required them
to learn a new language before they started reading -- a language
that was useful only for reading those books, not in their actual
work?