Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu.UUCP Newsgroups: comp.sys.mac,comp.sys.atari.st,comp.windows.x Subject: Re: Better Windows? (visual pipes) Message-ID: <18940@ucbvax.BERKELEY.EDU> Date: Sat, 16-May-87 17:57:35 EDT Article-I.D.: ucbvax.18940 Posted: Sat May 16 17:57:35 1987 Date-Received: Sun, 17-May-87 03:00:05 EDT References: <8705130929.AA17766@cogsci.berkeley.edu> <1987May14.125051.3647@gpu.utcs.toronto.edu> <115@gecrd1.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 87 Xref: utgpu comp.sys.mac:2939 comp.sys.atari.st:3288 comp.windows.x:677 There is a visual metaphor for pipes that is obvious to me but somes to have eluded everyone else. So, I'm giving up my chance for fortune and settling for fame by announcing _Oster's Visual Filters_ 1.) When you connect programs together using pipes, then the first program in the pipeline puts out data. Programs after the first in the pipeline take an input stream, transform that input stream, and produce an output stream. We call these programs "filters". 2.) In a window system, we have data structures called "documents" that are made visible in graphical structures called "windows". In general, a window shows us a piece of a document, and transforms our mouse-clicks and key downs into modifications of the document. 3.) In the real, physical world we speak of water pipes being equipped with filters. (like the pipelines we now use on computers) We also speak of camera lenses being equipped with filters. A graphical filter should be like a camera filter: it mutates the original view. 4.) Camera filters stack. A stack of camera filters is called a "filter pack". Photographers attach and remove entire filter packs, they also add and subtract indiviual filters from existing packs. A named stack of filters, a filter pack, can be used just like a single filter. This idea is very similar to the way we use simple shell scripts now. 5.) the unix program "cat" takes a text file and puts it into a pipline. Our "windowCat" would take a text file and present it in a window. Just for an example, a.)suppose we are looking at a pascal program. b.)Now, in our example, we create a "egrep" filter and place it on top of the windowCat window. We tell the egrep filter "procedure|function" in its "command line" - a pane of the filter we use for giving the filter parameters. The combined pair present us with a new virtual document, or view, that contains only the lines with either "procedure" or "function" on them. our window looks like: ------ procedure IsCancel(a : Boolean); function CMult(a, b : Complex) : Complex; function CDiv(a, b : Complex) : Complex; ... ------ c.) suppose we put a new filter on top of our filter pack: "sort" now we see only the procedure declaration lines from our original program, but in sorted order: ------ function CMult(a, b : Complex) : Complex; function CDiv(a, b : Complex) : Complex; procedure IsCancel(a : Boolean); ... ------ d.) Now, we can take the whole stack of filters we've built and call it "pascalIndex" : we've built a tool for looking at pascal programs that shows us an index of the procedures defined in the program. e.) with an appropriate filter, a virtaul document can be copied into a file, so that it is now a real document, that can be editied with any tet editor. f.) so much we can expect unix filters (bound to the right i/o library) to do for us. Now suppose that we use fresh filters, newly created for this window environment. Then, not only would be able to scroll through a virtual document viewed through a filter pack, but we'd be able to edit it as it stands: Take our pascal index example: suppose we notice a typo, so we click with the mouse to move the typing cursor, then type in the correction. Sort, the topmost filter, preserves a table of where the data it is presenting came from, so it filters the mouse clicks and keystrokes, and informs the filter below it which line I am changing, in the terms of the filter below sort. I may click on the top line and type there, but sort tells the layer below it that I am typing on the 25th line of the document that sort saw as input. Similarly the middle filter, grep, knows that its 25th line corresponds to the 2000th line of the original document, so it tells the bottom layer that I am working on the 2000th line. The bottom layer makes the appropriate change to the document, and everything is fine. So, there you have it, a visual metaphor for pipes. -- --- David Phillip Oster -- "The goal of Computer Science is to Arpa: oster@lapis.berkeley.edu -- build something that will last at Uucp: ucbvax!ucblapis!oster -- least until we've finished building it."