Author Topic: Regina REXX vs. OS/2 REXX  (Read 35028 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4744
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Regina REXX vs. OS/2 REXX
« on: September 29, 2014, 04:38:53 pm »
Hi

I have not much idea about this topic, so I wanted to ask you feedback to brainstorm this idea.

Since OS/2 REXX interpreter/libraries are close source, how do you see the possibility to replace OS/2 REXX library included in eCS-Warp4.52 with the open source Regina REXX (as an experiment, I'm not requesting/demanding to do it at your home).

- Do you think it may be something that can be done?
- What is the experience on running Regina REXX OS/2 port on this platform?.
- Is something else that OS/2 REXX has that Regina is missing?
- What can get broken on OS/2 replacing REXX with Regina REXX?

Just go ahead and  give your thoughts on  this idea.

Regards.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andy Willis

  • Sr. Member
  • ****
  • Posts: 292
  • Karma: +7/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #1 on: September 29, 2014, 07:32:13 pm »
Regina REXX is a Classic REXX not Object REXX... I can't speak to the compatibility nor if it has the integration that it has.  If Open Object REXX were ported and replaced Object REXX then Regina REXX might be able to be used in place of Classic REXX. 

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #2 on: September 29, 2014, 10:25:39 pm »
Executing scripts that are written for OS/2 REXX requires adaption to behave the same in both OS/2 and Regina REXX in many cases.

Therefore the question: What do you want to achieve with replacing the interpreter? The interpreter works already well. What needs to be extended is the amount of REXX libs. In other words: I don't think we need Regina REXX on OS/2.

Far away is porting Open Object REXX to OS/2.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4744
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Regina REXX vs. OS/2 REXX
« Reply #3 on: September 29, 2014, 10:39:33 pm »
Hi Andreas.

I'm just being curious about this. I came up with this topics because I try to find replacements for OS/2 close source components. Just save to me the "If it is not broken, don't fix it",  I'm just brainstorming about this and not forcing anybody to replace REXX.  I personally think that we need to start thinking/moving on replacing the OS/2 close source components, because when it gets broken, we will not be able to fix it because we don't have the source code.

So for the moment I have:
1) All the OS/2 REXX scripts should need to be adapted for Regina.
2) Every app in "Object REXX" will fail running over Regina. Plus we don't have "Open Object Rexx" ported.

Anyone had tried Regina REXX deeper on OS/2-eCS platform?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #4 on: September 29, 2014, 11:17:59 pm »
So for the moment I have:
1) All the OS/2 REXX scripts should need to be adapted for Regina.
It's more likely someone will create a special OS/2 compatible mode for Regina than people change every REXX script. Trying to add 100 % compatibility is a must for system components like that. Faced with compatibility, we should rather fix the root of issues, if at all.

2) Every app in "Object REXX" will fail running over Regina. Plus we don't have "Open Object Rexx" ported.
Porting Open Object REXX, including the GUI designing components, would be very welcome for many users. Others are more interested in having the usability of modern languages on OS/2 improved.

Maybe it's more useful to integrate newer languages in the system like REXX is now? (REXX has many disadvantages compared with them.) Python would be a good candidate for replacing the functionality of REXX on a modern OS/2.

With staying at Classic REXX we are isolated from users of other systems. Sooner or later Classic REXX will die. Making Open Object REXX (with its GUI extensions) available could help, as well as integrating another language into the system.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4744
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Regina REXX vs. OS/2 REXX
« Reply #5 on: September 30, 2014, 07:46:37 pm »
Maybe it's more useful to integrate newer languages in the system like REXX is now? (REXX has many disadvantages compared with them.) Python would be a good candidate for replacing the functionality of REXX on a modern OS/2.

That is an interesting approach. Maybe it will be more interesting to put the efforts on Python instead of worrying about the old REXX. 

But when I get time I want to give it a try on Regina.  I'm not a REXX script hobbyist, but maybe one day I will give it a try to test the REXX scripts I stored here (https://github.com/OS2World/CMD-Scripts) and give them a try with Regina. 
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4805
  • Karma: +99/-1
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #6 on: October 01, 2014, 02:36:07 am »
It's funny, yesterday in a different forum, I saw someone wishing for Rexx, as he called it the OS/2 scripting language.
The beauty of Rexx is it was designed for non-programmers and is also one of the best languages for adding a macro language to other apps. Python fails if you just indent wrong though many consider it a good choice for beginners.

Fahrvenugen

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +4/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #7 on: October 01, 2014, 03:05:12 am »
I do lots of stuff in classic REXX.  Admittedly on OS/2 I use the built-in REXX support, it just plain works.

I've used Regina quite a bit on both Linux and Windows.  I've found that in general all the REXX stuff that I've developed on OS/2 works fine on Regina in either Linux or Windows (sometimes with very minor modifications).  The only things which don't work are times when I've tied into some specific part of OS/2 or if I've done a quick hard-code of a drive folder / path into the code itself (I generally try and avoid this, but sometimes just to quickly get something up and running to test a concept out I'll do this).  I admit I'm not doing anything hugely complex, usually the projects I put together are either things that I just need to be done for some particular purpose and / or the "commercial software" which will do the same thing costs lots of money.  Sure, I could do any of the same projects in something like Python or PHP, but I've found that I can usually achieve the same end result a lot quicker in REXX.

What I like about REXX is that while it may not be considered the most modern language, for many projects I find it to be one of the quickest languages (at least for me) to go from a concept or idea to having actual working proof of concept code.  And then it is equally quick to take that code, finish development of the project, easily debug, put into production, and run the same code unmodified on multiple platforms (Linux and / or Windows) - even if it was developed on OS/2.

The one thing that I have found - when I talk to other people in the IT world that I know, I'm one of the only ones who knows much of anything about REXX - regardless of whether it is Classic or Object REXX.  I know lots of developers who will turn to Python or PHP to do do things that I would normally do in REXX. 

Keep in mind that one of the original design goals for REXX was to be a  common language that could be used across the varying range of incompatible models of mainframe computers that IBM had on the market.  That design goal led to REXX code being extremely portable while being able to handle both simple and more complex tasks.

As for something like Python - I have no problem with having Python on OS/2, however I'd point out that Python is ported to OS/2.  There's a couple of older versions on Hobbes. Paul Smedley has also ported Python (along with his port of PHP) available on his site too.

Regina on OS/2 - I admit I've never actually tried it.  When I'm working on OS/2 I just use the built-in REXX support. 
« Last Edit: October 01, 2014, 03:07:22 am by Fahrvenugen »

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #8 on: October 01, 2014, 11:22:06 pm »
I'd point out that Python is ported to OS/2.
Sure. Therefore I wrote about adding the functionality of REXX on OS/2 to Python.

The advantage of most REXX libs is that they were specially written for REXX. Compared with C libs a REXX lib contains much less functions that are as easy to use as possible. Other langs on other OS have just the feature added to use standard C libs. That is better then nothing, but not very user-friendly.

The disadvantages are that too few exist and that C libs actually can't be used with REXX. Therefore I  was thinking about using another language as the way to go in the future.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4744
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Regina REXX vs. OS/2 REXX
« Reply #9 on: October 02, 2014, 08:05:22 pm »
Thanks for the replies.

What I want to try,  when I finish "OS2World Github" source code upload, is to give it more time to experiment Regina REXX.

Maybe on a VM machine I will test some REXX scripts I collected (https://github.com/OS2World/CMD-Scripts), run them on OS/2 REXX see if they work and after that wipe out (delete) the OS/2 REXX and install Regina and see what breaks.

...just to experiment.  But if anybody wants to give it a try before me, he is welcome.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

guzzi

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +0/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #10 on: October 02, 2014, 09:32:48 pm »


Whenever I read your alias here, I mentally add some letters and make it Fahrvergnugen. What's worse, it takes me hours to get rid of Kraftwerks "Autobahn" afterwards....

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #11 on: October 03, 2014, 01:22:57 pm »
I do lots of stuff in classic REXX.  Admittedly on OS/2 I use the built-in REXX support, it just plain works.

...

So true all you wrote.

It's fairly easy to write a REXX extension library that can use C libraries, but someone has to do it.
It's even easier with a String class that can handle and convert from/to numbers and strings.

I dislike Python because of the strict and rigid indention rules.
===

OS/2 REXX is integrated with the os.
Regina is a separate executable.

Regina lack something I've come across and use in Classic REXX under OS/2-eCS.
Code: [Select]
/* "Main" entry of script */
stem.0 = 2
stem.1 = "Hello"
stem.2 = "World"
my_array.0 = 4
my_array.1 = "Say"
my_array.2 = "hi!"
my_array.3 = "to"
my_array.4 = "everyone"
my_variable = "Some text"
dont_expand_variable = "Exposed variable"
expand_variable = "stem. my_array. my_variable"
dont_expand_variable = "Hello!"
RETURN rexx_function_name()

/* Function below */
rexx_function_name PROCEDURE EXPOSE (expand_variable) dont_expand_variable
SAY expand_variable
SAY dont_expand_variable
DO i = 1 TO WORDS( expand_variable )
  check_variable = SUBWORD( expand_variable, i, 1 )
  IF RIGHT( check_variable, 1 ) = '.' THEN
    /* Assume this is a stem (array of accessible values).*/
    DO j = 1 TO VAL( check_variable'0' )
    /* Will output the text set in "main" */
      SAY VAL( check_variable''j )
    END
END
RETURN 0

The above code work in OS/2 Classic REXX and output "stem. my_array. my_variable" AND you can access the contents of stem.0 , stem.1, ... stem.N and my_array.0, my_array.1 ... my_array.N and my_variable just as with "dont_exand_variable" that will output the text "Exposed variable".

The same goes for parsing...
In OS/2 Classic REXX you can
...
/* Example code for PARSE below */
delimiter = "/"
text_2_parse "this is an example of text/code to split on the character with / into smaller parts."
DO WHILE POS( delimiter, text_2_parse ) > 0
  PARSE text_2_parse WITH pre(delimiter)test_2_parse
  SAY pre
END
SAY test_2_parse
/* end of example */
Would output:
this is an example of text
code to split on the character with
 into smaller parts.
======
ADDRESS in Regina is something I like that is very powerful.

xynixme

  • Guest
Re: Regina REXX vs. OS/2 REXX
« Reply #12 on: January 19, 2017, 11:25:48 am »
The cross-platform Regina may be virtually closed-sourced and dead too, because of the competition of Open Object Rexx.

There won't be a single answer. My preferred order: 1. Regina, mainly because of an ANSI Date() built-in function with more than one argument, and the improved syntax checking. That's why I'm using IBM's Object Rexx too. 2. A stable old version of Open Object Rexx, version 3.2ísh, same reasons as Regina and it may be easier to port than even more Windowsified versions. 3. An up-to-date version of Open Object Rexx, albeit it's extremely unlikely that I'll need an easy language covered by yet another version of more complex object-oriented code, so I'll use it the same way as both #1 and #2. To execute ANSI Classic Rexx code.

If Regina can execute about as many Rexx apps as IBM's Object Rexx, then one may experience new problems, but the status will be about the same. Use it, and SWITCHRX back if you need your second choice to execute a specific app. IBM's Object Rexx won't execute all Classic Rexx code, so why should Regina be able to execute all Classic Rexx code?

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Regina REXX vs. OS/2 REXX
« Reply #13 on: January 23, 2017, 12:14:57 pm »
You can download regina (3.9.2) from rexx.org and compile to whatever platform you like.
I use OpenWatcom btw but not in OS/2.
It's even possible to translate it to various languages.

We want IBM to release the OS/2 specific code (WPS/SOM support etc.) so we can compile it and Open Object REXX and get up to date.

//Jan-Erik
« Last Edit: January 23, 2017, 12:20:09 pm by Jan-Erik Lärka »

xynixme

  • Guest
Re: Regina REXX vs. OS/2 REXX
« Reply #14 on: January 23, 2017, 05:00:33 pm »
You can download regina (3.9.2) from rexx.org and compile to whatever platform you like.
I use OpenWatcom btw but not in OS/2.

So then the last compiled version appears to be 2015's 3.9.1. I'm not expecting weekly updates of probably the best Rexx interpreter, but last time I checked it was stated that it was "dead". Not a quote, but "dead" instead of dead. New developments weren't that likely, due to (the not that open) Open Object Rexx.

It's even possible to translate it to various languages.

If one wants to embed it in OS/2, then perhaps it has to be translated twice. IBM used specific words, and translating the words "desktop", "file mask characters" or "shadow" will most likely result in at least one wrong or unusual, popular translation if IBM's words aren't used.

We want IBM to release the OS/2 specific code (WPS/SOM support etc.) so we can compile it and Open Object REXX and get up to date.

nice-to-have.~be~would~product~the~of~rating~best~My~interpreter.~Rexx~Classic~any~with~Watcom's,~like~GUI,
existing~any~use~to~able~be~should~you~OS/2~With~GUI.~a~use~to~code~copied~I've~because~only~but~once,
Windows~for~code~Rexx~Object~IBM~written~have~I~effort.~extraordinary~an~worth~isn't~it~guess~I~but~Rexx,
Object~Open~want~will~community~small~A~files.~*.BAT~object-oriented~need~don't~I~like~just~code,
Rexx/2~Object~used~never~I've~coding.~OO~for~candidate~a~is~which~code~than~Rexx)~used~having~not~to
excuses~more~seen~probably~I've~here~and~it,~need~doesn't~INSTALL.CMD~an~language,
easy~an~be~to~supposed~It's~interpreter.~object-oriented~up-to-date~an~needs~programmer~Rexx~typical~nor
user~average~the~that~sure~not~I'm :)
« Last Edit: January 23, 2017, 05:18:32 pm by André Heldoorn »