O'Reilly on the Virtues of Rexx
gaijincory writes "O'Reilly's ONLamp has written an interesting article on the history and virtues of Rexx, the first widely used scripting language concocted 25 years ago. According to the review, 'Rexx employs decimal rather than binary arithmetic' and 'You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.'
I'd be interested to hear about any success (or failure) implementation stories."
Okay, I'm probably dating myself here (illegal in Nebraska, btw), but I remember REXX when it emerged as a replacement for EXEC which I had coded extensively in (written entire app systems) on IBM mainframes. There were a lot of benefits to REXX back then, notably it cleaned up and made transparent a lot of garbage and system management chores required to write clean EXEC code (e.g., strings tokenized at 8 chars, awkward variable interpolation)... I used REXX for a while on the mainframe and can't remember why I abandoned it.
Fast forward 2 or 3 hundred years, and I found myself dropped into a Unix universe, and quickly self taught myself the ins and outs of shell. Haven't looked back since. Now, I'm looking back and am intrigued... REXX really does have some interesting features. And, since I have a little free time on my hands, maybe I'll re-visit REXX, but from userland out there, any feedback would be useful:
IBM is still using REXX widely on z/OS.
Check out Ruby, the language. It runs circles around Rexx, is free and very cool. True objects, all the time. Garbage collection built in, as well as everything is an object. The best of Smalltalk, Lisp, BASIC, C, and more.
--- Old Time NeXThead
What, like Perl?
I've written scripts in REXX, and found it easy to write and easy to read at a later date. There are books available on the language. I'd recommend "The REXX Language" by Cowlishaw.
Mea navis aericumbens anguillis abundat
What I remember about REXX is that it was one of the few languages (along with Model 204 User Language) that made programming IBM mainframes FUN. Of course, nowadays IBM mainframes can be tweaked to run Linux and that opens up a whole slew of scripted languages to choose from.
-- SKYKING, SKYKING, DO NOT ANSWER.
- if I click on column 50 after the end of a 30-character-long line, the cursor sticks there and I can start typing - I don't have to type spaces or tabs to get to column 50
That is truly a great feature for blind users. Imagine not being able to see where the cursor is then having your editor suddenly decide to move it to somewhere else when you start typing. I can't believe editors think that tossing characters into the wrong place is acceptable in 2005. I can understand serious problems like that in 1985 when I first started using computers, but the fact that most editors are broken like that 20 years later is absurd.
PS: Why am I no longer allowed to post to Slashdot without help from someone that can see? Why the filter to prevent blind users from posting? Why does the person that runs this site hate the blind?
There is no requirement to work out types in order to declare variables.
Dynamically declared are a terrible, terrible, terrible thing.
Take the following JavaScript excerpt:
function foo()
{
for (i=0; i < 10; i++)
hello();
}
function bar(world)
{
for (i=0; i < 10; i++)
foo();
}
bar(i);
How many times does hello() run? It looks like it should run 100 times. But it only runs 10 times.
Add "var i" to each of those functions, and it behaves as expected.
Javascript in many respects is a good (core) language. With better inheritance and a few other tweaks, it could be an excellent scripting language. But dynamically allocated variables really, really hurts it.
Do daemons dream of electric sleep()?
Are these supposed to be positive points? Because it kind of flies in the face of coding best practices...
I take it you've never heard of LISP? It's a dynamically typed language that, despite being a few decades old (4 or 5 I think) is still seeing some decent usage. I believe the backend of Yahoo Stores is written in LISP, for example.
Defining your vars beforehand is good practice for strict, structural coding projects and languages. If you're working in a flexible language and you know what you're doing, it's rather unnecessary (not that I can claim to, but I'm learnin').
Jw
Raises hand here, if only to lament that Rexx, at least in the form of the linux regina clone, is a poor, no, poor to the point of starving to death, comparison to ARexx, written BY William Hawes for the amiga.
It was extensible by writing libraries for it, libraries that allowed it to do anything you were of a mind to.
When I was still running a big box amiga, Jim Hines and I (we were both working at a tv station, http://www.wdtv.com/> ) and needed a cron to run some of the very time consuming rendering jobs that lots of video people were running on amiga's a decade back.
So we wrote a cron in ARexx, and by carefull coding, its cpu hit was less than we could measure. Most of the wannabe cron apps for the amiga were coded to wait in busy loops till the clock matched, and of course used 20% or more of the cpu.
Eventually I bought a copy of rexx-plus, the only actual compiler for arexx there ever was, which could build standalone programs out of your arexx scripts.
You can yet, I think, download that to run on your old amiga, from Aminet.net, search for EzCron, latest version. IIRC the archive contains both the arexx script itself, and the compiled binary.
We did things in a couple of days using arexx that would have taken weeks in C. Repeatedly.
There is yet today, a headless old 2000/040 amiga there, running EzCron, and its executing additional arexx scripts to grab the prompter files for our newscasts from the news server in the news dept., and make them available for you to read at the above site. Incomplete sometimes because the news folks get lazy and don't transcribe to the prompter, whats said in a taped segment.
But when we looked at making those arexx scripts run on linux, regina upchucked all over the place because they were doing things that Rexx never had in its repertory. If that miggy ever dies for good, we'll have to rewrite them in bash, and that will take a couple of weeks to translate I expect. Bash I believe does have all the tools to do it. But its going to take a concerted effort we haven't found the time to do yet. Normal life keeps happening...
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
I've worked in the computer programming trade since 1965 when I learned COBOL '65 in the Air Force. This year, in semi-retirement, in an equally demanding role, I taught three classes of Java Programming in a local high school. I enjoy Java but I must admit a love for REXX.
I presented a paper on REXX at a REXX conference at Stanford University, May 1990. The topic of the paper was on the ease of portability between platforms. Subsequently to that, I working as a programmer at Bank of America's campus in Concord, CA, I trained all programmers there who wanted to stay late in how to program in REXX on MVS, VM, OS/2, DOS, and Windows platforms, the main differences being how I/O was handled.
The course I taught at BofA was about three hours long, an hour and 1/2 for two late afternoon sessions. So the learning curve was quite low.
In addition to teaching everything they needed to know, I also showed them how to code dynamic SQL statements in REXX code. I had already used REXX in a good bit of the code used for utilities and one-time jobs for the Cash Vault System that I was working on there.
There are few languages that one can learn completely in 3 hours. The Java classes (one AP and two general) took an entire high school year and I only scratched the surface even though I covered all 19 chapters of Cay Horstmann's "Java Essentials".
Those that turn their noses up at REXX I have found to be the same sort of people who think writing code is an IQ test and if they don't write code that no one else can maintain that they have somehow failed. I don't think programming has to be difficult and the best languages are those that are easy to learn and easy to program in while being able to get the job done and run efficiently. For quick and dirty code or seldom run utilities in production, REXX is an ideal language to use. Of course, for a program that is processing 10+ million records sequentially or updating a DB2 database for millions of transactions for real time access you want to use a compilable language.