Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
15 crawler(s) on-line.
 123 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 RobertB:  7 mins ago
 OlafS25:  57 mins ago
 Bruce72:  58 mins ago
 Rob:  1 hr 30 mins ago
 MEGA_RJ_MICAL:  1 hr 46 mins ago
 t0lkien:  1 hr 51 mins ago
 amigakit:  2 hrs 11 mins ago
 OneTimer1:  2 hrs 25 mins ago
 Troels:  3 hrs 26 mins ago
 Gunnar:  3 hrs 41 mins ago

/  Forum Index
   /  Amiga General Chat
      /  Does AReXX multitask scripts? Does it need be rewritten?
Register To Post

PosterThread
Raffaele 
Does AReXX multitask scripts? Does it need be rewritten?
Posted on 8-May-2017 8:56:35
#1 ]
Super Member
Joined: 7-Dec-2005
Posts: 1906
From: Naples, Italy

Oh well, it is since it was born AReXX that I know it is an interpreter so you can run only one instance of it, but in these past days I was wondering if it manages internally various scripts in a sort of roundrobin multitasking, granting all programs that invoke its internal script features to be interpreted one after another, or perhaps you need to pause one script and let a second one to be executed...

I was astonished when I realized I never know anything about this internal mechanism of AReXX and how it deals with multiple scripts invoked at same time...

So in this case it runs only one script at a time, do you all think it is better to enhance AReXX, or it is better to rely definitively on Python that it is way more powerful and versatile?

I think AReXX has still many arrows in its quiver that wait to be launched...

Last edited by Raffaele on 08-May-2017 at 08:57 AM.

_________________
"When the Amiga came out, everyone [at Apple] was scared as hell." (J.L. Gassée, former CEO of Apple France and chief of devs of Mac II-fx, interviewed by Amazing Computing, Nov 1996).

 Status: Offline
Profile     Report this post  
broadblues 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 8-May-2017 10:29:40
#2 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@Raffaele

Quote:

Oh well, it is since it was born AReXX


ARexx not AReXX

Quote:

that I know it is an interpreter so you can run only one instance of it,


Are you sure you know that? I freely admit to not being 100% sure on that level. But there multiple layers to ARexx there is the interpretation of the language but there is also the REXX function host, both provided by Rexxsyslib and initialised by external commnads like RX and RexxMast.


Quote:

but in these past days I was wondering if it manages internally various scripts in a sort of roundrobin multitasking, granting all programs that invoke its internal script features to be interpreted one after another, or perhaps you need to pause one script and let a second one to be executed...


It's trivial to determine that it 'multitasks'

Save the following trivial script to ram:test.rexx


/* */


do i = 1 to 10000
say i
end


The start two shells and type

RX ram:test.rexx in both of them, both scripts run in parralell.


Quote:

So in this case it runs only one script at a time, do you all think it is better to enhance AReXX, or it is better to rely definitively on Python that it is way more powerful and versatile?


Well you junped from your question and not knowing the answer to the most negative assumption that only one script can execute at a time, without any evidence to back it up...

Whether to use ARexx or python for a script depends mainly on what you want to do. Python gives access to al arge wealth of module based function and object libraries that you don't get with arexx, ceratinly not at the scripting level anyway, there are some external function librariess but to the same extent in ARExx as python.

Personally I use ARexx for short scripts that may need running frequently (arexx has alower startup overhead than python) and python for larger complex scripts that benefit from pythons more modern language features. Sometimes I use perl for the really heavy lifting... (perl for amigaos4 has an arexx module based on the API of the python one, so can do similar things)

Last edited by broadblues on 08-May-2017 at 10:33 AM.

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
Raffaele 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 9-May-2017 10:30:24
#3 ]
Super Member
Joined: 7-Dec-2005
Posts: 1906
From: Naples, Italy

@broadblues

Actually I do not have any functioning Amiga machine to test neither emulated Amigas...

_________________
"When the Amiga came out, everyone [at Apple] was scared as hell." (J.L. Gassée, former CEO of Apple France and chief of devs of Mac II-fx, interviewed by Amazing Computing, Nov 1996).

 Status: Offline
Profile     Report this post  
RodTerl 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 9-May-2017 12:28:18
#4 ]
Cult Member
Joined: 6-Sep-2004
Posts: 589
From: Rossendale

@Raffaele

Each Arexx script, when run, has its script memory space locked, so although arexx can manipulate text, it cant modify the script that is running directly, only by making a modified copy then running that.

You dont need an Amiga, as people have liked the software so much, that there is a whole collection of Arexx compatible and Arexx style variations. On Ubuntu you can get Regina Rexx from the software store. There is also Brexx and OoRexx.

And intresting thing about Arexx variation on Windows, is that apparently there is documentation that shows how to use the Amiga rexxmathlib.library in order to access the maths hardware under Windows without having UAE or other emulator involved. I think.

https://en.wikipedia.org/wiki/REXX

_________________
The older and more respected a scientist is, the longer it takes to prove him wrong.

 Status: Offline
Profile     Report this post  
Raffaele 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 9-May-2017 19:39:36
#5 ]
Super Member
Joined: 7-Dec-2005
Posts: 1906
From: Naples, Italy

@RodTerl

It is just the fact my Amigas have no any functioning power supplies, and the MacMini had its power supply completely covered by the pee of one of my kitten. I got it clean but since then I was afraid to power it on again!
Pegasos is at dad house...
On my Core 2 Duo I have Linux Kubuntu 16.04 that have many problems as it crashes Kwin x11 at any boot, it runs anyway, but I was no capable to get rid of this pop-up nuisance despite I tried all remedies I found on the web..

So no any time to install FS-UAE on my computer yet...

And no, I was no interested in running Linux Rexx as I wanted to know what was behaviour of Rexx into Amiga, not into Linux.

Interesting the part regarding Windows. That's vey curious!

_________________
"When the Amiga came out, everyone [at Apple] was scared as hell." (J.L. Gassée, former CEO of Apple France and chief of devs of Mac II-fx, interviewed by Amazing Computing, Nov 1996).

 Status: Offline
Profile     Report this post  
salass00 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 9-May-2017 20:34:19
#6 ]
Elite Member
Joined: 31-Oct-2003
Posts: 2707
From: Finland

@Raffaele

The ARexx interpreter as implemented in rexxsyslib.library is reentrant and RexxMast spawns a new interpreter process for each script that is executed.

I have no idea where you got this idea that only one script can be executed at a time...

 Status: Offline
Profile     Report this post  
olsen 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 10-May-2017 8:29:27
#7 ]
Cult Member
Joined: 15-Aug-2004
Posts: 774
From: Germany

@RodTerl

Quote:

And intresting thing about Arexx variation on Windows, is that apparently there is documentation that shows how to use the Amiga rexxmathlib.library in order to access the maths hardware under Windows without having UAE or other emulator involved. I think.

Yikes, that's cruel... rexxmathlib.library is a very thin wrapper for the trigonometric functions (and even the square root function) which are not part of the basic floating point math operations supported by the interpreter.

There is really nothing special about what rexxmathlib.library does: it only complements the REXX language as implemented by ARexx. There is no hardware acceleration implied, save for using the FPU via mathieeedoubtrans.library, and even that is not without its share of friction. Direct FPU access would have been the ticket, but rexxmathlib.library in its original form is so old (1988/1989) that direct FPU access was just beginning to be possible.

Last edited by olsen on 10-May-2017 at 08:51 AM.

 Status: Offline
Profile     Report this post  
olsen 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 10-May-2017 8:47:49
#8 ]
Cult Member
Joined: 15-Aug-2004
Posts: 774
From: Germany

@salass00

Quote:

salass00 wrote:
@Raffaele

The ARexx interpreter as implemented in rexxsyslib.library is reentrant and RexxMast spawns a new interpreter process for each script that is executed.

You are correct

Quote:
I have no idea where you got this idea that only one script can be executed at a time...
The ARexx interpreter and its moving parts do have some strange performance limitations. It's not a great stretch to conclude that there may be more limitations present

Fun fact: how to make ARexx run much faster on the 68030, 68040 and 68060? Remap the first 8 bytes of the address space into cachable fast memory. ARexx (and dos.library, too) do not cache the exec.library base which address 4 points to. Each exec.library function begins by obtaining the library base address by looking into non-cacheable chip memory.

Last edited by olsen on 10-May-2017 at 08:48 AM.

 Status: Offline
Profile     Report this post  
Raffaele 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 11-May-2017 2:10:39
#9 ]
Super Member
Joined: 7-Dec-2005
Posts: 1906
From: Naples, Italy

@olsen

Interesting. How to do it? Running a patch or modifying dos.library and rexxmathlib with a hex editor?

Does increment of speed affecting execution of ARexx on PPC systems, as long as they run ARexx thru Petunia or Trance that emulate 68xxx?

Last edited by Raffaele on 11-May-2017 at 02:12 AM.

_________________
"When the Amiga came out, everyone [at Apple] was scared as hell." (J.L. Gassée, former CEO of Apple France and chief of devs of Mac II-fx, interviewed by Amazing Computing, Nov 1996).

 Status: Offline
Profile     Report this post  
olsen 
Re: Does AReXX multitask scripts? Does it need be rewritten?
Posted on 11-May-2017 7:14:53
#10 ]
Cult Member
Joined: 15-Aug-2004
Posts: 774
From: Germany

@Raffaele

Quote:

Raffaele wrote:
@olsen

Interesting. How to do it? Running a patch or modifying dos.library and rexxmathlib with a hex editor?

I would not recommend tinkering with rexxsyslib.library or dos.library unless this is the kind of project which catches your interest, and you have the time to spare.

The cleanest solution which already works today really is to use the MMU to move the first page of the Amiga address space into cacheable fast memory. Back in 1996 I wrote a program called "FastROM" (it's on Aminet, documentation and source code included) which does that, and also maps the ROM into cacheable fast memory. It only works on 68040 and 68060 machines, mind you.

A lot of time has passed since then... It's very well possible that in the mean time, this kind of functionality is the standard for 68040/68060 based systems. I haven't checked, but you might want to try my old "FastROM" program. No idea if it still gets the job done (it could crash on you).

Quote:
Does increment of speed affecting execution of ARexx on PPC systems, as long as they run ARexx thru Petunia or Trance that emulate 68xxx?

Hard to say, but it always helps if the host system runs faster than the 68k machines of old

The low hanging fruit in accelerating ARexx interpreter performance is in improving how exec.library is used, such as through my old "FastROM" program.

Beyond that point deeper changes in how the ARexx interpreter works would be needed to get better performance out of it.

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle