Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!tut.cis.ohio-state.edu!mailrus!cornell!batcomputer!rpi!rpi.edu!deven From: deven@pawl.rpi.edu (Deven Corzine) Newsgroups: comp.sys.amiga Subject: Re: AmigaDos vs Unix wildcards/pathnames Message-ID: Date: 23 Mar 89 06:01:15 GMT References: <11241@ut-emx.UUCP> <6306@cbmvax.UUCP> <353@bnr-fos.UUCP> <6342@cbmvax.UUCP> Sender: usenet@rpi.edu Organization: RPI Public Access Workstation Lab, Troy NY Lines: 300 In-reply-to: andy@cbmvax.UUCP's message of 21 Mar 89 01:24:15 GMT In article <6342@cbmvax.UUCP> andy@cbmvax.UUCP (Andy Finkel) writes: >In article shadow@pawl.rpi.edu (Deven Thomas Corzine) writes: [This was a heavily sarcastic article, intentionally so. However, I'm not usually so acerbic, really. :-)] >>Oh, come on. Just how many users new to the amiga are EVER going to >>think of using "#?" for a wildcard?? '*' is VERY widely used and >>accepted, in Unix, MS-DOS and other operating systems. It was 3-4 >Well, due to reasons beyond our control, the AmigaDOS manual is >published seperately. However, the book that came with your >500 did tell you of its existance. I agree that it should >have told about the wildcards. Fortunately, there's a simpler >solution to the problem than switching to Unix....we can update >the manual. That would make for a huge improvement. (Make a better index!) >>I want Unix on an Amiga. What's wrong with that? Unix is a >>well-designed, well-thought-out operating system, with a simple and >>elegant paradigm. AmigaDOS is clumsy and obstrusive. I like the >>Amiga hardware. Exec is excellent. AmigaDOS sucks. Intuition I'd >>rather replace, but it's livable. As far as I'm concerned, I don't >>want to put up with using AmigaDOS as it is more than I have to. You >>like AmigaDOS? Fine. Use it. I want something fairly close to Unix >>myself. On an Amiga. >Nothing's wrong with wanting Unix on an Amiga. Freedom of choice >is an important concept. That's one reason why we have the >A2500 UX, after all. But liking Unix a lot doesn't automatically >mean that AmigaDOS is bad. No, it doesn't. I have specific reasons why I think AmigaDOS is bad, the only relevance to Unix being that Unix often does it better. >I personally don't have a problem with regular expressions >for my pattern matching. I do want it on all the commands >that it makes sense to have it; a shared library will be the >desired method of implementation, rather than pack it into the shell. I'm not opposed to regexp file-matching, but I do consider a single character match-all wildcard to be a necessary expedient. '*' is preferably because it is widely used and accepted. But SOMETHING. I AM opposed to using so obscure a wildcard as #? and not making it clear that's what it is. >(creating very long command lines has some problems, as does >those commands that don't want pattern matching) True. >>Dreadful Unix syntax indeed. Unix is a relatively simple design, >>through and through. Unix is intended to be functional, simple, but >>powerful. And that it is. Unix is not intended to cater to users who >Well, I actually got the impression that (at least under BSD systems) >there was a certain amount of evolution, and actual disagreements >over command syntax...the find command and the print spooler >somehow pop into my mind. There are exceptions, of course. Find is a notable one. But overall, it is pretty consistent. Far more consistent than AmigaDOS. >>really want an AmigaDOS interface, you could write a Unix shell which >>would look like AmigaDOS. I, for one, would never want to. >You mean, if you want a Amiga CLI and Amiga CLI type interface. Basically, yes. I was referring to "AmigaDOS" instead of "AmigaDOS CLI" in the article to refer to the AmigaDOS CLI along with the programs (BCPL) which are used with it. The CLI alone is a pathetically simple and rather clumsy shell. It can not stand alone; it needs the external programs. >The AmigaDOS interface is based on Exec message passing, tasks, >and lightweight tasks. >By the same token you can implement a Unix shell interface on >top of AmigaDOS. In fact, you've even used some of them. AmigaDOS *does* have some good design features. My opinion happens to be that the design flaws outweigh the design features... >>The command syntaxes are concise, not verbose. *Most* people I've >>known find they far prefer the syntax once they finally learn it. I >>know I don't like having to type things like "format df0: name newdisk >>noicons" just to format a disk. >The Unix command to format a disk (at least on my Sun 2) involves >bringing the Sun down, running a special program called diag, >then bringing the system up again. Then I generally run >/etc/newfs [ -N ] [ -v ] [ -n ] [ mkfs-options ] block-special-file >(since I seldom need to get into mkfs) >How is this easier than format ? Format was a poor example for comparision; format is a common everyday command for an Amiga. Not so for Unix. The point was that AmigaDOS BCPL program generally make you type more than you should have to. >>As far as vi goes, I *like* vi. It is a good editor and in widespread >>use. I'd much rather use it than C-A's "ED"... (And I have never >>seen a *good* implementation of vi for the Amiga... *sigh*) >So do one. Strikes me as something that a decent programmer >and VI user could whip right out. I'm an emacs user. So >one of the first things I did was port a version of microemacs, >and adjust it so I was happy. I've considered it, but I've been converted; I switched to Emacs months ago and can't easily go back. And mg is pretty good, but too big. I'm not currently interested in making an effort to try to port real GNUEmacs to the Amiga. I'm sure someone will try it sooner or later. When I have an Amiga w/8M ram, 68030 and 80M HD, then I'll worry about it. :-) >>So? Either the shell builds an incredibly long line and pulls the >>parameters from it to pass to the program, or you pass the program the >>command line directly (as the CLI does) and the program builds the >>same incredibly long line. Big lot of difference it makes. >Actually, since my wildcards are implemented in the program, >via a shared library call, what I do is >call 'compile pattern' with my expression, >then loop calling 'next match' until it tells me that >no more matches are available. The long line problem Oh, so Examine()/ExNext() was your idea, then? ;-) >>Or, you could write a shell with such a rename command builtin, since >>it handles the wildcard expansion to begin with. >This is not in the spirit of the Unix commands...which are supposed >to be small things, each doing a job, which you can link together >to form more powerful commands. If you find yourself saying >that you can always build it into the shell... I'm afraid I must agree with you here. It doesn't belong in the shell. But you *could* put it there. Or you could choose a wildcard that won't need to be escaped... >>'`' in csh to delimit a string which is to be parsed, executed as a >>command (in a subshell), and its output to replace the `command` on >>the command line. An extremely powerful feature which AmigaDOS has >>nothing to compare to. >The standard AmigaDOS CLI commands can get their arguments from >a pipe or a file, as well as from the command line. The primitives >are there. Not nearly as flexible as `command` and of limited value. Also rather clumsy. >>'!' in csh, when used in expressions, as a logical NOT. Again, no >>equivalent in the AmigaDOS CLI (or AmigaShell) because it has no >>ability to handle expressions. More importantly, it is used for >>history substitutions in the csh. They are too complicated and >>powerful to be explained here. >! is rather overloaded character. I hate having to type all those >\ or slip into sh when I want to do a bunch of UUCP mailing. >The AmigaDOS IF statement allows you to use the NOT keyword to reverse >the sense of an expression. You are correct that history substitutions >are too complicated, though :-) I usually just bring back the line, >edit it, and hit return, rather than count arguments. And, I do >this from both AmigaDOS 1.3 Shell and Unix. Agreed, ! is overloaded. But I DO often use !$, for example. Like when I'm unsharing amiga sources/binaries from the net: mkdir program cd !$ unshar ../!$.post rm !$ etc. Can't do that with the CLI or AmigaShell. And it's very tiresome to use the history editing newcon: provides. (At least for that sort of thing. For fixing typos, it's fine.) >[metachar discussion deleted for space reasons; also because I'm >beginning to suspect you don't have the AmigaDOS manual.] Try again. I have the AmigaDOS manual. >>In csh, you have user home directory lookup, executing command(s) in a >>subshell and using the output as command line parameters, history >>that is just one common Unix shell. You can easily rewrite the shell >>to suit you if you wish. Without changing the programs you run. >So what you are saying is that because csh is more powerful, >that AmigaDOS is useless ? You *can* write a csh type >program on the Amiga. Matt did it. Randell did it. Jay >Tees did it. Bill Hawes did it... This then, should be >a shell discussion. The shell is not AmigaDOS. No, I'm saying that bitching about all the special characters in Unix shells and saying how bad it would be if the CLI was like that is rather silly... there ARE many special characters, because the shell DOES a lot for you. The AmigaDOS CLI does virtually nothing, and it shows. The shell is not AmigaDOS, and the CLI is the shell. But, AmigaDOS IS designed to cooperate with the CLI, and the external commands such as cd and all the rest of out BCPL pals are designed solely for the CLI. (Well, AmigaShell also, now.) So, I refer to "AmigaDOS" as a convenient shorthand for "the AmigaDOS CLI and associated BCPL programs". I understand the distinction. I didn't see much point in overelaborating on that point. (I was too busy overelaborating on the metacharacter point! :-) As far as Matt's shell goes... honestly, I was unimpressed by it. It was relatively simple, and while a vast improvement over the CLI (doesn't take much) it could have been far better. I only have an ancient version of Randell's shell, and it is remarkably similar to Matt's. I don't know how good the current version is. I have no clue who Jay Tees is. WShell (isn't that the one Bill Hawes wrote?) does sound to be a step above some others, but I've never used it, myself. I can't form an informed opinion on hearsay. >Because replacing the shell is more difficult under Unix >(though not having written a Unix shell from the ground up, > but only making some minor hacks on tcsh I can't really say > for myself just how hard or easy it truly is) Writing a Unix shell that does as much as the AmigaDOS CLI would take probably about 20 minutes. >>need to replace the shell. You can not do the same with AmigaDOS. I >>like Unix, I want Unix on the Amiga. And there's no way you'll ever >>convince me AmigaDOS is a superior system. >You're right. Until you get the AmigaDOS manuals, and learn what >it is actually all about, and get 1.3, and the 1.3 manual, and >read the manuals, there's no hope of telling you anything. >And actually, convincing you would serve no purpose anyway. I've got the manuals, I use 1.3. I am extremely openminded; I will listen fairly to anything anyone has to say. (within limits) I have spent a great deal of time poring over the AmigaDOS manual (which was not so well written) and I just don't like a lot of things about AmigaDOS. True, FFS fixes a lot of the old file system's problems, but I don't think it's enough. As for whether it's worth trying to convince me of anything... well, it's not for me to dictate what you do. I doubt you can convince me that the AmigaDOS environment is superior to the Unix environment. I acknowledge that AmigaDOS IS improving, but it's got a long way to go. >>So there. >It's getting about that time; put your programming time where your >keyboard is. Produce the csh clone of your dreams. Clone >the Unix programmer interface, the Berkley Fast File system, >whatever other parts of Unix you like. Anything you want. Since >there's no way anyone can convince you of any redeeming characteristics >of AmigaDOS, you're skills must be complete...its time to stop >wasting time in discussions like this, and time to start coding. If you paid attention to the thread in comp.sys.amiga.tech, you would realize I intend to do exactly that. I'm doing the Unix (V7 to begin with, probably will add SysV & BSD & amiga extensions) programmer interface first, including fork() and exec(). To begin with, it WILL call AmigaDOS for the actual file system, until I have time to write my own file system. I don't want to clone the Berkeley Fast File system; there are things I could see improving upon. AND ideas to pull from AmigaDOS. I never claimed AmigaDOS we *totally* worthless; merely that it should be far better. Actually, my skills ARE fairly complete, though there is always more to be learned. (not that I can likely convince you that that's true...) (your grammer could use some work, however. [re: "you're skills"]) Discussions like this are of little value. I'm not going to waste time indefinitely in useless flame wars. However, some discussion remains before I begin serious coding. It is difficult to write reliable code when the manuals are sketchy and ambiguous. I am clearing up the ambiguities now. Then, we shall see. Unfortunately, my time may be severely limited soon, due to mundanities, like paying off debts, working, generally trying to survive. But it won't stop me; it will only slow me. (How much, I can't predict.) You have made a pretty clear challenge. It is a challenge that shall not go unanswered, of that you may be assured. Timeframe unspecified, but code shall be forthcoming. Deven -- ------- shadow@pawl.rpi.edu ------- Deven Thomas Corzine --------------------- Cogito shadow@acm.rpi.edu 2346 15th Street Pi-Rho America ergo userfxb6@rpitsmts.bitnet Troy, NY 12180-2306 (518) 272-5847 sum... In the immortal words of Socrates: "I drank what?" ...I think.