Slashdot Mirror


Rexx for Everyone

An anonymous reader writes "It's easy to get lost in the world of 'little languages' -- quite a few have been written to scratch some itch of a company, individual, or project. Rexx is one of these languages, with a long history of use on IBM operating systems, and good current implementations for Linux and other Free Software operating systems. Rexx occupies a useful ecological niche between the relative crudeness of shell scripting and the cumbersome formality of full systems languages. Many Linux programmers and systems administrators would benefit from adding a Rexx implementation to their collection of go-to tools."

9 of 61 comments (clear)

  1. Not to mention... by squiggleslash · · Score: 5, Informative
    ...probably the most popular version of REXX was AREXX, which was bundled with the Amiga from AmigaOS 2.04 on.

    And very nice it was too. The key reason it took off were that application developers decided to support it even before AmigaOS 2.04 as a defacto standard for scripting and remote control. Most substantial applications - and quite a few minor ones - came with an "AREXX port" which you could use to send commands to the app to get it to do things.

    This functionality seems to be sadly lacking these days in OSS or in a cross-vendor environment. You get the occasional application with a self-contained Python subsystem or something, and Microsoft supports VBA across their own applications, but it's not as fluid.

    --
    You are not alone. This is not normal. None of this is normal.
    1. Re:Not to mention... by Just+Some+Guy · · Score: 4, Interesting
      AREXX absolutely ruled. I once wrote a script to pull transfer completion status from a graphical FTP program, convert it to a pair of (x,y) coordinates a proportional distance along a line from (0,0) to (maxX,maxY), and pass that to a graphics program as the endpoint of a photo-realistic lightning bolt. As my transfer moved along, the lightning grew closer to the ground.

      Useless? Sure, but it looked a lot cooler than your average progress bar, and I could poke my head into the room to see at a glance how far along I was on my hour-long 2MB download from Aminet (via a 28.8 modem).

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Not to mention... by scumbucket · · Score: 4, Informative
      I remember messing around with Arexx. Here's a link to some Arexx info:

      Amiga University - Arexx

      --
      CMDRTACO CHECK YOUR EMAIL!
  2. Yay for REXX! by rqqrtnb · · Score: 5, Funny

    d00d!@ Rexx is the coolest thing ever! Write all your code in big REXX like you were a CONSULTANT at a BANK in 1988!!!

    Man, I can't believe someone's still kicking poor old REXX around. REXX, the crazy computer lingo that won't die -- a deadly scripting language in the horrible tradition of DOS batch programs and JCL. Gar! It's REXX!

    Back in the day, when OS/2 fanatics would get all uppity-puppity about how great OS/2 was, their SECOND most deadly comeback (after "You can format two diskettes at once! One in drive a:, and one in drive b:! Try THAT on a Mac/DOS/Windows/Whatever!!!") was that OS/2 had REXX. It was the ne plus ultra of PC-level scripting languages. It would stop a conversation cold.

    I think the Amiga also had REXX, which, like, that's the kinda thing that Amiga folks still get all teary-eyed over. "I miss the Amiga! It had great VIDEO! and it had REXX!! Waaaaaah!"

    Hey, so, can you still buy a computer with TWO floppy drives? I wonder. That'd be kind of cool to find one. It's kinda sad to think of all the computing manpower in the late 80s that went into making it possible to format two diskettes at once, and now nobody even HAS two floppies. Like, as if Project Apollo had been achieved, and then the moon fell out of the sky or something. Who cares! Why bother?

    Oh, yeah, but anyhow: back to REXX. IBM has this great REXX site, chock full of links to other REXX sites and REXX programs. There were wack developer tools in the early 90s, like Watcom's VX-REXX, a VISUAL REXX. Of course, there's a link from this site. And IBM has, of course, a couple of crazy-ass updated versions of REXX, like for example Object-REXX (no shit!). The coolest one I can see is the new NetREXX, which compiles REXX to Java, which can be, in turn, compiled into Java bytecode for running in a browser.

    Yay for REXX! REXX everywhere! REXX REXX REXX!

    1. Re:Yay for REXX! by Just+Some+Guy · · Score: 4, Informative
      You're right about REXX as a stand-alone language. About the only thing it had going for it was that, if you had an Amiga, then you didn't have to buy a C compiler to write a little program.

      Where it really shined, though, was in its ability to control other running applications. Most decent Amiga programs had an "AREXX port", which was basically an API that you could connect to while the program was running. You could write a script so that whenever your newsreader encountered a URL on a trusted website, then it would execute an AREXX script that would queue a request on your web browser to visit that page. Or, maybe you wanted your MP3 player to tell your IRC client to tell the whole channel that you were playing a new CD.

      By itself, AREXX was pretty lame. As a global scripting language that could tie abitrary applications together, it was wonderful.

      --
      Dewey, what part of this looks like authorities should be involved?
  3. The only answer: by torpor · · Score: 4, Insightful

    Language Diversity.

    There's no other reason. Your list could've stopped at perl, and it would still be a reason.

    Its good to have diversity in your language choices, because different languages have different strengths and weaknesses, and having a good command of more than one can often make you much better, individually.

    There's no reason not to continue adding scripting languages to operating systems ... strong language evolution is best served by having a massive genepool.

    Or at least, so the theory goes. Of course there's the "pro at all, master of none" aspect to consider as well, but you never know ... REXX may one day compete with CPAN, you never know ... ;)

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  4. REXX isn't as much fun as Perl by doug · · Score: 4, Interesting

    I owe a lot to REXX. I used to love REXX. Back when I was a co-op at IBM I spent two years doing nothing but REXX on VM/CMS (note to youngsters: it was an OS for the 370 family). It paid for my car and a trip to Europe. But more importantly it got me used to scripting languages. After learning REXX, it was a small step to Perl (version 4.036). Since I learned Perl, I've never looked back at REXX. I'd be amazed if REXX hadn't evolved once it got off of mainframes, but I really doubt if it can do anything that Perl can't. They are both in the same nitch, but Perl has one thing that REXX doesn't: Perl is more fun. When everything else is said and done, enjoying your time at work is a huge advantage.

    Life is too short to waste on REXX. Stick to Perl have fun.

    - doug

  5. It's CobolScript for Unix!!! by Rob+Riggs · · Score: 4, Interesting
    From the article:
    #!/usr/bin/rexx
    ADDRESS SYSTEM ls WITH OUTPUT FIFO '' ERROR NORMAL
    DO i=1 WHILE queued() \= 0
    PARSE PULL line; SAY i || ") " || line; END

    Yeah, I can see right away why I would want to write programs in this language. No object model. No regular expressions. Cobol-like syntax. This is more like BASIC (and not even the Visual variety) than Perl or Awk.

    I know it may come off as such, but this really isn't meant as flamebait. I just really don't get why people would want to write new code in such a dreadful language.

    (To be fair, I think the same of PL/SQL coders; but at least they have a good reason -- "Larry made me do it.")

    --
    the growth in cynicism and rebellion has not been without cause
    1. Re:It's CobolScript for Unix!!! by Just+Some+Guy · · Score: 4, Insightful
      ADDRESS SYSTEM ls WITH OUTPUT FIFO '' ERROR NORMAL

      That's definitely verbose and ugly, but behind the scenes, that code just "connected" to the "SYSTEM" port, issued the "ls" command, and sent some configuration information.

      PARSE PULL line

      When you "ADDRESS"ed the SYSTEM object, you basically imported it's API into the REXX namespace. See that "PARSE PULL" bit? That command comes from the SYSTEM object, and isn't part of the REXX language proper. Imagine this code sample (completely invented and unlikely to work without modification, but still illustrative) instead:

      #!/usr/bin/rexx
      ADDRESS POSTGRESQL
      SELECT * from tablename
      DO WHILE rowsleft() \= 0
      RETRIEVE row
      ADDRESS EMAILER
      SEND row TO emailuser@company.com SUBJECT "SQL Query Row"
      END

      Suddenly it doesn't seem quite so horrible, does it, when you realize that you can connect directly to any REXX-enabled application and control it as though you were written a script directly within that application?

      I'm not saying that I'd ever for a moment consider touching REXX code again without a large monetary incentive, but you should understand that noone said "hey, this language has no redeeming values, let's use it!". It has its own unique properties, and while the ugliness outweighs the good stuff, it certainly had its niche back in the day.

      --
      Dewey, what part of this looks like authorities should be involved?