I pasted the lines I specified and received the following return message: Create WMIObject in thread 21136 Use WMIObject in thread 21136 Maybe you did not paste at the right place. Try the attached script v22. On my machine, I get different thread ids. Create WMIObject in thread 12244 Use WMIObject in thread 18424 The attached script v22 contains also a trap error to stop the ticker in case of fatal error. You can test it by specifying 6 iterations. Without the trap error, the script doesn't terminate,...
Hi Алексей On 30 Jan 2026, at 20:15, Алексей Евгеньевич Тарасов tae@users.sourceforge.net wrote: Please look at this code. On line 67, it crashes with an unknown error. What am I doing wrong? Add these lines: say "Create WMIObject in thread" SysQueryProcess("TID") say "Use WMIObject in thread" SysQueryProcess("TID") You should see different thread ids. Search Google for "OLE exception: Code: 800401f0" CO_E_NOTINITIALIZED (0x800401F0) is a COM/OLE error indicating that CoInitialize has not been called...
The output shows a problem: sometimes isTimer is 0 when it should be 1. It's not a race condition, just a typo in ::method IsTimer. typo: guard on when Answer<>'' | criticalAlarmTriggered=.true fixed: guard on when Answers<>'' | criticalAlarmTriggered=.true Fixed the implementation of Management='EXIT': must exit the loop. Attached: Timer_en_guard-v2.rex
Hello Алексей On 24 Jan 2026, at 15:41, Алексей Евгеньевич Тарасов tae@users.sourceforge.net wrote: Good afternoon! I've finished developing the "Timer" class with parameters that I'm happy with. The "Timer_en.rex" file contains the class code with the testing program. If anyone has any comments, additions, or suggestions, I'd be very grateful. When you create a Timer, you pass milliseconds. Internally, you multiply by 1000 to work with microseconds. Some comments should be fixed to indicate microseconds...
VariableReference::flatten is marking instead of flattening
Hello Алексей On 22 Jan 2026, at 12:25, Алексей Евгеньевич Тарасов tae@users.sourceforge.net wrote: Continuing on this topic. In a related thread, I asked a question about timers. I found Ticker Class, but it seemed a bit complicated. I decided to implement my own class. I was hoping to practice the methodology itself with parallel threads. But I ran into a problem: I can't launch multiple parallel threads. The "start" and "startWith" methods don't allow me to launch more than one thread, and the...
I find this answer to the second question better than the one I tried to explain in my own words: https://chatgpt.com/share/69480f24-59f8-8007-9247-1cd8282cfec2 And that concludes my contribution.
Ah, ok. You use "push" for global overriding. My understanding of "push" was that the caller would push his numeric settings on to a required/called program. yes, sorry for the confusion. The latter, demonstrated with your set of programs, adding "::options noGlobalOverride" to myPackageDigits2.cls: ... This will inhibit breaking the invariant in myPackageDigits2.cls by a global options override. Yes. In addition to Dom's debugger, I think this declaration should be added in * dateParser.cls, because...
A global override, if any, can only change inherit to noinherit or vice versa. That's the point! If I push "::options numeric inherit" then I can impose my own numeric settings. # no problem rexx main.rex # no problem rexx -o "::options numeric inherit" main.rex # Who broke my invariant? rexx -og "::options numeric inherit" main.rex main.rex ::options digits 4 ::requires "myPackageDigits2.cls" myPackageDigits2.cls call check_invariant ::options digits 2 ::options numeric noinherit ::routine check_invariant...
Thanks for your feedback Rony. This will be my last message in favor of “pulling” rather than “pushing”; I think this email covers everything I wanted to share. Personally, I don't need the push, but I don't mind to have it. and I don't need the pull, except for numeric. On 20 Dec 2025, at 14:30, Rony G. Flatscher orexx@users.sourceforge.net wrote: Well, you mixed in two new features * using "protect" as a sub-subkeyword (where subkeyword is one of the options) * introducing "inherit" an all subkeywords...
On 19 Dec 2025, at 18:29, Rony G. Flatscher orexx@users.sourceforge.net wrote: The "PROTECT" idea (coming from Dom and Josep Maria) would allow the package creator to inhibit overruling settings. In this case one would use "::options numeric inherit protect numeric" and the overruling would not take place.. I assume you meant ::options numeric noinherit protect numeric The last "numeric" is redundant, isn't it? Could be ::options numeric noinherit protect I find this latest declaration easy to read....
On 19 Dec 2025, at 14:56, Rony G. Flatscher orexx@users.sourceforge.net wrote: There are at least two use cases that come to mind: * allowing a (like Dom Wise's great) debugger to offer the developer a fine graned control for debugging, but allowing to protect from overriding with global options for programs that may be negatively affected being put under the control of the program's author (hence the suggestions to use "PROTECT" as a new subkeyword) * changing e.g. the trace option globally for...
On 19 Dec 2025, at 08:39, Josep Maria Blasco jmblasc2@users.sourceforge.net wrote: Hmmm... Assume a situation like the one we had with ooRexxShell and TUTOR: one needs to propagate the NUMERIC settings. It would be a pity if NOGLOBALOVERRIDE forced the debugger to work with a different NUMERIC setting than the rest of the application. Since Dom's request is specifically about a problem with tracing, maybe what we would need is a NOTRACEOVERRIDE option instead? IMO, the logic should be the same as...
you may need a lot of lookahead to decide what is the nature of an instruction. In Classic Rexx, you could do that with only two tokens. That piqued my interest :-) Code review of instructionParser.cpp LanguageParser::nextInstruction Try 1) or else 2) or else 3) etc... There is indeed a lot of lookahead at point 4) // get the first token of the clause RexxToken *first = nextReal(); 1) // a :: at the start of a clause is a directive, which ends this execution block. if (first->isType(TOKEN_DCOLON))...
Is it documented anywhere? I asked if such a documentation exists. https://chatgpt.com/share/69408365-0404-8007-a813-bc0429a3f96d I'm not sure that the conclusion is pertinent, because there is this assumption: the order of description in the doc implies the same order when parsing... And the conclusion based on thi assumption is: The key rule in ooRexx’s parser is the instruction type hierarchy: * Message instructions (including message send via the ~ operator) * Keyword instructions (e.g. ARG,...
To facilitate testing, I am attaching the rexxtry-eof.rex file where the fix has been applied. I created this version of rexxtry because my battery was drained after testing a Rexx filter for rlwrap. $ rlwrap --filter $PWD/filter.rex rexxtry rexx filter rlwrap: error: error writing to filter: Broken pipe filter.rex is empty for the moment, I wanted just to confirm that rlwrap accepts a rex filter, which it does. After running several tests, I later discovered that multiple rexx processes were still...
Thanks P.O.
On 7 Dec 2025, at 21:32, Rony G. Flatscher orexx@users.sourceforge.net wrote: Ah, I see. A question Jean Louis: as you are a committer, wouldn't you want to commit the patch yourself? I could, but a) I’d prefer to wait and see if any +1 or -1 feedback comes in. Even if that take weeks, it's ok. b) I will never push a commit to trunk without a minimum of discussion/agreement. That's why I prefer to submit patches.
Guten Abend Rony In this RFE, I don’t bother with PDFs; I just hit Ctrl-C so hard the script surrenders at EOF.
Better support of EOF in rexxtry
Determine whether a stream is associated with a terminal
Hello Enrico I think what you need is the sendWith method of the Object class. calculator = .calculator~new say sum(calculator, 1, 2, 3, 4) -- 10 say calculator~sum(1,2,3,4) -- 10 ::routine sum use arg object, ... rest = arg(2, "a") return object~sendWith("sum", rest) ::class calculator ::method sum sum = 0 do i=1 to arg() sum += arg(i) end return sum
Allow backward iteration over collection and supplier
The current ooRexx 5 implementation returns a method only if this method has been defined on the class. The inherited methods are not taken into account. say .weakreference~method("INIT") Oooops ! ... try again. Object method not found. The proposed fix will change this behaviour, making it similar to ooRexx 4.2. say .weakreference~method("INIT") a Method rexxref ~method doesn't say that ~method can return a superclass method. ~methods say that a superclass method can be returned, in function of...
say .buffer~method("INIT") crashes the interpreter
Small rework for NativeActivation and NativeCode: - added getEffectiveSecurityManager - don't mix getSecurityManager and getEffectiveSecurityManager Still a WIP because the security of the setSecurityManager BIF has not yet been taken into account. Attached: SecurityManager-v3.patch (replace the previous patch)
SecurityManager at interpreter level
SecurityManager at interpreter level
So I still think it should be fixed or the docs should be made more specific. I agree but I can't tell what is the preference of the ooRexx team. In the meantime, this code will work: ::class typedArray public subclass Array ::attribute type ::method new class say "Method 'new'' for typedArray instance" use strict arg type if "RTW"~pos(type[1]~upper)==0 then raise syntax 93.914 array(1,"R(ony),T(im),W(ill)",type) /* superclass 'new' called with proper argument */ self~new:super(1) myArray = result...
I started a code review (attached file), which I stopped after you found a workaround. You will see that the Array class doesn't forward the 'new' arguments to 'init'. Several native classes respect what's written in rexxref.pdf 5.1.1.20. new: "If you specify args, new passes these arguments on the init message." Other classes don't, maybe for good reasons, but I can't tell. Update: Several classes (like 'List') don't check/use the arguments in the 'new' method. It's done in the init method: * The...
I started a code review (attached file), which I stopped after you found a workaround. You will see that the Array class doesn't forward the 'new' arguments to 'init'. Several native classes respect what's written in rexxref.pdf 5.1.1.20. new: "If you specify args, new passes these arguments on the init message." Other classes don't, maybe for good reasons, but I can't tell.
Seems to be the normal behavior... Even if not obvious at first sight. rexxref: Any object requiring initialization at creation time must define an INIT method. If this method is defined, the class object runs the INIT method after the object is created. myArray = .typedArray~new('Will') Here, the typedArrayclass doesn't have a new method. So the new method of Array is called. Implemented by the native method ArrayClass::newRexx. This method creates the array, using the argument 'Will' (error). Once...
rexxref Example 18.3. Misplaced closing tag
Fixed commit [r12983]
fix rexxref for [documentation:#345] Misplaced closing tag
rexxref Example 18.3. Misplaced closing tag
Short-circuiting & works only at top-level. IF expression1, expression2 THEN The not-short-circuiting & must be used inside an expression. IF expression1, (expression2 & expression3) THEN Maybe more easy to read: if arg(1) > 0, , (dilin.1~contains(" _"), | dilin.1~contains("GTO ._"), | (inper.ZEN, & dilin.1~contains("CAT 1__"))), then do
The second arg of the inline function must be a reference for the assignment. I updated your patch with this change (v1). Tiny test: The crash I had with philfork.rex under macOS no longer occur.
setField(waitingActivities, new_array()); When this is old space, the expression new_array() is evaluated twice by the macro. The second evaluation is stored in waitingActivities, but is not put in MemoryObject.old2new. Not sure if the macro can be modified to evaluate v once.
Patch v5: Debug code removed.
I used a similar technique in 2009/2010. Requires this package in each file I need to debug: https://github.com/jlfaucher/executor/blob/master/incubator/DocMusings/transformxml/trace.cls Declare possible trace points where needed. For example https://github.com/jlfaucher/executor/blob/a91c4f518cc91915795e842dd56e548c9792387c/incubator/DocMusings/transformxml/sdtokenizer.cls#L1263 and then activate interactively or programmatically the trace points I need to debug : .t~on("isl2rDispatcher") I don't...
Patch v4: Fix the trace display for this test case ::method m2 interpret "trace value .local~trace; x = 0" old >I> Routine "M2" in package ... new >I> Method "M2" with scope "C1" in package ... This patch still contains the debug code (not activated).
Patch v4: Fix the trace display for this test case ::method m2 interpret "trace value .local~trace; x = 0" old >I> Routine "M2" in package ... new >I> Method "M2" with scope "C1" in package ... This patch still contains the debug code (not activated).
Patch v3: The TRACE() function is supported. The documentation is in _readme-trace_entry.txt. This patch still contains the debug code (not activated).
Patch v3: The TRACE() function is supported. The documentation is in _readme-trace_entry.txt. This patch still contains the debug code (not activated).
Patch v2: If the TRACE option is a string or a symbol then the entry trace can be displayed early, before a guarded method is locked. This makes it easier to analyze a deadlock. This patch still contains the debug code (not activated). The TRACE() function is not yet updated, not sure it's worth it.
Patch v2: If the TRACE option is a string or a symbol then the entry trace can be displayed early, before a guarded method is locked. This makes it easier to analyze a deadlock. This patch still contains the debug code (not activated). The TRACE() function is not yet updated, not sure it's worth it.
Trace entry in routine/method when trace is the first instruction
Test file
Trace entry in routine/method when trace is the first instruction
same here, not being a math person. If I’m not wrong, you plan to do up to 10e15 calculations, store each result in the stem vaf. and check if the current result has been already obtained. Even if you simplify the script by not storing the calculations, and just checking if the current result is equal to the initial seed, you will need years of calculation (unless your parameters give a short period). I’m curious to know why you don't use one of the families of parameter described by Wikipedia https://en.wikipedia.org/wiki/Linear_congruential_generator...
Tests for [patches:#221] Windows Clipboard Unicode contents
Documentation for [patches:#221] Windows Clipboard Unicode contents
Edit1: replace 'paste' by 'copy' in the example. Edit2: replace 'text' by 'done' in the example (the result is a boolean, not a string) Edit3: replace 'done' by 'ko' in the example (I just realized that the returned value is 0 when ok, and 1 when ko. Sounds like a bug but will not change that. The doc says nothing about the returned value) Thanks Rony. Additional patch to install after the first patch. The next step will be doc + tests. Change the legacy implementation of ~paste to support binary...
Edit1: replace 'paste' by 'copy' in the example. Edit2: replace 'text' by 'done' in the example (the result is a boolean, not a string) Thanks Rony. Additional patch to install after the first patch. The next step will be doc + tests. Change the legacy implementation of ~paste to support binary strings: now returns the whole clipboard contents (don't stop at the first \0). Fix the locale name (don't include the final \0). Don't call SysFromUnicode if the string to convert is empty. The method 'copy'...
Edit: replace 'paste' by 'copy' in the example. Thanks Rony. Additional patch to install after the first patch. The next step will be doc + tests. Change the legacy implementation of ~paste to support binary strings: now returns the whole clipboard contents (don't stop at the first \0). Fix the locale name (don't include the final \0). Don't call SysFromUnicode if the string to convert is empty. The method 'copy' is extended to support the same options as SysToUnicode: codepage, translateflags. When...
Thanks Rony. Additional patch to install after the first patch. The next step will be doc + tests. Change the legacy implementation of ~paste to support binary strings: now returns the whole clipboard contents (don't stop at the first \0). Fix the locale name (don't include the final \0). Don't call SysFromUnicode if the string to convert is empty. The method 'copy' is extended to support the same options as SysToUnicode: codepage, translateflags. When codepage == "" (default) then it's the old behavior:...
Thanks for this review! On 31 Jul 2023, at 17:18, Rony G. Flatscher orexx@users.sourceforge.net wrote: However, it seems that when using paste on the WindowsClipboard that the content of the clipboard changes as the UTF-8 characters get displayed as question marks (?). It's because of the second .bsf.clipboard~setString. For the array, should be something like that: do counter c text over textlines say c 'textLines in utf8 :' pp(text) end Your example makes me wonder if .WindowsClipboard~Copy should...
Windows Clipboard Unicode contents
It’s the “otherwise” part : InterpreterInstance::loadRequires(package) if the interpreter instance has already the package in its cache (with short or full name) then return immediatly. otherwise ask the package manager to load it run the prolog (always, even if the package was already in the static cache of PackageManager) If this is modified to no longer run the prolog, then I think BSF will no longer be initialised correctly when running several interpreters. On 9 Apr 2023, at 16:07, Rony G. Flatscher...
stream~new the same file twice: MacOs and Windows behaves differently
Hi Rob DFW is a typo. The .def file is passed to the link command with the option /def:myfile.def See https://www.rexxla.org/events/schedule.rsp?year=2015 search for "How to Develop a Native Library" It's a tutorial written by Rony for the symposium 2015. In the zip file, you will find MakefileWindows.mak This makefile uses the optional variable %REXX_HOME% to find the headers and libs. Yon can also directly define %INCLUDE% and %LIB%
Thanks Stephan! Compile is ok now.
Missing files in SVN trunk (target Windows)
circular requires: some public classes are not visible
Maybe this paper from Walter could interest you, even if it's not about ANSI : What is Classic Rexx https://www.rexxla.org/events/schedule.rsp?year=2015
In the file MainAppLog.xlsx attached by Rony, there are too many entries in the column Thread (T1 to T197). It's because the activities were counted, instead of the system threads. The patch V2 fixes that, by using a C++ collection which associates a short id to each traced system thread. The attribute 'idntfr' on Activity is removed.
Concurrency trace
ok, thanks for the explanations, that was interesting to read. I just discovered that if I replace 'init' by 'activate' then it works. That works also with ooRexx4 so that's fine.
mixin's variable dictionnary at class level is not found
Hello Jan-Erik Thanks for sharing this code. That was interesting to review, but not easy to get the big picture. I had to activate the trace to (begin to) understand how it works. While playing with it, I noticed a typo for the page 864 : BO to replace by B0 Jean-Louis
Tested under MacOs, the fix is ok, thanks Erich! But the code must be made more robust, see the attached patch. The default value for REXX_PATH being an empty string "", an empty path is added in SysSearchPath for REXX_PATH. Adding an empty path is ok, we can do that in PATH (<path1>::<path2>). The problem is in SysSearchPath::addPath where a negative index is used when p is an empty string: (p[strlen(p) - 1] != ':') The windows platform is more robust, I applied the same solution: new method checkPathSeparator.</path2></path1>...
Json: tojson applied to a not empty directory raises error "too many arguments"
rexximage cleanup: removeClassMethod forgets some classes
If my understanding of the API is correct, the string is also protected by the context you are using to call Merge_2_Blobs. If you call your function 10 times using the same context, then your 10 strings are protected against GC. From doc: "When any context API has a return result that is a Rexx object instance, the source API context will protect that object instance from garbage collection for as long as the context is valid. Once the API context is destroyed, the accessed objects might become...
After testing the 2nd proposed fix, it appears that it should be like that to support nested INTERPRET: recursively updating the setting while isInterpret() == true This is the same logic as parent->rexxVariable(name) in RexxActivation::rexxVariable. void RexxActivation::setDigits(wholenumber_t digitsVal) { settings.packageSettings.setDigits(digitsVal); if (isInterpret()) parent->setDigits(digitsVal); } Attached file updated with a new test case for nested INTERPRET (v2).
The proposed fix is not working when passing the current context to a routine or method. Attached file updated with this new test case (v1). Output (without proposed fix) is ok: Caller context: 15 14 ENGINEERING -4528229313 Current context: 100 0 SCIENTIFIC -4528283569 Caller context: 15 14 ENGINEERING -4528229313 If the proposed fix is applied, the output is KO: Caller context: 9 0 SCIENTIFIC 567214664 Current context: 100 0 SCIENTIFIC 567220084 Caller context: 100 0 SCIENTIFIC 567214664 Maybe the...
INTERPRET .context~digits different from digits()
trace "all" crashes when the scope of a method is NIL
it looks like your rxapi is the one for oorexx v4. [bugs:#1388] gives details about what's wrong with rxapi v4. You could confirm by checking the full path of your rxapi, using pathfind.c https://stackoverflow.com/questions/14805896/how-do-i-get-the-full-path-for-a-process-on-os-x. Macrospace.testGroup is ok for me when using rxapi v5.
compile-time warning and a runtime abort "overflow" under Ubuntu 14.04 with gcc 4.8.4
Fixed Revision: 341 It seems SourceForge svn reports many differences because of...
Fix bug 28 overflow under Ubuntu 14.04
compile-time warning and a runtime abort "overflow" under Ubuntu 14.04 with gcc 4.8.4
ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround...
ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround...
Crash under Windows in bsfUnloader when jvm.dll not found
As said on the dev-list of bsf4oorexx, I can reproduce the problem (random crash)....
ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround...
ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround...
Add support for VS2015
When clicking on the menu Code, I reach this page: https://sourceforge.net/p/regina-rexx/code/HEAD/tree/...
doc rexxref : Fix railroad of stream~charout (e...
cmake under Windows : Fix the build of the RelW...
doc trunk/readme : add file Revision_History.xm...
Fix compile error
doc ootest.ent : add missing quote in version n...
doc ooRexx brand : fix typo Railrod —> Railroad