Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: ARexx question Message-ID: <71155@sun.uucp> Date: 30 Sep 88 22:42:32 GMT References: <8759@watdragon.waterloo.edu> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 79 In article <8759@watdragon.waterloo.edu> (Blair MacIntyre) writes: >Time for the stupid question of the century: > What exactly is it the point of having an ARexx port in a program? >Blair Not really a stupid question, having an ARexx port is like having multitasking, you can't really think why you need it until you have it and then you can't understand why it took you so long to figure out that you did need it. An ARexx port is a remote control, done right it offers complete control of the program from ARexx. It is this aspect of it that causes some people to think of ARexx as a glorified Macro package, the difference is that ARexx is much smarter than your average macro package and indeed may only be the messenger for even higher intelligence :-). Of course the best way to explain something is to start with an example that is close to home, text editing. TxED+ is a text editor that has full control of the editor available through the ARexx port. TxED is a nice "programmers" editor because the commands are simple and don't get in your way, and the executable is small so you can have it around all of the time. Now let's suppose you are writing a letter or something and find your self making lots of little changes to a paragraph. Since TxED has no justification features you find yourself going back, adding and removing carrige returns, to keep the paragraph in a semblance of reasonableness. With ARexx however, you can automate this process with a simple macro that "clips" the selected region, does the justification, and then "pastes" the result back into your buffer. Further, TxED lets you attach ARexx programs to Menu items so now you can add a menu item "justify" that becomes part of the editing environment. Now this is not more than any particular macro package can do either. Except that what if MicroEMACS takes the same basic commands as TxED+ ? If so you paragraph justification program will work equally well on *both* editors. Big deal, you might think so you establish some defacto standards and a bunch of editors can share macros. And you're right it isn't much of a big deal (but it's a start). No the real power becomes evident when the thing on the other end of your ARexx program *isn't* ARrexx. You can add another program into the loop. Consider TeX the text formatter that Radical Eye Software sells. Now instead of selecting a region in TxED+ and selecting "justify" you identify the region and select "typeset". Suddenly a screen jumps to the front and your text is displayed, fully justified with all the various margins and such set. Now you have *leveraged* TxED by giving it typesetting abilities thru TeX. Now how much would you pay ? [just kidding]. Now let's bring it closer to home, what about a compiler that has a ARexx port? Now you can set up a "compile" menu option *IN ANY REXX COMPATIBLE EDITOR* and have an integrated environment. The compiler notes errors and positions the cursor for you, even jumping to other source files if necessary. Now you have a Borland Turbo Pascal like environment except that the compilers and editors are all interchangable. Some people compile Modula-2, others C, fortran, or Assembler! Some us vi like editors, some use EMACS like editors. That's *powerful*. With startup files you can customize your editor to be a word processor, compiler environment, phone book, directory organizer, anything. But what if you aren't some hacker type who writes a bunch of code? Maybe your just a graphic artist that likes to use these machines. So you add an Arexx port to your paint program. Now connect that thru Arexx to a ray tracer or some other renderer. Draw a circle, send the specifics to ARexx (like radius, pos, etc) and have Arexx forward it to a sphere generator, or do it in ARexx since there is a fairly complete programming language available. The answer to your question is, "Adding an ARexx port to your program will allow it to use and be used by other programs to create tools that are more powerful than either separately." --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.