User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Mon Dec 19, 2016 1:04 am

scruss wrote:yeah, but Dougie, it's vim: Linux's secret weapon for repelling users. Geany's okay and it's installed as standard.
At least vim is more sane than nano or emacs. I've never tried geany, because most of my Raspberries run headless and I'm happy scribbling code using vim.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Michael1950
Posts: 1
Joined: Thu Feb 26, 2015 11:45 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Mon Jan 02, 2017 2:09 pm

Well, that is a surprise, I would've thought that folks using REXX would be using the THE (mark hessling's) editor. The one thing I truly miss in Rexx is the lack of the BEGSTACK/ENDSTACK construct that was available in EXEC 2.

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Mon Jan 02, 2017 6:38 pm

Michael1950 wrote:Well, that is a surprise, I would've thought that folks using REXX would be using the THE (mark hessling's) editor. The one thing I truly miss in Rexx is the lack of the BEGSTACK/ENDSTACK construct that was available in EXEC 2.
That's somewhat amazing.

I stared at an EXEC2 program (it was part of NCCF/Netview) for about two hours and decided that whoever designed that programming language was more deranged than the folks who did the entirely backwards and insane COND=(xx,yy) in OS/VS1 JCL and that it would be the last time I would ever bother looking at EXEC2. That resolution remains in force.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

pgutti
Posts: 13
Joined: Sun Dec 11, 2016 8:43 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Wed Feb 15, 2017 2:04 pm

I run on a pi app that manages my fotovoltaic inverters.

I wrote a rexx to start the app (with logging). That works fine when starting in console mode. I tried to add that proc to .config/autostart. No luck! Did not autostart.
I tried also to add it to a start menu: It was added, but does not start from there.
Works only when starting it manually.

Any ideas?

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Wed Feb 15, 2017 5:59 pm

You should be able to start it from a systemd service file.

sudo nano /etc/systemd/system/rexxthing.service

Code: Select all

[Unit]
Description=rexxthing server

[Service]
ExecStart=/usr/bin/rexx /home/pi/myrexx.script.rex
Restart=always
User=pi
Group=pi
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rexxthing

[Install]
WantedBy=multi-user.target
get that enabled with sudo systemctl enable rexxthing and started with sudo systemctl start rexxthing
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jahboater
Posts: 5430
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Wed Feb 15, 2017 6:13 pm

Michael1950 wrote:Well, that is a surprise, I would've thought that folks using REXX would be using the THE (mark hessling's) editor.
I used XEDIT which I thought was rather good (on a 3270).
After using EXEC2 for some time, REXX was a breath of fresh air in comparison!

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Wed Feb 15, 2017 7:24 pm

jahboater wrote: After using EXEC2 for some time, REXX was a breath of fresh air in comparison!
That's because exec2 is the most insane language after APL. It's got the weirdest syntax abberations of any language I've ever had the misfortune to encounter.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

pgutti
Posts: 13
Joined: Sun Dec 11, 2016 8:43 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Wed Feb 15, 2017 10:54 pm

@Doug: I did what you recommended. But after reboot, the App did not apear. In HTOP i saw the start procedure "runICC", but the app did not come up. Will try again tomorow.

Code: Select all

console output:
[size=85][color=#0000BF]
[email protected]:~ $ sudo nano /etc/systemd/system/rexxthing.service
[email protected]:~ $ sudo systemctl enable rexxthing
Created symlink from /etc/systemd/system/multi-user.target.wants/rexxthing.service to /etc/systemd/system/rexxthing.service.
[email protected]:~ $ sudo systemctl start rexxthing
[/color][/size]

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Wed Feb 15, 2017 11:00 pm

What's in /var/log/syslog /var/log/daemon.log and /var/log/messages?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

pgutti
Posts: 13
Joined: Sun Dec 11, 2016 8:43 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Feb 16, 2017 9:28 am

Hi Dougie. Thank you for helping me - i'm a Unix newbie.
I looked at the syslog.. there are many entries, i need more time to analyse. I see that rexxthing server is started and stopped multiple times.. And there are error messages also. Will do a restart and see look at the syslog afterwards. Wil do this afternoon.

pgutti
Posts: 13
Joined: Sun Dec 11, 2016 8:43 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Feb 16, 2017 4:12 pm

Now i think i know the reason:
Feb 16 16:31:24 aicc rexxthing[418]: (ICC:438): Gtk-WARNING **: cannot open display:
Feb 16 16:31:24 aicc rexxthing[418]: ICC ended at 16 Feb 2017 16:31:25 - duration: 0hrs 0min
The app starts, but ends immediatly with above error msg.

I also tried to upload the syslog, but this forum refuses it "extension not allowed" - i tried blank, txt and aicc ??

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Feb 16, 2017 10:32 pm

You need to start graphical programs from the GUI autostart folder. You can't start those from @reboot in cron, or a line in /etc/rc.local or a service file - those things start too early.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Fri Feb 17, 2017 12:27 am

DougieLawson wrote:
jahboater wrote: After using EXEC2 for some time, REXX was a breath of fresh air in comparison!
It's got the weirdest syntax abberations of any language I've ever had the misfortune to encounter.
You've never used an AS/400 then - to see what's running ('Work with Active Jobs' - WRKACTJOB) is one of the most sane.

PhilClowes
Posts: 3
Joined: Fri Feb 24, 2017 6:36 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Mar 02, 2017 7:29 pm

Not sure if this should be a new thread ..
I am an old hand at REXX and I am much more productive with it that trying to figure out the python equivalents.
What I am looking for, for running an app on the RaspPI, is the ability to control the GPIO pins.

I saw somewhere that there was a PDF about someone who'd managed that -- but I simply couldn't find the existence of any packages for it.

Does anyone have a working setup for the direct control of the pins from a rexx (regina) exec ?

t.i.a
If all you have is a hammer, everything looks like a nail

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Mar 02, 2017 8:51 pm

I'd do it by installing WiringPi and using the gpio command from a REXX program. If you have a level of masochism you could write a REXX function package to do it (I don't know of one that exists).

You can run external programs with

Code: Select all

/* rexx */
say "Gordon's alive"
address bash "runsomeshellscript thing here"
say "Flash ah, ah"
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

PhilClowes
Posts: 3
Joined: Fri Feb 24, 2017 6:36 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Mar 02, 2017 9:07 pm

Cheers Dougie -- I will look at that.
I will check out the docs on regina, I thought the recommended syntax was to use address system:

"address system 'command....' with output stem st. error stem er. "
or is that like using bpxwuinx vs address sh ?
DougieLawson wrote:I'd do it by installing WiringPi and using the gpio command from a REXX program. If you have a level of masochism you could write a REXX function package to do it (I don't know of one that exists).

You can run external programs with

Code: Select all

/* rexx */
say "Gordon's alive"
address bash "runsomeshellscript thing here"
say "Flash ah, ah"
If all you have is a hammer, everything looks like a nail

User avatar
DougieLawson
Posts: 38489
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Mar 02, 2017 9:08 pm

I'm using REXXLA not Regina.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

PhilClowes
Posts: 3
Joined: Fri Feb 24, 2017 6:36 pm

Re: Regina-REXX and the COMPUTE.REX module for Dougie Lawson

Thu Mar 02, 2017 9:28 pm

Ahh, thanks
DougieLawson wrote:I'm using REXXLA not Regina.
If all you have is a hammer, everything looks like a nail

Return to “Other programming languages”