From: miguel@aclcb.purdue.edu (PHILLIP_SANMIGUEL)
Newsgroups: rec.juggling
Subject: problems with sss; UNIX
Date: 21 Aug 92 20:08:59 GMT
Reply-To: miguel@aclcb.purdue.edu
Organization: Purdue University AIDS Center

In article <1992Aug21.121810.42485@kuhub.cc.ukans.edu>, mooreb@kuhub.cc.ukans.edu writes:
>Hello out there, 
>	I don't know if anyone else is having any problems with YASSV
>site swap scribe (sss) postscript hard copy juggling everything
>wonderful etc. etc. etc... but I am. I downloaded it from piggy- er,
>moocow, and I tar-ed it and then tried to uudecode it and it wouldn't
>decode. Please let me know if I am doing anything wrong... (please
>post it so everyonce can read!) 


  Okay, I feel qualified to answer this since I'd been having similar 
problems with uuencoded, tarred, compressed files, etc. until recently.  
UNIX wizards, gods and even apprentices use these programs without a second 
though and assume everyone else knows how to do the decoding.
  Well, in my case this was not true.  No amount querying Terry Jones 
on this subject seemed to make the lessons sink in.  I believe that to his 
highly-trained, UNIX-driven mind my questions were incomprehensible.  I was 
asking him the UNIX equivalent of "how do I breathe?"  The only way I could 
find the answer to these vexing problems was finally to roll up my sleeves 
and experiment with UNIX.  This took me several hours over a few months.  
But having learned the answers myself (rather than being indoctrinated the 
Sect of UNIX by a believer) I can now tell you what I found in a manner 
than is understandable to the mere mortal.
  I have trodden the UNIX soil, and not been contaminated by it!  I am 
still human!
  
  First, this is not a problem specific to sss.  You might have the same 
problems with any file retrieved from moocow.  Second, you can avoid 
entirely the decoding process by downloading the plain files.  All this 
uuencoding, compressing and tarring is mainly for purposes of sending files 
through email.  If you have ftp (I've been told this stands for "File 
Transfer Program") then just grab the raw files.
  Otherwise Terry seems to have all the files available in 4 different 
formats.  We'll use sss as an example:

	sss.tar		sss tarred
	sss.tar.Z	sss tarred and compressed
	sss.tar.Z.uu	sss tarred and compressed and uuencoded
	sss		plain old sss  (actually probably a 
			directory with the two or three sss files in
			it -- like sss.c and sss.ps plus maybe a help file)


  So what the hell is all this "tarring" and "compressing" and "uuencoding"?
Well, "uuencoding" is a process of encoding a file consisting of any type 
of characters (including "control" or "non-printable" characters) into one 
containing only "printable" characters.  That way you can send a binary 
file (one containing non-printable characters) through e-mail without 
choking any of the mailers or gates the file must travel through.  
(Actually I've seen a gate choke on even a uuencoded file  -- but that's 
rare.)  
  "Compressing" is just another type of encoding that tries to fit as 
much information as possible in to as small a file as possible.  The result 
is unreadable until uncompressed.
  "Tarring" is the most confusing.  Originally this program was for making mag 
tape archives of your account, or a directory in your account, or a bunch 
of files in your account.  I've never seen it used that way.  Instead, when 
a UNIX user has a bunch of files he or she wants to send together they use 
"tar" and force the output to go onto a normal disk file instead of magtape. 
Thus, all the files are stuck into a single file (probably in some compact 
but non-readable format).  
  

  So how can you tell if a file has been fiddled with by any of these 
programs?  Well, you can't in any simple way except -- usually each 
programs adds its own stamp onto the filename.  So tar any file and tar 
sticks a ".tar" on the end of it.  Uuencode any file and uuencode might 
stick a ".uu" or a ".uuen" on the end.  Compress any file and compress 
tends to stick a ".Z" (don't ask me why...) on the end.
  So if you have a file that is 
	
	sss.tar.Z.uu

then it must have been tarred, then compressed and then uuencoded.  So to 
retrieve the useful files you must run first uudecode (to reverse the 
uuencoding), then uncompress (to reverse the compressing) and then tar -xf 
(to reverse the tarring.)  Run them in the wrong order and you will get a 
useless mess (most likely).  
  In my case the process went like this:

	uudecode sss.tar.Z.uu

a new file called "sss.tar.Z" is created.  The old file "sss.tar.Z.uu" is 
still around.  Then:

	uncompress sss.tar.Z

A new file "sss.tar" is created but the old file "sss.tar.Z" is deleted.  
Then

	tar -xf sss.tar

results in several files, including "sss.c" and "sss.ps" being created.  
"sss.tar" was still around.  I should add that the "-xf" is important.  
"-x" tells tar to eXtract the original files from the tarred file.  The "f" 
tells tar that rather than looking for the tar file on a default mag tape 
drive, look right in my account for it under the following file name 
("sss.tar" in this case.)
  Now enjoy compiling the program.  In the case of "sss" my C compiler (on the 
VMS machine I work on) choked on a line.  When I deleted the line, it 
worked great.  I don't remember which line, sorry.  (It was obvious from 
the error message though.)

  Any of you who have enjoyed this message can thank Ed Carstens (creator 
of Multi-hand Notation and Jugglerpro) for (either in a fit of wanton 
cruelty or in that cavalierly obtuse manner most UNIX dudes eventually 
assume) mailing a file from an unnamed word processor to a member of our 
club.  The file had been tarred, compressed and uuencoded.  Plus the 
filename of the file created by uudecode began with a "." so novices like 
myself using the "ls" command would think uudecode hadn't worked.  Plus the 
filename was about eighty characters long and contained no hint that the 
file had been compressed.  The message was also in German but as the guy Ed 
sent the message to is German, so that was no problem.
  Any of you who hated this message and now, red-faced with anger and 
choking back bile, curse me for wasting your time or filling up your 
mailbox with garbage -- it was Ed Carstens fault.

  In either case, we'll both be at the Labor Day Weekend Purdue Fall 
Jugglefest (September 5th and 6th) to answer your questions, receive your 
compliments or otherwise feel the sting of your angry insults and threats.  
[I've posted info about this and will post again, with some updated stuff, 
shortly.]


                                    _            _
__________________________  _      (_)  ________(_)________________________
Phillip SanMiguel        _/  \     /  \  Purdue University Juggling Club
miguel@aclcb.purdue.edu (_)   \   /    |   *Juggling*Unicycling*COMBAT*
         _               |      x    _ |
________(_)______________ \_ _ / \ _(_) _West_Lafayette,_Indiana___________