Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jan-Erik Lärka

Pages: [1] 2 3 ... 19
1
Programming / ooRexx to control GhostScript
« on: October 14, 2024, 06:37:59 pm »
Hello,

here's a "library" and the script (rename pdf.txt to pdf.cls and TestPDFLib.txt to TestPDFLib.rex ) to use it.
The script should run on win, *nix and os2, but seem to fail on the latter for some functionality.

Note that you may have to tweak ooRexx rexxsetenv.cmd to even be able to access GhostScript.
Run with:
Code: [Select]
rexx TestPDFLib
One can of course write code to do these things in classic rexx, object rexx and plain command line as well,
but the interesting part here is that it should be reusable (not possible with classic rexx).
With some adjustment it should work with Object Rexx as well.

It can be used to merge separate PDF-files, but example of that is not included.


2
Programming / Re: Classic, Regina, Object and Open Object Rexx
« on: October 06, 2024, 10:31:01 am »
NetRexx
  • The last version that ran with our Java (1.)6 was 3.04, as they then compiled it to require features introduced with Java (1.)8 in later NetRexx versions
  • I understand that NetRexx create byte code that the java engine run, but with the additions of Rexx like libraries that add useful features that resemble Rexx.
  • It claim to be like Rexx, but due to the underlying requirement to follow a ceratin structure the code one can write, need to have a certain structure that I don't recognize from Rexx.

Consensus was that Object Rexx for OS/2 wasn't good enough (good features, but bad memory handling, speed and stability due to the complier used), thus not set as default.

WPS integration
Both IBM Classic Rexx (crexx from now on) and IBM Object Rexx (orexx from now on) is integrated with the system, that's why you need to switch rexx interpreter with the command SWITCHRX (see the code of SWITCHRX.CMD in your OS2-folder) that aslo reregister files such as
REXXSC.DLL
OREXXSC.DLL
REXXSOM.DLL
OREXXSOM.DLL
REXXWPS.DLL
OREXXWPS.DLL
that enable crexx  and orexx to be the scripting engine for applications as well as talk to the wps through SOM etc. etc. that interact with the scripting engine to launch it from command line without first typing a scripitng engine name such as rexx <script_to_run.ext>. Guess DB2 intergation and other rexx enabled applications use the currently enabled scripting engine.

When I talk about WPS integration I also mean the programming interface "rexxsaa", not just SOM or WPS.
Code: [Select]
/*
 * Filename: dbug.cpp
 *   Author: JanErik
 *  Created: Sun Oct  6 2024
 *  Purpose: Compile into dbug.exe and debug "it" with Watcom Visual Debugger (wdw) to correct libraries (dll:s) you write for rexx (see unimix rexx .dll)
 *  Changes:
 */
#define INCL_REXXSAA
#include <rexxsaa.h>
#include <iostream.h>

int main(int args, char *argn[]) {
  LONG      return_code;                 /* interpreter return code    */
  RXSTRING  argv[1];                     /* program argument string    */
  RXSTRING  retstr;                      /* program return value       */
  SHORT     rc;                          /* converted return code      */
  CHAR      return_buffer[250];          /* returned buffer            */
                                     /* build the argument string  */
  CHAR      retval[1];
  retval[0] = '\0';

  if( args > 2 ) {
    MAKERXSTRING( argv[0], argn[1], strlen( argn[1] ) );
  } else {
    MAKERXSTRING( argv[0], retval, strlen( retval ) );
  }
                                       /* set up default return      */
  MAKERXSTRING(retstr, return_buffer, sizeof(return_buffer));
  return_code = RexxStart(args,           /* one argument               */
                          argv,        /* argument array             */
                          argn[1], /* REXX procedure name        */
                          NULL,        /* use disk version           */
                          NULL,    /* default address name       */
                          RXCOMMAND,   /* calling as a subcommand    */
                          NULL,        /* no exits used              */
                          &rc,         /* converted return code      */
                          &retstr);    /* returned result            */
                                       /* process return value       */
                                       /* need to return storage?    */
  if (RXSTRPTR(retstr) != return_buffer)
    DosFreeMem(RXSTRPTR(retstr));      /* release the RXSTRING       */

  return 0;
}

There's a nifty script by Steven Levine out there that can enable one or the other on the fly, but then one can't rely on that a certain is enabled but has to fall back to always has to assume crexx to start with.  >:(
crexx is not aware of any of the new features, so with it still the default it is not really useful.

3
Programming / Classic, Regina, Object and Open Object Rexx
« on: October 01, 2024, 06:58:57 pm »
I see that the knowledge of REXX is somewhat limited even with OS/2 users.

Classic Rexx (by IBM) is the default scripting language in OS/2, eComStation and ArcaOS and one just need a simple text editor and write in fairly plain English.
It allow you as a user to write scripts to aid you with certain tasks and it is well integrated with the system so that you don't need to specify an executable to run a script, but it also drive applications as the "engine" written with for example DrDialog, VX-REXX and even code you can write yourself and compile.
It is not possible to create reusable text libraries of code to just call, but one can write functions in the script that perform certain tasks. It's is however possible to use external compiled libraries.

Regina Rexx (by Mark Hessling) is more modern, very similar to Classic Rexx, but lack the system integration.
It is more up to date than Classic Rexx and probably also somewhat more reliable.

Object Rexx (by IBM) addressed some of the shortcomings of Classic Rexx, and on can switch to it in OS/2, eComStation and ArcaOS, while the way to write code also evolved and introduced ~ and arrays with [] but also external reusable code libraries, written in plain text Object Rexx.
Object Rexx is just as well integrated with the base OS as Classic Rexx, can run and use Classic Rexx scripts end external compiled libraries and be the engine for DrDialog, VX-REXX etc., but was never set as default due to that the OS/2 version had some flaws caused by the compiler used, if I remember correctly.

Open Object Rexx (by RexxLA)
has refined what IBM created with Object Rexx and also cleaned up some syntax and introduced a lot of useful and powerful stuff. We now have an up to date and current ooRexx back ported to OS/2 but the integration found in Classic Rexx and Object Rexx is missing so DrDialog, VX-REXX etc. can not benefit from the new features, easier and simpler way to express complicated information and relations etc. but still need to rely on those old scripting engines to be present. If we'd have the intergration Classic Rexx and Object Rexx could be phased out in favor of the new and open version. What we need is what I express as the integration part and that it can run in any command line environment, not only 4OS2.

So what can one do with REXX you wonder?
Alex Taylor has for example written some excellent software that you may have used, both command line scripts and GUI applications like Naps and ANPM to mention a few.
Glassman wrote AutoWGet that is very helpful to fetch things from the internet
and much more...

I use ooRexx to automatically create documents with maps to send to owners of land at work, drive office applications, vector drawing applications such as OpenOffice Draw, Calc etc. split/merge/extract text PDF documents with GhostScript and retrieve routes from google between places etc.

I would like to get your attention to push for an update to the wps integration stuff and enable it for ooRexx on OS/2, without reinventing the wheel from scratch.
The problem is that IBM have a cross licensing agreement with another party (Amiga)?!

4
Setup & Installation / Re: How to? python, pip and language tool
« on: June 12, 2024, 06:30:58 pm »
I'm not familiar with python, it's something-linux, so I need your help to grasp what to do.

5
Setup & Installation / How to? python, pip and language tool
« on: June 11, 2024, 08:28:55 pm »
i have a need to run something that can translate text and the tools provided now all seem to use python and require pip etc.

One can use a standard OS/2 command prompt an run the command as Python 3.7 and onward comes with an ensurepip module.
python -m ensurepip --upgrade
it seem to install version 23, but another run, upgrade it to version 24.

Am aware that it may not know how to handle ArcaOS and OS/2, but it may be possible to iron out some things.

How can one install a downloadable AI tool, translation tool etc. ?
I wouldn't mind a tool to just select what to install.

Example of google translator, but the others seem to have similar issues as seen below.

[C:\usr\lib\python3.9\site-packages]python pip install googletrans
WARNING: The directory 'd:/home/.cache/pip' or its parent directory is not owned
 or is not writable by the current user. The cache has been disabled. Check the
permissions and owner of that directory. If executing pip with sudo, you should
use sudo's -H flag.

Collecting googletrans
  Downloading googletrans-3.0.0.tar.gz (17 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  pip subprocess to install build dependencies did not run successfully.
  exit code: 2

  [1 lines of output]
  C:\USR\BIN/python.exe: can't open file 'C:/usr/lib/python3.9/site-packages/C:/
usr/lib/python3.9/site-packages/pip': [Errno 2] No such file or directory
  [end of output]

 note: This error originates from a subprocess, and is likely not a problem wit
h pip.
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 2

See above for output.

note: This error originates from a subprocess, and is likely not a problem with
pip.

//Jan-Erik

6
Applications / Re: A thought remote 2 local
« on: May 26, 2024, 12:00:15 pm »
Hi Jan-Erik,

Similiar to Application As a Service (AAS)?

Perhaps it is that to start with, but turn into individual real native executables as it evolve, leveling out demand on many servers.

7
Applications / A thought remote 2 local
« on: May 26, 2024, 09:37:41 am »
I would like to discuss something I've thought about for some time.
Do try to keep an open mind as you read it, with portions/combinations of virutal machine, rdp, citrix, odin, compiler, pathremapper etc.

Imagine that we have an OS but yet no current major applications for it.

If we could get one application that run "remotely" or in a virtual environment on another os, that would in the initial release send over bitmaps of the applicaiton window.
On the client side (on our OS) we would have an application that draw the application window on our desktop.
The client handle clipboard, send mouse and keyboard input to the server that start and run the application.
Nothing fancy, this is basiclly VNC today, but without a fully visible desktop.

The next release of the server would send over the resources (dialogs, bitmaps/images etc.)
The next release of the local client use local look and feel for those resources when applicable.

The server should then in small steps take over and act as sandbox to the application on the server.
Send drawing commands through the server instead of capturing images of the window. The server need to return that the drawing operation as "completed successfully" right away to not stall execution, while transferring the information to the client, thus use some asyncronious mechanism.
The client should take over drawing as much as possible.

The server determine portions of the execution that doesn't rely on external libraries (dll:s and system calls) as those should be possible to hand over to the client to store as executable code.

The server determine portions of the execution that rely on system calls and hand those over to the client to call versions available on our OS, compile locally and store as executable code.

I guess that the trickier parts emerge at this point, as the server handle external libraries that depend on each other and recreate/interpret (a 64-bit like odin) send it over to compile locally to our client OS and save as library.

Depending on the server OS, hard coded system paths and delimiters ( / instead of our \ ) may need special attention or subsystem support to not cause headache.

This is also the point when simple applications should be able to run on their on, locally on our until now "client" OS, without server and thus no longar as "client". The more libraries that can be translated the more applications will run, but the hateful exact version numbering problem that seem to be in fashion instead of "improve what you got" may be difficult to overcome.

Someone may have to buy portions of tech from IBM or ... to be able to accelerate hardware graphics.

8
Programming / Re: Rexx dll for UniAud
« on: January 01, 2024, 09:52:07 pm »
Includes updated source code, .hlp and .inf file, .ico, adjusted .dll, buildlevel help script, updated script to test features of the library, debug script/executable, watcom gui project file etc.

This build is for use and not so much debugging as the previous ones.

If you want to debug it:
Rebuild the .dll yourself (Targets->Target Options->Use Development Switches) to see the source code in watcom gui debugger (wdw). Use of dbg.cmd to start wdw and break as the library load (Break->On Image Load...) to step through each row in the code.


Happy New Year,
//Jan-Erik

9
I use OpenWatcom 2.0 Beta 3, a specific build that work well, as it didn't introduce problems as a later one does..., to build support libraries in C/C++ (see post about rexx library for Uniaud).
I do like the visual/gui debugger and come up with ways to debug those libraries and spot problems.

VisualAge v4 visual development was a disappointment.

DrDialog is however my choice to create gui stuff, as one otherwise need to invent new wheels over and over again.
VX-Rexx seem more powerful, but writing SOM code for must be a daunting task and the image control lack so much compared to DrDialog.

There's a lack of a grid control (no, not ValueSet, grrrr) and additional controls to use for the whole os.

10
Programming / Re: Rexx dll for UniAud
« on: December 27, 2023, 09:44:21 pm »
Rebuild that should display Card with number in stem and PCM play and record in the stem as well.
Bldlevel incremented and icon adjusted.

11
Programming / Re: Rexx dll for UniAud
« on: December 27, 2023, 06:21:44 pm »
Description updated and included below
Hopefully more accurate and understandable this time.

12
Programming / Rexx dll for UniAud
« on: December 27, 2023, 12:09:49 pm »
Hello,

Here's a library to be used with rexx, designed to have the functionality of unimix.exe
The included script demonstrate what it can do, read it to see what it does.
The script doesn't contain an interactive mode as later versions of unimix do, but instead use a stem array to list and set values that you should find useful.

Use and test the script and library at your own risk, it is provided "AS IS". It is your own fault if you break something with it!

No further documentation, information or source code about the library is included in this package.

I do invite you to improve it! :)

Regards,
//Jan-Erik

13
I want to see memory managed better, so that more memory is available to the system. Modern computers seen to have less memory available to OS/2 than 15 year old computers. Virtual Box offers 3.5 GB, better than any hardware ArcaOS that I have. The RAM disk in ArcaOS is admirable. I'd like to see it extended so that programs had some access to it more directly than file i/o to the RAM drive.

Modern applications seem to be designed to use up a lot of memory, something that follow over and can't be avoided when ported to this platform.
Wouldn't mind if someone could do magic how ArcaOS/2 use memory and pass on to applications.

Regards

I think you misunderstood my point. The hardware is taking more and more memory from the 32-bit address space. Of the 4 GB available, 2 GB or less remains on most recent systems. By comparison, Virtual Box leaves OS/2 nearly the entire 4 GB space.

You are right, though, about memory-hungry programs. I don't know how much longer one Chrome browser tab will fit into 32-bit address space.
What hardware itself use up can't be used by the OS anyway, so we need some redesign of how the system handle and manage memory.
Modern hardware come with a lot of ram, something ArcaOS/2 presently can't make use of either, that is not something for each application or devleoper to sort out. Each application should just have to be assigned a "virtual" address range (from 0 to ...) that the OS translate into real memory space.
I let someone else with more knowledge think about how to do it, but the problem has to be addressed.

14
I would like to see modern WiFi on ArcaOS. The WiFi needs to come on automatically. if it can't connect to the last known access point, then it needs to find one from the previously used points. If it can't find one of those, then it can allow the user to do something.

David A started to work on a driver arcitecture to be able to port drivers from FreeBSD for this or something like that, right? Didn't seem to be easy, but a basic driver for a certain chipset would be intreseting to see.
I haven't seen if there where progress, or if bumps in the road has appeared.

A bigger matter than the driver is to manage connecting to access points and managing security. David had commented that the network driver was done.
Focused on the way ArcaOS/2 behave to connect to access points and handle security is of course the next step.

Where are those drivers for wifi?
I've only seen drivers for ethernet.

15
I would like to see modern WiFi on ArcaOS. The WiFi needs to come on automatically. if it can't connect to the last known access point, then it needs to find one from the previously used points. If it can't find one of those, then it can allow the user to do something.

David A started to work on a driver arcitecture to be able to port drivers from FreeBSD for this or something like that, right? Didn't seem to be easy, but a basic driver for a certain chipset would be intreseting to see.
I haven't seen if there where progress, or if bumps in the road has appeared.

I want to see memory managed better, so that more memory is available to the system. Modern computers seen to have less memory available to OS/2 than 15 year old computers. Virtual Box offers 3.5 GB, better than any hardware ArcaOS that I have. The RAM disk in ArcaOS is admirable. I'd like to see it extended so that programs had some access to it more directly than file i/o to the RAM drive.

Modern applications seem to be designed to use up a lot of memory, something that follow over and can't be avoided when ported to this platform.
Wouldn't mind if someone could do magic how ArcaOS/2 use memory and pass on to applications.

Regards

Pages: [1] 2 3 ... 19