IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New REXX??? As in Tyrannosaurus? <vbg?
New Pretty much, considering
the age of the language. OTOH, that means it's got most of the bugs shaken out.\r\n\r\nHell, AFAIC, rexx is the cat's meow of scripting languages. It's sooooo easy that programming in it can hardly be called programming:)
--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New REXX is the pre-perl perl
New Maybe...

But it's a lot easier than perl is... to me at least. I mean, it doesn't get a lot more natural than:

\r\n\r\n
/* Hello.cmd */\r\nsay 'Hello, world!'\r\n/* eof */
\r\n\r\n

Actually, now that it's got procedural and OO versions, I suspect rexx could be a good pedagogical language for teaching the two main programming methodologies... the fact that the OO variant is a very clean implementation of OO concepts (much cleaner than C++ or VB6) can only be considered a major plus.

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New Cheap shots :=)
C++ or VB6 vs. Rexx? Oh that's a low blow, Rexx shouldn't even be spoken of in the same breath as those two monsters. VB6 is a tyrannosaur, Rexx is a mere mosasaur. Or anklydon. Or something non-flesh eating, at least.
New How is that a lot easier?
Compare to the Perl version:

print "Hello, world\\n"

Doesn't seem to me to be any harder. (OK, I need the \\n - but if I don't want that there I don't need to remember another function.)

Seems like a pretty irrelevant difference to me.

Ben
"Career politicians are inherently untrustworthy; if it spends its life buzzing around the outhouse, it\ufffds probably a fly."
- [link|http://www.nationalinterest.org/issues/58/Mead.html|Walter Mead]
New I didn't say easier.

I said more natural. Say implies output to me a lot more than print does... there are many ways to say things... a glance can speak as well as (if not better than) the mouth can. Printing, otoh, is about paper and ink.

\r\n\r\n

It's those little touches that make it great:)

\r\n\r\n

Here, a little sales tax calculator for Quebec:

\r\n\r\n
numeric digits 2\r\ndo while input \\= 'END'\r\n   pull input\r\n   say input * 1.07 * 1.08 /* Yes, they tax the tax. I believe the\r\n                            * technical term for this is "money\r\n                            * grubbing." */\r\n\r\nend
\r\n\r\n

If you're at a rexxtry prompt: «do while input \\= 'END'; pull input; say input * 1.07 * 1.08; end», and you get a little interactive prompt that you can just pump the numbers into and get your answers back.

\r\n\r\n

I find that to be a very natural way to write little one-off programs for doing those little things. That's one of the places where rexx is really strong.

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New OK, but...
When I saw "say" I was left wondering whether there would be a return. I had to go google for that.

With my example - perhaps it is that I know Perl but - there seems to be no ambiguity about print. It means output what it is given. No newline inserted.

6 of one, a half-dozen of the either.

Cheers,
Ben
"Career politicians are inherently untrustworthy; if it spends its life buzzing around the outhouse, it\ufffds probably a fly."
- [link|http://www.nationalinterest.org/issues/58/Mead.html|Walter Mead]
New Equivalent in REXX

is charout. It's line oriented counterpart is lineout. They are both also methods for output objects in object rexx.

\r\n\r\n

Classic REXX:

\r\n\r\n
/* hello.cmd */\r\ncharout('Hello, World!')\r\nlineout('Hello, World!')
\r\n\r\n

has the following output

\r\n
Hello, World!Hello, World\r\n<crlf>
\r\n
\r\n\r\n

Object REXX

\r\n\r\n
.output~charout('Hello, World!')\r\n.output~lineout('Hello, World!')
\r\n\r\n

has the same output.

\r\n\r\n

In general, say is pretty much functionally identical to lineout, but it's an instruction, not a function, which makes it useful in places where lineout is not so useful. It's also good to use if you want your program to be more portable... the implementation of say can be quite different on another hardware platform (like eg mainframes) where a lot of the architecture choices of the PC platform just don't apply.

\r\n\r\n

About the ORexx snippet: sometimes, you want to use the .output object, as it can be redirected quite easily, so that a function or method can be run within a context where .output can be stdout, a serial device, etc. Sometimes, you might want to direct it someplace specific:

\r\n\r\n
.stderr~charout('You borked it up this time, Mr. Bond')
\r\n\r\n

Though it's generally a good idea to keep platform specifics in mind when figuring out how to handle things like that.

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New BZZT - Utterly wrong
@And #you $know %why.
-drl
New know how you feel
I had the same reaction when I first encountered Perl. The non-alphabetics were distracting. When I tried to ignore them, the code made even less sense. After a while I began to "get it" and started thinking in Perl. It was a tough adjustment as I didn't have a C, or even a Unix background. Hashes were easy, list vs. scalar mode tripped me up a few times. Now it all makes some kind of sense. Sometimes it's different on different days...
Have fun,
Carl Forde

ps. That's $#you
     Excel 97 spreadsheet to Excel database + form. Tips? - (Another Scott) - (43)
         I'd export to a delimited file - (drewk) - (14)
             Thanks, but that's not what I'm looking for... - (Another Scott) - (13)
                 There's another issue with XL. - (mmoffitt) - (12)
                     Get warp and mesa - (jake123) - (11)
                         REXX??? As in Tyrannosaurus? <vbg? -NT - (mmoffitt) - (10)
                             Pretty much, considering - (jake123) - (9)
                                 REXX is the pre-perl perl -NT - (wharris2) - (8)
                                     Maybe... - (jake123) - (5)
                                         Cheap shots :=) - (wharris2)
                                         How is that a lot easier? - (ben_tilly) - (3)
                                             I didn't say easier. - (jake123) - (2)
                                                 OK, but... - (ben_tilly) - (1)
                                                     Equivalent in REXX - (jake123)
                                     BZZT - Utterly wrong - (deSitter) - (1)
                                         know how you feel - (cforde)
         Nah...its trivial in Access too. - (bepatient) - (8)
             God, Beep! Bound Forms! Bleech! - (mmoffitt) - (7)
                 It sounded like what he needed. - (bepatient) - (6)
                     Understood. - (mmoffitt) - (5)
                         Not knowing Access all that well... - (CRConrad) - (4)
                             The problem with Access. - (static) - (1)
                                 nutshell: Access expects denormalization. - (tseliot)
                             Access has some "special features" - (mmoffitt) - (1)
                                 Thanks, that's quite enough. On that other thing, though... - (CRConrad)
         DTS? - (gdaustin) - (18)
             Spreadsheet grows up to be a Real Application - (gdaustin) - (17)
                 I'm looking at Access and MySQL now. - (Another Scott) - (16)
                     Access, MySQL, PostgreSQL? Why don't you consider a REAL... - (CRConrad) - (15)
                         Christian, WTF are you on about? - (admin) - (13)
                             In that case, I'll point to one it *does* have: - (CRConrad) - (12)
                                 Um, my tinfoil hat seem to work better on you than on admin. - (Another Scott) - (1)
                                     Yours?!? Isn't it *I* who should be wearing one? - (CRConrad)
                                 PostgreSQL Python drivers... - (admin) - (9)
                                     Lot better than I thought... All your fault, though! ;^) - (CRConrad) - (8)
                                         Re: Lot better than I thought... All your fault, though! ;^) - (admin) - (7)
                                             "user-defined types" - would that be SQL-standard 'domains'? - (CRConrad) - (3)
                                                 user-defined types - (admin) - (2)
                                                     Wow, cool; the FB dev list is only now talking about that... - (CRConrad) - (1)
                                                         Postgres is really a research database - (admin)
                                             That...is frickin cool. - (tseliot) - (1)
                                                 What, the inheritance? - (admin)
                                             Cool! - (deSitter)
                         I glanced at it, but didn't bite. - (Another Scott)

I wear permanent press so I'm always creased.
193 ms