Re: [Oorexx-devel] How IntegerZero is GC protected?

2024-04-08 Thread Jean Louis Faucher
Thanks!

> Returns an instance from the integer cache maintained by the RexxIntegerClass 
> object. These are all marked by the live() method on the object, so 
> RexxMemory doesn't need to do anything special. 


I never realised that the RexxInteger has a (what? metaclass?) different from 
RexxClass.…
And apparently, it’s the only class to be like that.

My notes:

All classes declare they class using CLASS_CREATE
except RexxInteger and NumberString which use CLASS_CREATE_SPECIAL
and except RexxClass, probably for bootstrap.
CLASS_CREATE_SPECIAL(NumberString, "String", RexxClass);
CLASS_CREATE_SPECIAL(Integer,  "String", RexxIntegerClass);

RexxClass *NumberString::classInstance = OREF_NULL;
RexxIntegerClass *RexxInteger::classInstance = OREF_NULL;


Only the file IntegerClass.cpp has 2 live methods:
void RexxInteger::live(size_t liveMark)
void RexxIntegerClass::live(size_t liveMark)


I noticed that all the class are doing
memory_mark(objectVariables);
instead of doing
RexxObject::live(liveMark)

This is aligned with the comment in ObjectClass.cpp
 * Other exported classes that inherit from Object are
 * also expected to mark this field.
but to not forget if other attributes are added to RexxObject in the future.

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] How IntegerZero is GC protected?

2024-04-08 Thread Jean Louis Faucher
RexxMemory.cpp
IntegerZero   = new_integer(0);
IntegerOne= new_integer(1);
...

Looking at RexxMemory::live, I don’t see what is marking IntegerZero.

Other global static variables like TheTrueObject  or nullPointer are put in a 
collection.
addToEnvironment("TRUE", TheTrueObject);
addToSystem("NULLPOINTER", TheNullPointer);
and protected:
memory_mark(environment);
memory_mark(system);


Side question, out of curiosity:
// Create some special Rexx objects.
TheTrueObject  = new RexxInteger(1);
TheFalseObject = new RexxInteger(0);
With these assignments, we have TheTrueObject <> IntegerOne, right?
Why not assigning IntegerZero, IntegerOne?
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] "Per-Interpreter GIL" will land in Python 3.12

2023-05-16 Thread Jean Louis Faucher
I saw this link in the daily TLDR mail of today:
https://martinheinz.dev/blog/97 
Real Multithreading is Coming to Python - Learn How You Can Use It Now

Did not read in details yet, but seems worth to understand how they implemented 
their "Per-Interpreter GIL”.

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A draft for documenting MT tracing (Re: Planning to add multithreaded (concurrent) tracing (Re: RFC for feature request "794 Concurrency request"

2023-02-11 Thread Jean Louis Faucher
Thanks for your feedback.

> Ugh, I don't find this to be helpful information at all.
It's useful, I explained already why, see the CSV screenshot.
We don't have a rexx debugger like the orexx workbench showing the call stack.
But we can have at least the top-level of the call stack, everywhere.

> I can determine that information just by looking at the thread numbers,
When an invocation is popped, you have no information in the trace to tell you 
in which method/routine you are back.
This is also true in mono thread.
You would need something opposite to >I>, like I> corresponding 
to this context.
And in the CSV, you have it immediately.

> the activation number has no real connection to any concept in the 
> interpreter. 

It's related to .context and .context~stackFrames[1]


This extended trace is what I needed 13 years ago to analyse several deadlocks.
All the infos were useful.
Each time, the debug process was the same:
- look at the last line (deadlocked), it’s for the thread Tn and the variable 
pool Vn.
- move up in the trace until I find  another thread Tm using this same variable 
pool Vn and having a lock.
- from here, I know the 2 competing methods.
- and the difficult part begins: find how to fix…


To me this seems absolutely contrary to the Rexx principles.   If developers 
need this kind of information, cannot this be achieved by other, less visible 
and less ugly, means?

Ugly? That is ugly:
afea2380 1092bb00  0   1 *-* 
.demo~new~exec(1)
afea2380 1092bb00  0 >E>   .DEMO => 
"The DEMO class"
afea2380 1092bb00  0 >M>   "NEW" => 
"a DEMO"
afea2380 1092bb00  0 >L>   "1"
afea2380 1092bb00  0 >A>   "1"
afea2380 10934d80 10934ff0 0 >I> Method 
"EXEC" with scope "DEMO" in package 
"/local/rexx/oorexx/executor/sandbox/jlf/demos/concurrency_trace.rex".
afea2380 10934d80 10934ff0 1*  8 *-* use arg id
afea2380 10934d80 10934ff0 1*>>>   "1"
afea2380 10934d80 10934ff0 1*>=>   ID <= "1"
That was the MT trace generated 13 years ago.
It was transformed in a “human readable” format with beautiful identifiers by a 
rexx script :-)
 


___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A draft for documenting MT tracing (Re: Planning to add multithreaded (concurrent) tracing (Re: RFC for feature request "794 Concurrency request"

2023-02-11 Thread Jean Louis Faucher
In complement of the struct, this is how the infos are collected for each trace 
line:

void GetConcurrencyInfos(Activity *activity, RexxActivation *activation, 
ConcurrencyInfos )
{
InterpreterInstance *interpreter = (activity ? activity->getInstance() : 
NULL);
VariableDictionary *variableDictionary = (activation ? 
activation->getVariableDictionary() : NULL);

/* R */ infos.interpreter = interpreter ? interpreter->getIdntfr() : 0;
/* T */ infos.activity = activity ? activity->getIdntfr() : 0;
/* A */ infos.activation = activation ? activation->getIdntfr() : 0;
/* V */ infos.variableDictionary = variableDictionary ? 
variableDictionary->getIdntfr() : 0;
/* n */ infos.reserveCount = activation ? activation-> getReserveCount() : 
0;
/* * */ infos.lock = (activation && activation->isObjectScopeLocked()) ? 
'*' : ' ';
}


> On 11 Feb 2023, at 18:32, Jean Louis Faucher  wrote:
> 
> A quick feedback about point 1:
> The A column is in fact the activation identifier (RexxActivation).
> It’s used to know which method/routine is executing the current line.
> The name of this method/routine can be found by looking back in the trace the 
> first >I> for the current T.
> 
> In rexxref, “activation” is not used.
> I think the good term is “invocation”, as in "An activity contains a stack of 
> invocations… An invocation is activated when an executable unit is invoked 
> and removed (popped) when execution completes. "
> 
> 
> This is the displayed informations
> struct ConcurrencyInfos
> {
> uint32_t interpreter;
> uint32_t activity; —> display a counter related to the system 
> tread identifier, not the activity identifier
> uint32_t activation;
> uint32_t variableDictionary;
> unsigned short reserveCount;
> char lock;
> };
> 
>> On 11 Feb 2023, at 18:16, Rick McGuire > <mailto:object.r...@gmail.com>> wrote:
>> 
>> Some comments: 
>> 
>> 1) the T and A columns are a bit redundant. We really only need a single 
>> identifier for the thread, having two is just extra clutter. 
>> 2) The term activity is introduced here without explanation. It doesn't 
>> really appear any other place in the documentation and is really more of an 
>> internal concept than part of the language. If it is used here, then this 
>> needs to be used consistently in all other places that concurrency is 
>> discussed. 
>> 3) The variable pool term is a bit misleading. The thing that gets locked is 
>> the object's variable pool for a particular scope, not all of the variables 
>> for the object. For example, two different threads might have the GUARD lock 
>> on the same object at different scope levels. Knowing the scope would be a 
>> very useful piece of information. 
>> 4) I don't like the use of the term "lock" here. At least refer to them as a 
>> GUARD lock, since that is the concept that is used in other places. 
>> 5) I still don't like the M prefix. I think things would just be simpler if 
>> multi-thread mode is used any time there are multiple active threads. 
>> 
>> Rick  
>> 
>> On Sat, Feb 11, 2023 at 12:02 PM Rony G. Flatscher > <mailto:rony.flatsc...@wu.ac.at>> wrote:
>> Ad documentation: here a draft, meant for rexxref.pdf, chapter "12. 
>> Concurrency", suggesting of adding a section at the end (activity, variable 
>> pool, locks already explained in that chapter):
>> 
>> --
>> 
>> 12.5 Tracing Concurrent Execution
>> 
>> Each invoked routine and method routine will execute on a proper activity. 
>> If a
>> method runs for different objects each such invocation will execute on a 
>> proper
>> activity. Activities may run on different threads if sending messages
>> concurrently or using the reply keyword instruction.
>> 
>> Upon entry of a method routine access to the variable pool of the object (its
>> object variables, attributes) gets secured by reserving exclusive access by
>> default.  If a concurrent message to the same object gets sent from a
>> concurrently executing part of the program, then the method routine attempts 
>> to
>> get the lock on the variable pool and will be blocked as long as the the 
>> owning
>> method routine for that object does not release it, either by returning from
>> the method invocation or by issuing "guard off" in its routine.
>> 
>> If a method routine's activity owns the variable pool lock it may invoke 
>> other
>> method routines by sending the message to "self" without getting blocked.
>> 
>> In 

Re: [Oorexx-devel] A draft for documenting MT tracing (Re: Planning to add multithreaded (concurrent) tracing (Re: RFC for feature request "794 Concurrency request"

2023-02-11 Thread Jean Louis Faucher
ot; and "_" are also available as indicators. 
>>> I'm a definite -1 to using environment variables and Erich has also voiced 
>>> his displeasure about that.  
>>> 
>>> Another option might be to allow a second keyword following the trace type 
>>> that indicates using the expanded form. It should also allow explicit 
>>> specification of the simple form too. 
>>> 
>>> Rick
>>> 
>>> On Wed, Feb 8, 2023 at 2:46 PM Mike Cowlishaw >> <mailto:m...@speleotrove.com>> wrote:
>>> I would have put the M after the other letter because it's really a 
>>> subsidiary option.  If it's first it rather 'M'asks the main option?
>>>  
>>> Mike
>>> 
>>> From: Rony G. Flatscher [mailto:rony.flatsc...@wu.ac.at 
>>> <mailto:rony.flatsc...@wu.ac.at>] 
>>> Sent: 08 February 2023 14:16
>>> To: oorexx-devel@lists.sourceforge.net 
>>> <mailto:oorexx-devel@lists.sourceforge.net>
>>> Subject: [Oorexx-devel] Planning to add multithreaded (concurrent) tracing 
>>> (Re: RFC for feature request "794 Concurrency request"
>>> 
>>> Coming back to this RFE from 17 months ago which I would like to add to 
>>> trunk. Without it one can hardly use TRACE for debugging multithreaded 
>>> programs in a Rexx-like, i.e. easy manner.
>>> 
>>> Currently having tried to incorporate the feedback about too many 
>>> whitespaces between the new columns (Rexx interpreter instance number, 
>>> Thread number, Activity number, reserved object pool).
>>> 
>>> There was another idea about making this concurrency/multihreaded trace 
>>> available without a need to define an environment variable 
>>> RXTRACE_CONCURRENCY before starting a Rexx program. This post is about 
>>> ideas of how to activate and deactivate concurrent tracing at runtime 
>>> (either via the TRACE keyword instruction or the TRACE()-BIF) in a manner 
>>> that is intuitive and easy to remember.
>>> 
>>> One possibility would be to introduce new alphabetic options, this time 
>>> with two letters by prepending the letter 'M' (for multithreaded as the 
>>> letter c is already used for tracing commands and may therefore be 
>>> irritating) to the existing alphabetic characters, hence defining the 
>>> following semantics:
>>> 
>>> 
>>> Trace
>>> Option, turn off MT
>>> Option, turn on MT
>>> All
>>> A
>>> MA
>>> Command
>>> C
>>> MC
>>> Error
>>> E
>>> ME
>>> Failure
>>> F
>>> MF
>>> Intermediates
>>> I
>>> MI
>>> Labels
>>> L
>>> ML
>>> Normal
>>> N
>>> MN
>>> Off
>>> O
>>> -
>>> Results
>>> R
>>> MR
>>> 
>>> 
>>> 
>>> This would have the benefit that anytime it becomes possible to turn on and 
>>> to turn off multithreaded/concurrent tracing at runtime.
>>> 
>>> What do you think?
>>> 
>>> ---rony
>>> 
>>> P.S.: The "fallback" would be to just add it as is, i.e. using the 
>>> environment variable RXTRACE_CONCURRENCY, making the 
>>> multithreaded/concurrent tracing a global option that needs to be set 
>>> before running a Rexx program. 
>>> 
>>> 
>>> 
>>> On 05.09.2021 14:12, Rony G. Flatscher wrote:
>>>> Almost a week ago Jean Louis Faucher registered feature request "794 
>>>> Concurrency request", cf.
>>>> <https://sourceforge.net/p/oorexx/feature-requests/794/> 
>>>> <https://sourceforge.net/p/oorexx/feature-requests/794/> together with a 
>>>> patch that implements the
>>>> feature request. So far there have been no comments, hence "requesting for 
>>>> comments (RFC)" here as
>>>> it may be the case that the RFE has been overlooked.
>>>> 
>>>> ---
>>>> 
>>>> IMHO this RFE is incredible helpful for debugging multi-threaded Rexx 
>>>> programs and for understanding
>>>> how ooRexx dispatches multithreaded code.
>>>> 
>>>> The way Jean Louis devised the implementation has practically no impact on 
>>>> the interpreter (unless
>>>> one defines an environment variable "RXTRACE_CONCURRENCY=on" modelled 
>>>> after the existing
>>>> "RXTRACE=ON" environment variable in which case helpful information gets 
>>>> generated for prefixing
>>>> each trace output statement) makes it easy even for beginners (= students) 
>>>> to get insight and
>>>> understand how ooRexx executes multithreaded programs. Some problems 
>>>> rooted in multithreaded Rexx
>>>> code can be quickly located, understood and resolved with this feature.
>>>> 
>>>> Having tested this concurrency trace feature with the most challenging 
>>>> JavaFX ooRexx programs I have
>>>> been really impressed with the results. Using the ooRexx program 
>>>> "samples/tracer.rex" (included in
>>>> the patch) to render the massive concurrency trace output of some JavaFX 
>>>> ooRexx programs to csv and
>>>> importing the concurrency trace into a spreadsheet (e.g. Excel) makes it 
>>>> possible to analyze such
>>>> massive concurrency traces in every possible detail using the spreadsheet 
>>>> features (e.g. filtering
>>>> for a specific ooRexx interpreter instance or specific threads, pivots and 
>>>> the like). Therefore I
>>>> uploaded one such test to this RFE such that one can directly get at the 
>>>> massive concurrency trace,
>>>> the csv file created by "tracer.rex" from it and an Excel spreadsheet 
>>>> which was used to import the
>>>> generated csv file. (I wished this feature had been available when 
>>>> devising some of the BSF4ooRexx
>>>> JavaFX samples, which would have saved me literally weeks of debugging!)
>>>> 
>>>> The patch implementing RFE 794 makes it really easy for ooRexx programmers 
>>>> to understand and to
>>>> debug multithreaded ooRexx programs, saving them a *lot* of time trying to 
>>>> understand what happens,
>>>> how concurrent statements get executed by the interpreter(s) and locating 
>>>> coding errors!
>>>> 
>>>> ---rony
> 
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net <mailto:Oorexx-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel 
> <https://lists.sourceforge.net/lists/listinfo/oorexx-devel>
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Ad OLEObject class, intentions to ...

2022-05-14 Thread Jean Louis Faucher

> So there is a need for having one or more methods that can be used for 
> forcing the invocation of the ooRexx .Object methods. 
The syntax described in 4.2.7 Changing the Search Order for Methods could be 
used, if the restriction 
"Message search overrides can be used only from methods of the target object”
was removed.

It works with oorexx4, after removing the check
if (_target != context->getReceiver())
in RexxExpressionMessage::evaluate.

s1 = "hello"
s2 = "hello"
say s1~"="(s2) -- display 1
say s1~"=":.Object(s2) -- display 0 because not the same objects


___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Problem in a multihreaded environment with the change from the guarded method default of expose-less methods to unguarded ...

2021-08-07 Thread Jean Louis Faucher
+1

If you run the example 12.4 of rexxref, you will see that it breaks the rule 
written just above.


Regards

> On 7 Aug 2021, at 18:28, Rony G. Flatscher  wrote:
> 
> Sleeping and thinking more over it I would suggest to remove this feature 
> altogether! The major reasing being that the Rexx philosophy (and ooRexx by 
> extension) should make coding as easy as possible for programmers.
> 
> The default for methods (and related) has always been "guarded" such that one 
> would not have to write "guarded" to the method directive. With that default 
> only in very rare cases (in multithreaded scenarios) would one have to write 
> "unguarded" to a method directive. And if doing so one must have an 
> understanding of multithreading and the ramifications if someone would want a 
> method to run unguarded.
> 
> Compare this to the current situation with this new feature on: in order to 
> fix BSF.CLS  all of a sudden I had to add the keyword "guarded" to every 
> method to gain the default behaviour for ooRexx < 5.0 and thereby re-enabling 
> correct execution of GUI nutshell examples. 
> Ad feature: originally it was thought to be helpful to programmers by saving 
> the programmers to write "unguarded" to a method directive for a method that 
> is known to be safe in unguarded mode thinking that methods that have no 
> direct access to the attribute pool (i.e. the method routine would not start 
> with "expose" or "use local") qualify for unguarded execution not thinking 
> about scenarios where this is not enough. 
> To make it easy for the programmer (i.e. not having to know additional, 
> sometimes quite subtle, concepts that play a role in this context) I would be 
> in a strong favor to leave the default "guarded" in place. Then either remove 
> this new feature altogether or make it an explicit option a programmer has to 
> state ("::OPTIONS" with a new pair "guarded|unguarded").
> 
> What opinions have others? Do you concur?
> ---rony
> 
> On 06.08.2021 15:09, Rony G. Flatscher wrote:
>> Background: In order for ooRexx programmers getting acquainted with 
>> BSF4ooRexx/Java quickly there are numerous nutshell examples in 
>> "bsf4rexx/samples". Most of these nutshell examples stem from observations 
>> of students over time who should get help by demonstrating them how to 
>> achieve something of interest with these (mostly brief) nutshell examples.
>> 
>> One interesting problem has been the interaction from ooRexx with GUI 
>> objects which must be carried out on the GUI threads in Java (the "awt 
>> thread" or the "JavaFX Application thread"). Although they got the necessary 
>> information about the architecture and what to do in ordert to become able 
>> to send messages on GUI threads, they kept running into problems, losing a 
>> lot of time (even months because they could not get it working in more 
>> complex programs).
>> 
>> To make a long story short, I came up with a message based solution, that 
>> was very easy to understand and to employ for them. None of the students ran 
>> into the GUI thread problems since then.
>> 
>> The solution is an ooRexx class for awt (the Java "abstract windows 
>> toolkit") named .AwtGuiThread and for JavaFX (a powerful GUI system) 
>> .FxGuiThread, both subclassing a common superclass .AbstractGuiThread. These 
>> classes allow one to send the ooRexx message runLater[Latest](GUIreceiver, 
>> messageName, arguments) which get queued and dispatched on the GUI thread 
>> later. 
>> The nutshell examples 
>> "bsf4rexx/samples/3-090_update_awtSwing_GUI-from-non-GUI-thread.rxj" and 
>> "bsf4rexx/samples/JavaFX/javafx_update_GUI-from-non-GUI-thread.rxj" 
>> demonstrate how to employ this infrastructure. They have been working for 
>> years without a problem.
>> 
>> While working on BSF4ooRexx I stumbled over an error (not having run those 
>> two examples for quite some time) which seems to indicate that ooRexx now 
>> creates an error when being used from different threads:
>> 
>> F:\work\svn\bsf4oorexx\trunk\bsf4oorexx\samples>3-090_update_awtSwing_GUI-from-non-GUI-thread.rxj
>> screenSize: [java.awt.Dimension[width=1920,height=1080]]
>> winSize   : [java.awt.Dimension[width=800,height=200]]
>> xPos=[560] yPos=[440]
>> a REXXEVENTHANDLER::actionPerformed - starting Rexx thread
>> The SOME_REXX_CLASS class::updateGuiFromRexxThread - just arrived, GUI 
>> thread: 23808
>> The SOME_REXX_CLASS class::updateGuiFromRexxThread - now running on thread: 
>> 7428
>>*-* Compiled method "DELETE" with scope "Queue".
>>   5727 *-*   msgQueue~delete(idx)   -- delete the guiMsg object
>>   5637 *-* forward message "REMOVEMESSAGE" continue  -- remove all GUI 
>> messages of the same name targeted to the same object
>>207 *-*   .AwtGuiThread~runLaterLatest(label, "setText", "i", str)
>> Error 93 running 
>> F:\work\svn\bsf4oorexx\trunk\bsf4oorexx\samples\3-090_update_awtSwing_GUI-from-non-GUI-thread.rxj
>>  line 207:  Incorrect
>>  call to method.
>> Error 

Re: [Oorexx-devel] MaxOS: Java can load libBSF4ooRexx.dylib, ooRexx cannot

2021-07-21 Thread Jean Louis Faucher
Guten Abend Rony
> would it ease your use case/be of help for your use case, if I were to add 
> honoring an environment variable (e.g. "BSF4ooRexx_Library") which would need 
> to fully qualify (absolute path) the BSF4ooRexx- library to be loaded? 
> 
Not needed on my side.

My no-install setup sets these variables:
BSF4Rexx_JavaStartupOptions="-Djava.library.path=...
CLASSPATH
DYLD_LIBRARY_PATH
JAVA_HOME
PATH

I think the new variable you propose would be redundant with 
BSF4Rexx_JavaStartupOptions ?
It’s not a problem for me to define BSF4Rexx_JavaStartupOptions.


Jean-Louis

> On 21 Jul 2021, at 18:57, Rony G. Flatscher  wrote:
> 
> Bonsoir Jean-Louis,
> 
> one question ad your test case # 3 which you were able to resolve with 
> BSF4ooRexx_setup: 
> would it ease your use case/be of help for your use case, if I were to add 
> honoring an environment variable (e.g. "BSF4ooRexx_Library") which would need 
> to fully qualify (absolute path) the BSF4ooRexx- library to be loaded? 
> [I tested it and it would be possible as it works in the baseline Java 
> version 1.6. That's the "6" in the version number "641", where "41" is the 
> ooRexx baseline, i.e. ooRexx version 4.1.]
> ---rony
> 
> On 21.07.2021 17:53, Jean Louis Faucher wrote:
>> Guten tag Rony
>> 
>>> A question here: after you removed the shebang line how were you able to 
>>> successfully invoke/run "rexx2.sh 1-010_HellowWorld.rxj"?
>>> 
>> 
>> That was the purpose of the side note, to explain why it works.
>> 
>> By the way, during my tests, I ran setupBSF.rex to review the generated 
>> scripts, and I noticed that rexxj.sh has no shebang. Keep it like that! It’s 
>> just to say that it works without shebang.
>> 
>> I’m curious to know if the most recent versions of MacOs still keep the DYLD 
>> variables when no shebang…
>> A simple echo $DYLD_LIBRARY_PATH is enough to check that.
>> 
>> If, at one moment, Apple decides to “fix” that, then the only workaround 
>> will be to put a copy of /bin/sh in /usr/local/bin, to make it unprotected 
>> by SIP.
>> Of course, this is not something for production, but still can be useful for 
>> a development machine.
>> 
>> 
>> Thanks for the background informations!
>> I understand that 
>>> java.lang.System.loadLibrary(libName)
>> takes care of java.library.path to find LibName, but the libs needed by 
>> LibName are not searched with the paths in java.library.path:
>> I have the path to ooRexx5 lib in java.library.path, they are not found when 
>> the shebang is used, i.e. when DYLD_LIBRARY is deleted.
>> 
>> 
>> Jean-Louis
>> 
>> 
>>> On 21 Jul 2021, at 17:03, Rony G. Flatscher >> <mailto:rony.flatsc...@wu.ac.at>> wrote:
>>> 
>>> Bonjour Jean-Louis,
>>> 
>>> thank you very much for your information!
>>> On 21.07.2021 09:21, Jean Louis Faucher wrote:
>>>> Guten tag Rony
>>>> 
>>>> Thanks a lot for the detailed explanations.
>>>> After setting BSF4Rexx_JavaStartupOptions as you explained, the 3rd test 
>>>> case is ok now.
>>>> More tests:
>>>> 
>>>> rexx 1-030_JavaVersion.rxj works correctly.
>>>> 
>>>> rexxj2.sh 1-010_HelloWorld.rxj did not work because of "Library not 
>>>> loaded: @rpath/librexx.4.dylib”
>>>> Should be found with DYLD_LIBRARY_PATH, but SIP deleted it:
>>>> - rexxj2.sh has a shebang line #!/bin/sh, which is protected by SIP
>>>> - the default java is protected by SIP.
>>>> 
>>>> After installing a local JDK (just unzip + set JAVA_HOME) and removing the 
>>>> shebang line of rexxj2.sh, that worked.
>>> 
>>> A question here: after you removed the shebang line how were you able to 
>>> successfully invoke/run "rexx2.sh 1-010_HellowWorld.rxj"?
>>> 
>>> 
>>> ---
>>> Ad background to "rexxj.sh"/"rexxj2.sh": 
>>> purpose: run Rexx scripts via java instead of via the rexx binary using the 
>>> file name of the Rexx script as argument, optionally followed by arguments 
>>> for the Rexx script 
>>> 
>>> so "rexxj[2].sh" Java gets launched (if the environment variable 
>>> "BSF4Rexx_JavaStartupOptions" exists then its value gets passed to java, 
>>> which configures the Java virtual machine, JVM) which loads the BSF4ooRexx 
>>> Java class named "org.rexxla.bsf.RexxDisp

Re: [Oorexx-devel] MaxOS: Java can load libBSF4ooRexx.dylib, ooRexx cannot

2021-07-21 Thread Jean Louis Faucher
Guten tag Rony

> A question here: after you removed the shebang line how were you able to 
> successfully invoke/run "rexx2.sh 1-010_HellowWorld.rxj"?
> 

That was the purpose of the side note, to explain why it works.

By the way, during my tests, I ran setupBSF.rex to review the generated 
scripts, and I noticed that rexxj.sh has no shebang. Keep it like that! It’s 
just to say that it works without shebang.

I’m curious to know if the most recent versions of MacOs still keep the DYLD 
variables when no shebang…
A simple echo $DYLD_LIBRARY_PATH is enough to check that.

If, at one moment, Apple decides to “fix” that, then the only workaround will 
be to put a copy of /bin/sh in /usr/local/bin, to make it unprotected by SIP.
Of course, this is not something for production, but still can be useful for a 
development machine.


Thanks for the background informations!
I understand that 
> java.lang.System.loadLibrary(libName)
takes care of java.library.path to find LibName, but the libs needed by LibName 
are not searched with the paths in java.library.path:
I have the path to ooRexx5 lib in java.library.path, they are not found when 
the shebang is used, i.e. when DYLD_LIBRARY is deleted.


Jean-Louis


> On 21 Jul 2021, at 17:03, Rony G. Flatscher  wrote:
> 
> Bonjour Jean-Louis,
> 
> thank you very much for your information!
> On 21.07.2021 09:21, Jean Louis Faucher wrote:
>> Guten tag Rony
>> 
>> Thanks a lot for the detailed explanations.
>> After setting BSF4Rexx_JavaStartupOptions as you explained, the 3rd test 
>> case is ok now.
>> More tests:
>> 
>> rexx 1-030_JavaVersion.rxj works correctly.
>> 
>> rexxj2.sh 1-010_HelloWorld.rxj did not work because of "Library not loaded: 
>> @rpath/librexx.4.dylib”
>> Should be found with DYLD_LIBRARY_PATH, but SIP deleted it:
>> - rexxj2.sh has a shebang line #!/bin/sh, which is protected by SIP
>> - the default java is protected by SIP.
>> 
>> After installing a local JDK (just unzip + set JAVA_HOME) and removing the 
>> shebang line of rexxj2.sh, that worked.
> 
> A question here: after you removed the shebang line how were you able to 
> successfully invoke/run "rexx2.sh 1-010_HellowWorld.rxj"?
> 
> 
> ---
> Ad background to "rexxj.sh"/"rexxj2.sh": 
> purpose: run Rexx scripts via java instead of via the rexx binary using the 
> file name of the Rexx script as argument, optionally followed by arguments 
> for the Rexx script 
> 
> so "rexxj[2].sh" Java gets launched (if the environment variable 
> "BSF4Rexx_JavaStartupOptions" exists then its value gets passed to java, 
> which configures the Java virtual machine, JVM) which loads the BSF4ooRexx 
> Java class named "org.rexxla.bsf.RexxDispatcher" and run its static main 
> method supplying all command line arguments. 
> 
> the main method of the Java class "org.rexxla.bsf.RexxDispatcher" will create 
> an instance of  "org.apache.bsf.BSFManager" 
> 
> all the command line arguments as parsed and supplied by Java and passed on 
> to the static main method as a Java String array get registered with the 
> BSFManager instance under the name "allCommandLineArguments"; 
> 
> BSFManager needs to find and create the engine for Rexx: it looks up the BSF 
> defined engine names and dynamically loads the Java class 
> "org.rexxla.bsf.engines.rexx.RexxEngine" which extends the abstract class 
> "org.apache.bsf.util.BSFEngineImpl" which  implements  the interface class 
> "org.apache.bsf.BSFEngine" 
> 
> an instance of "org.rexxla.bsf.engines.rexx.RexxEngine" gets created and the 
> current set of BSFManager registered beans will get registered with the 
> RexxEngine instance
> 
> the RexxEngine instance will have its "initialize()" method invoked
> 
> the RexxEngine creates an instance of 
> "org.rexxla.bsf.engines.rexx.RexxAndJava" which serves as the interface for 
> this combination of this BSFManager instance and this RexxEngine instance
> 
> the very first time the "org.rexxla.bsf.engines.rexx.RexxAndJava" class gets 
> loaded its static constructor will - among other things - load the dynamic 
> BSF4ooRexx library using java.lang.System.loadLibrary(libName)
> 
> the constructor of "org.rexxla.bsf.engines.rexx.RexxAndJava" will use a 
> native method from the BSF4ooRexx dynamic library to initialize it
> 
> the RexxEngine registers the BSFManager's registered beans with its instance 
> such that a Rexx programmer can get at the Java parsed arguments (a Java 
> array of type String) with the statement:
> 
> argsByJava=bsf.lookupBean

Re: [Oorexx-devel] MaxOS: Java can load libBSF4ooRexx.dylib, ooRexx cannot

2021-07-21 Thread Jean Louis Faucher
ould need to have also something like the following as sole entry or as 
> part of it (a supplied definition for java.library.path will inhibit 
> BSF4ooRexx to use its default):
> -Djava.library.path=the:paths:to:lookup:by:java
> If libBSF4ooRexx.dylib cannot be loaded by Java at this stage then the 
> loading of the Rexx script engine will cause an exception with the error 
> message that you experience:
> So with this context the test cases behave as expected. 
> ---
> Ad JAVA_HOME: this environment variable is very common in the Java world. It 
> allows to have many different Java versions on the same computer (there are 
> zip archives for Java which one merely can unzip) and use different Java 
> versions in different processes. Changing JAVA_HOME then allows one to test 
> an application on a different/specific Java version.
> 
> ---
> A hint ad using BSF4ooRexx in a non-installed use-case: if you change into 
> the unzipped directory of the BSF4ooRexx zip-archive, i.e. 
> "bsf4oorexx/install" and 
> run "setupBSF.rex" in "bsf4oorexx/install", then the installation and 
> companion scripts get created and a symbolic link to the system's 
> libBSF4ooRexx.dylib (there may be different on different Linuxes) gets 
> created in the unzipped "bsf4oorexx" directory; the created script 
> "setEnvironment4BSF.sh" will allow you to temporarily set your session's 
> environment to use this version of BSF4ooRexx, just source it and the 
> appropriate CLASSPATH environment variable will be set
> 
> if you have OpenOffice or LibreOffice installed and want to use it for the 
> AOO/LO Rexx sample and utility scripts (file extensions ".rxo", rexx script 
> for OpenOffice), then run "setupOOo.rex" in "bsf4oorexx/install" which will 
> also create a "setEnvironment4OOo.sh" which you can source (CLASSPATH gets 
> changed to point to the AOO/LO jar files that allow to use AOO/LO via 
> BSF4ooRexx)
> 
> if you then use PATH and DYLD_LIBRARY_PATH to point to the unzipped 
> "bsf4oorexx" directory you should be able to run all ooRexx scripts of 
> BSF4ooRexx in that session.
> Again, many thanks for taking the time to test this version!
> 
> ---rony
> 
> On 20.07.2021 11:36, Jean Louis Faucher wrote:
>> Guten tag Rony
>> 
>> I have the same error in the 3 test cases.
>> 
>> Note:
>> I don’t have a directory /opt/BSF4ooRex
>> I don’t have an environment variable with value /opt/BSF4ooRex
>> 
>> 
>> 1st test case
>> Nothing in DYLD_LIBRARY_PATH
>> libBSF4ooRexx.dylib copied in oorexx5 lib
>> 
>> rexx -e “call bfs.cls”
>> [BSFManager.loadScriptingEngine()] unable to load language: rexx: 
>> java.lang.UnsatisfiedLinkError: no BSF4ooRexx in java.library.path
>> 
>> libBSF4ooRexx.dylib is correctly loaded from oorexx5 lib
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>> dyld: loaded: 
>> /local/rexx/oorexx/build/official/main/trunk/macos/clang/release/64/delivery/lib/libBSF4ooRexx.dylib
>> 
>> libjvm is not found
>> dlopen(/opt/BSF4ooRexx/libjvm.dylib, 0x0009)
>>   dlopen() failed, error: 'dlopen(/opt/BSF4ooRexx/libjvm.dylib, 9): image 
>> not found'
>> 
>> 
>> 2nd test case
>> remove libBSF4ooRexx.dylib from oorexx5 lib
>> Put my install directory of libBSF4ooRexx.dylib in DYLD_LIBRARY_PATH
>> libjvm directory not put in DYLD_LIBRARY_PATH
>> 
>> rexx -e “call bfs.cls”
>> [BSFManager.loadScriptingEngine()] unable to load language: rexx: 
>> java.lang.UnsatisfiedLinkError: no BSF4ooRexx in java.library.path
>> 
>> libBSF4ooRexx.dylib is correctly loaded from my install directory
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>> dyld: loaded: 
>> /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210719-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib
>> 
>> libjvm is not found
>> dlopen(/opt/BSF4ooRexx/libjvm.dylib, 0x0009)
>>   dlopen() failed, error: 'dlopen(/opt/BSF4ooRexx/libjvm.dylib, 9): image 
>> not found'
>> 
>> 
>> 3rd test case
>> Add libjvm directory in DYLD_LIBRARY_PATH
>> 
>> rexx -e “call bfs.cls”
>> [BSFManager.loadScriptingEngine()] unable to load language: rexx: 
>> java.lang.UnsatisfiedLinkError: no BSF4ooRexx in java.library.path
>> 
>> libBSF4ooRexx.dylib is correctly loaded from my install directory
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>> dyld: loaded: 
>> /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210719-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib
>> 
>> libjvm is loaded (despite the path passed to dlopen)
>> d

Re: [Oorexx-devel] MaxOS: Java can load libBSF4ooRexx.dylib, ooRexx cannot

2021-07-20 Thread Jean Louis Faucher
Guten tag Rony

I have the same error in the 3 test cases.

Note:
I don’t have a directory /opt/BSF4ooRex
I don’t have an environment variable with value /opt/BSF4ooRex


1st test case
Nothing in DYLD_LIBRARY_PATH
libBSF4ooRexx.dylib copied in oorexx5 lib

rexx -e “call bfs.cls”
[BSFManager.loadScriptingEngine()] unable to load language: rexx: 
java.lang.UnsatisfiedLinkError: no BSF4ooRexx in java.library.path

libBSF4ooRexx.dylib is correctly loaded from oorexx5 lib
dlopen(libBSF4ooRexx.dylib, 0x0001)
dyld: loaded: 
/local/rexx/oorexx/build/official/main/trunk/macos/clang/release/64/delivery/lib/libBSF4ooRexx.dylib

libjvm is not found
dlopen(/opt/BSF4ooRexx/libjvm.dylib, 0x0009)
  dlopen() failed, error: 'dlopen(/opt/BSF4ooRexx/libjvm.dylib, 9): image not 
found'


2nd test case
remove libBSF4ooRexx.dylib from oorexx5 lib
Put my install directory of libBSF4ooRexx.dylib in DYLD_LIBRARY_PATH
libjvm directory not put in DYLD_LIBRARY_PATH

rexx -e “call bfs.cls”
[BSFManager.loadScriptingEngine()] unable to load language: rexx: 
java.lang.UnsatisfiedLinkError: no BSF4ooRexx in java.library.path

libBSF4ooRexx.dylib is correctly loaded from my install directory
dlopen(libBSF4ooRexx.dylib, 0x0001)
dyld: loaded: 
/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210719-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib

libjvm is not found
dlopen(/opt/BSF4ooRexx/libjvm.dylib, 0x0009)
  dlopen() failed, error: 'dlopen(/opt/BSF4ooRexx/libjvm.dylib, 9): image not 
found'


3rd test case
Add libjvm directory in DYLD_LIBRARY_PATH

rexx -e “call bfs.cls”
[BSFManager.loadScriptingEngine()] unable to load language: rexx: 
java.lang.UnsatisfiedLinkError: no BSF4ooRexx in java.library.path

libBSF4ooRexx.dylib is correctly loaded from my install directory
dlopen(libBSF4ooRexx.dylib, 0x0001)
dyld: loaded: 
/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210719-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib

libjvm is loaded (despite the path passed to dlopen)
dlopen
x/libjvm.dylib, 0x0009)
dyld: loaded: 
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib


> On 19 Jul 2021, at 18:01, Rony G. Flatscher  wrote:
> 
> Bonsoir Jean-Louis,
> 
> today I finished up a new version of BSF4ooRexx that should work in this 
> use-case. You can get it from 
> <https://sourceforge.net/projects/bsf4oorexx/files/beta/20200928/BSF4ooRexx_install_v641-20210719-beta.zip/download>
>  
> <https://sourceforge.net/projects/bsf4oorexx/files/beta/20200928/BSF4ooRexx_install_v641-20210719-beta.zip/download>.
>  (This version got tested against MacOS, Linux and Windows.)
> If you test this version in your environment then please let me know of any 
> difficulties or problems that you encounter. (This version of BSF4ooRexx is 
> still supposed to be usable against ooRexx 4.1 and higher, however 5.0 is 
> *strongly* advised due to its stable multithreadingness. For that reason some 
> JavaFX samples will deny being run on ooRexx prior to 5.0. This is another 
> reason for me to ask for a release version of ooRexx 5.0 beta *as is*, as it 
> is much stabler, faster and powerful than any earlier version of ooRexx.)
> 
> ---rony
> 
> On 18.07.2021 00:02, Jean Louis Faucher wrote:
>> Gute nacht Rony
>> 
>> I have an atypical configuration where I use DYLD_LIBRARY_PATH to locate the 
>> BSF4OORexx library.
>> This is because I don’t “install” BSF4OORexx, I just unzip the delivery, 
>> copy and rename the libraries to bsf4oorex/install/64
>> With this configuration, your test cases are working (not saying this is the 
>> solution).
>> 
>> 
>> If I don’t set DYLD_LIBRARY_PATH, I get the same error than yours.
>> 
>> I compared the output of the next command in both cases
>> DYLD_PRINT_LIBRARIES="1" DYLD_PRINT_APIS="1" rexx -e "call bsf.cls”
>> 
>> In the working session:
>> dlopen(librexxapi.dylib, 0x0001)
>>   dlopen(librexxapi.dylib) ==> 0x10936da50
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>> dyld: loaded: 
>> /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib
>> dyld: loaded: 
>> /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib
>> dyld: loaded: /usr/lib/libstdc++.6.0.9.dylib
>> 
>> In the not working session:
>> dlopen(librexxapi.dylib, 0x0001)
>>   dlopen(librexxapi.dylib) ==> 0x10dd4a990
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>>   dlopen() failed, error: 'dlopen(libBSF4ooRexx.dylib, 1): image not found'
>> dlopen(/usr/lib/libBSF4ooRexx.dylib, 0x0001)
>>   dlopen() failed, error: 'dlopen(/usr/lib/libBSF4ooRexx.dylib, 1): image 
>> not found'
>>919 *-* ::routine xBSF

Re: [Oorexx-devel] Building the Documentation for ooRexx

2021-07-19 Thread Jean Louis Faucher
Just to share that I was able to build all the pdf/html files with MacPorts 
under MacOs High Sierra.
My version of FOP is old (v1.1) but it worked.
P.O., thank you for the very clear instructions, it was easy to follow.
It took 1 hour 10 min on my old laptop Mid 2010.

I had just to put in comment this line:
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
in doc2fo.sh and doc2html.sh
because the variable is already defined and its value is different for MacPorts.

I switched to Gil’s toolkit because rexxpg and rexxref no longer build with 
Publican (at least for me).
Gil, thank you for this toolkit. The section "DocBook DTD and Style Sheets” in 
sources.txt gives interesting informations.

I tested the setup under Windows.
The URL for FOP  seems not working, don’t know if it”s temporary.
I replaced it with https://archive.apache.org/dist/xmlgraphics/fop/binaries/


Jean-Louis



> On 19 May 2020, at 19:56, P.O. Jonsson  wrote:
> 
> Dear developers,
> 
> I have ported Gils tools for building the documentation to macOS and to 
> Ubuntu Linux.
> 
> I have followed Gil´s logics as far as I could and the names of the scripts 
> are in essence the same and the way to use them as well.
> 
> For macOS I could make the build run on local files so it is just as fast as 
> the Windows version. For Ubuntu I failed this so the Ubuntu version rely on 
> an internet connection and is substantially slower. But the output for PDF 
> and HTML is (as far as I can judge) identical for all three build processes. 
> So at least this constitutes a proof of concept for building on all platforms.
> 
> Different from on Windows it was not possible for me to make a self-contained 
> version of the build tools, neither on macOS nor on Linux. I have set out 
> what tools need to be installed in a file WhatISHere.txt and explained how to 
> install them + I have  briefly explained he build process. Since the readme 
> for Windows is so complete I refer to it for the deeper understanding of the 
> build process.
> 
> Further I have set up a Dropbox folder Jenkinsshare 
>  
> where I have put zipped copies of the scripts. To try them out copy either 
> one of oorexxdocs-macOS.zip or oorexxdocs-Ubuntu.zip to a local folder, unzip 
> and follow the instructions in WhatIsHere.txt. Feedback is welcome.
> 
> Jenkinsshare 
>  
> also contains 3 complete sets of the documentation (Win/macOS/Ubuntu Linux), 
> please have a look and let us know what you think.
> 
> Jenkinsshare is intended as a platform for sharing files during development. 
> Gil, myself and Rony use it for sharing work on the documentation. 
> JenkinsShare is owned by Jenkins and present on the master and my Jenkins 
> slaves. Any developer who wants permanent access can send me a mail and I 
> will set it up. It is NOT a replacement for SVN/Sourceforge, just a quick way 
> of sharing data. Since the folder is shared by many I ask you to be moderate 
> when putting data there.
> 
> Hälsningar/Regards/Grüsse,
> P.O. Jonsson
> oor...@jonases.se 
> 
> 
> 
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] MaxOS: Java can load libBSF4ooRexx.dylib, ooRexx cannot

2021-07-18 Thread Jean Louis Faucher
Guten tag Rony

> It seems that at least with macOS Big Sur (version 11.4) DYLD_LIBRARY_PATH 
> does not work anymore (for "security reasons")
> 

Well, when this variable is not deleted by the system, it works as expected.
But ok, the point here is to work without this variable.

>> If I put libBSF4ooRexx.dylib in the lib folder of oorexx then it works 
>> (RPATH).
> Tried it on 11.4, but unfortunately does not work. It may have to do with  
> 

Indeed, it worked for me because I had the path to libjvm.dylib in 
DYLD_LIBRARY_PATH

By the way, you could check if DYLD_LIBRARY_PATH works with your system, when 
not deleted… Remove the symbolic link you created in oorexx lib, and try

DYLD_LIBRARY_PATH=“directory of ibjvm” rexx -e “call bfs.cls"

> This is strange as BSF4ooRexx explicitly looks in different locations for 
> libjvm.dylib and is not compiled with rpath in effect.
> 
If I understand correctly, you load dynamically libjvm using dlopen.
In this case, is it possible to remove completely the dependency on libjvm when 
linking ?



> On 18 Jul 2021, at 15:11, Rony G. Flatscher  wrote:
> 
> Bonjour Jean-Louis,
> On 18.07.2021 00:02, Jean Louis Faucher wrote:
>> I have an atypical configuration where I use DYLD_LIBRARY_PATH to locate the 
>> BSF4OORexx library.
>> This is because I don’t “install” BSF4OORexx, I just unzip the delivery, 
>> copy and rename the libraries to bsf4oorex/install/64
>> With this configuration, your test cases are working (not saying this is the 
>> solution).
> It seems that at least with macOS Big Sur (version 11.4) DYLD_LIBRARY_PATH 
> does not work anymore (for "security reasons"), as well as anything not 
> rooted on the Mac computer gets quarantined (got the same problem as with 
> ooRexx and BSF4ooRexx from the Internet when I installed OpenOffice 4.1.10 
> yesterday), so one needs to remove the com.apple.quarantine extended 
> attribute with xattr before the packages become operable again. (Personally, 
> I think that it is high time that someone has to stop Apple to deprive the 
> owners of Apple computers and also the Apple software developers.)
> 
> Cf. e.g. <https://developer.apple.com/forums/thread/13161> 
> <https://developer.apple.com/forums/thread/13161> at the bottom where 
> LD_LIBRARY_PATH and anything starting with DYLD_LIBRARY_PATH gets ignored all 
> of a sudden, also 
> <https://stackoverflow.com/questions/60126159/how-to-set-ld-library-path-dyld-library-path-on-macos>
>  
> <https://stackoverflow.com/questions/60126159/how-to-set-ld-library-path-dyld-library-path-on-macos>
>  at the bottom. Some background here: 
> <https://news.ycombinator.com/item?id=23612772> 
> <https://news.ycombinator.com/item?id=23612772>, here the authorative 
> description: 
> <https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html>
>  
> <https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html>.
>  
> [A few months ago I read that if one would run a copy of the shell program 
> from the user location then it would work. Tried it, but  could not get it to 
> work.]
>> If I don’t set DYLD_LIBRARY_PATH, I get the same error than yours.
>> 
>> I compared the output of the next command in both cases
>> DYLD_PRINT_LIBRARIES="1" DYLD_PRINT_APIS="1" rexx -e "call bsf.cls”
>> 
>> In the working session:
>> dlopen(librexxapi.dylib, 0x0001)
>>   dlopen(librexxapi.dylib) ==> 0x10936da50
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>> dyld: loaded: 
>> /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib
>> dyld: loaded: 
>> /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib
>> dyld: loaded: /usr/lib/libstdc++.6.0.9.dylib
>> 
>> In the not working session:
>> dlopen(librexxapi.dylib, 0x0001)
>>   dlopen(librexxapi.dylib) ==> 0x10dd4a990
>> dlopen(libBSF4ooRexx.dylib, 0x0001)
>>   dlopen() failed, error: 'dlopen(libBSF4ooRexx.dylib, 1): image not found'
>> dlopen(/usr/lib/libBSF4ooRexx.dylib, 0x0001)
>>   dlopen() failed, error: 'dlopen(/usr/lib/libBSF4ooRexx.dylib, 1): image 
>> not found'
>>919 *-* ::routine xBSF   PUBLIC   EXTERNAL "LIBRARY 
>> BSF4ooRexx BSF "
>>  1 *-* call bsf.cls
>> Error 98 running 
>> /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/BSF.CLS
>>  

Re: [Oorexx-devel] MaxOS: Java can load libBSF4ooRexx.dylib, ooRexx cannot

2021-07-17 Thread Jean Louis Faucher
Gute nacht Rony

I have an atypical configuration where I use DYLD_LIBRARY_PATH to locate the 
BSF4OORexx library.
This is because I don’t “install” BSF4OORexx, I just unzip the delivery, copy 
and rename the libraries to bsf4oorex/install/64
With this configuration, your test cases are working (not saying this is the 
solution).


If I don’t set DYLD_LIBRARY_PATH, I get the same error than yours.

I compared the output of the next command in both cases
DYLD_PRINT_LIBRARIES="1" DYLD_PRINT_APIS="1" rexx -e "call bsf.cls”

In the working session:
dlopen(librexxapi.dylib, 0x0001)
  dlopen(librexxapi.dylib) ==> 0x10936da50
dlopen(libBSF4ooRexx.dylib, 0x0001)
dyld: loaded: 
/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib
dyld: loaded: 
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib
dyld: loaded: /usr/lib/libstdc++.6.0.9.dylib

In the not working session:
dlopen(librexxapi.dylib, 0x0001)
  dlopen(librexxapi.dylib) ==> 0x10dd4a990
dlopen(libBSF4ooRexx.dylib, 0x0001)
  dlopen() failed, error: 'dlopen(libBSF4ooRexx.dylib, 1): image not found'
dlopen(/usr/lib/libBSF4ooRexx.dylib, 0x0001)
  dlopen() failed, error: 'dlopen(/usr/lib/libBSF4ooRexx.dylib, 1): image not 
found'
   919 *-* ::routine xBSF   PUBLIC   EXTERNAL "LIBRARY 
BSF4ooRexx BSF "
 1 *-* call bsf.cls
Error 98 running 
/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/BSF.CLS 
line 919:  Execution error.
Error 98.903:  Unable to load library "BSF4ooRexx".

I find "/usr/lib” in one file:
SysLibrary.cpp

// try loading directly
libraryHandle = dlopen(nameBuffer, RTLD_LAZY);
// if not found, then try from /usr/lib
if (libraryHandle == NULL)
{
sprintf(nameBuffer, "/usr/lib/lib%s%s", name, ORX_SHARED_LIBRARY_EXT);
libraryHandle = dlopen(nameBuffer, RTLD_LAZY);

The part to investigate is how to make the first dlopen work without using 
DYLD_LIBRARY_PATH:
If I put libBSF4ooRexx.dylib in the lib folder of oorexx then it works (RPATH).
If I put libBSF4ooRexx.dylib in the current directory then it works (see man 
dlopen).
I don’t know if other solutions are possible for the first dlopen

The other solution could to add “/usr/local/lib” as 2nd fallback.
But that brings the question of order.
Maybe a more general solution would be to use an environment variable like 
REXX_LIBRARY_PATH.
We have already REXX_PATH for locating the rexx files.


Jean-Louis

> On 17 Jul 2021, at 21:56, Rony G. Flatscher  wrote:
> 
> On MacOSX the BSF4ooRexx library is named "libBSF4ooRexx.dylib". 
> Testing the changes in the BSF4ooRexx installation scripts and then testing 
> the resulting installations surfaced a problem on MacOSX: libBSF4ooRexx.dylib 
> can be loaded via Java and used successfully. 
> However, loading "libBSF4ooRexx.dylib" via ooRexx is not successful. To be 
> precise, the 
> ::routine xbsf PUBLIC EXTERNAL "LIBRARY BSF4ooRexx BSF"
> fails with the execution error:
> 
> Error 98.903: Unable to load library "BSF4ooRexx".
> Here two rexxtry.rex sessions, the first one is run with "rexxj.sh 
> /usr/local/bin/rexxtry.rex" which loads a Java program that will load the 
> BSF4ooRexx library to then execute /usr/local/bin/rexxtry.rex. This is 
> followed by a "rexx rexxtry.rex" session which yields the exection error. 
> This is then followed by the "rexx -e" statement which does a call BSF.CLS 
> which then shows the full error message:
> 
> rony@ronymac2014 ~ % rexxj.sh /usr/local/bin/rexxtry.rex 
> REXX-ooRexx_5.0.0(MT)_64-bit 6.05 12 Jul 2021
>   rexxtry.rex lets you interactively try REXX statements.
> Each string is executed when you hit Enter.
> Enter 'call tell' for a description of the features.
>   Go on - try a few...Enter 'exit' to end.
> call bsf.cls
>   .. rexxtry.rex on DARWIN
> say .bsf4rexx~display.version
> ooRexx 5.0.0 r12280 (12 Jul 2021) / BSF 641.20210715 / Java 1.8.0_162, 64-bit 
> / Darwin 20.5.0
>   .. rexxtry.rex on DARWIN
> exit
> rony@ronymac2014 ~ % rexxtry.rex 
> REXX-ooRexx_5.0.0(MT)_64-bit 6.05 12 Jul 2021
>   rexxtry.rex lets you interactively try REXX statements.
> Each string is executed when you hit Enter.
> Enter 'call tell' for a description of the features.
>   Go on - try a few...Enter 'exit' to end.
> call bsf.cls
>   Oooops ! ... try again. Execution error.
>   Unable to load library "BSF4ooRexx".
>   rc = 98.903 .. rexxtry.rex on DARWIN
> exit
> rony@ronymac2014 ~ % rexx -e "call bsf.cls"
>919 *-* ::routine xBSF   PUBLIC   EXTERNAL "LIBRARY 
> BSF4ooRexx BSF "
>  1 *-* call bsf.cls
> Error 98 running /usr/local/bin/BSF.CLS line 919:  Execution error.
> Error 98.903:  Unable to load library 

[Oorexx-devel] SysSearchPath Rev 11061 to cancel: the build path is hardcoded in the executable, and overrides the runtime PATH

2021-05-24 Thread Jean Louis Faucher
On June 27, 2016:
Rev 11061 "Erico Mendonca: adds the capability to relocate the main REXX class 
directory to avoid placing everything under /usr/bin"

Impacted:
unix platform
SysSearchPath::SysSearchPath(const char *parentDir, const char *extensionPath)

Because of this change, if your REXX_PATH is empty, then a default value coming 
from the build step is used (hardcoded in the executable).
In my case, I get this search order:
rexxPath = 
/local/rexx/oorexx/build/official/main/trunk/macos/clang/debug/64/build/bin
followed by
sysPath = 
/local/rexx/oorexx/build/official/main/trunk/macos/clang/debug/64/delivery/bin

I discovered the problem under MacOs while testing the JSON implementation 
offered by Rony to the project back in 2016.
In the delivery/bin directory (which is in my PATH) I replaced the file 
json.cls by the implementation of Rony.
But when testing, it was still the current JSON implementation that was used: 
the one found in the build/bin directory.

The windows platform is not impacted.

Best regards
Jean Louis



___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Mac: "Library not loaded: @rpath/librexx.4.dylib"

2021-03-19 Thread Jean Louis Faucher
Guten tag Rony

The @path comes the dylib you link with.
(LC_ID_DYLIB)

otool -D librexx.dylib: @rpath/librexx.4.dylib
otool -D librexxapi.dylib: @rpath/librexxapi.4.dylib

Your library embeds this dependency:
otool -L libBSF4ooRexx.dylib
./tmp/libBSF4ooRexx.dylib-64-x86_64 (compatibility version 0.0.0, 
current version 0.0.0)
@rpath/librexx.4.dylib (compatibility version 4.0.0, current version 
0.0.0)
@rpath/librexxapi.4.dylib (compatibility version 4.0.0, current version 
0.0.0)
/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
400.9.4)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1252.250.1)

In rexxj.sh, you declare -Djava.library.path="$DYLD_LIBRARY_PATH"
Is it including the path to the oorexx dylibs ?


> On 19 Mar 2021, at 18:36, Rony G. Flatscher  wrote:
> 
> Dear P.O.,
> 
> On 19.03.2021 17:59, P.O. Jonsson wrote:
> ... cut ...
>> Two wild guesses: is the student maybe running macOS with encryption? 
> 
> Hmm, would you have links that explain/describe about the implications of 
> doing so?
> 
> One thing I start to speculate with is Apple's security measures that incur 
> side-effects for the
> uninitiated (like myself in that regard) that cause this.
> 
> When installing BSF4ooRexx Apple does not allow that to proceed as the 
> installation package is
> unsigned and/or downloaded from the Internet. Rather she would go into System 
> Preferences where
> there was an item (forgot which one) that allowed her to install that very 
> same BSF4ooRexx package.
> If something went wrong there it may be the case that that inhibits 
> finding/loading the shared
> libraries from that package?
> 
>> Or use a case sensitive file system?
> This should not pose a problem as BSF4ooRexx works on the case sensitive 
> Linux file systems.
>> This problem looks to me like a „Windows-type“ problem, i.e. I guess the OS 
>> itself is rotten in
>> some way. I would ask the student to reinstall macOS. And reinstall 
>> BSF/ooRexx after that.
>> 
>> If that is to much work try to find another machine where s/he can do the 
>> same installation. If
>> the problem arises again it is in his/her special setup.
>> 
>> I have never once experienced something like what you describe, and I am 
>> juggling many different
>> ooRexx/BSF/installer/dmg versions at the same time. On an older machine 
>> using hfs+ I have a
>> problem with sub-second filenames but that is the only thing. And I have 
>> macOS on anything from
>> High Sierra to Big Sur.
> 
> Thank you very much for your feedback and ideas, which are really helpful in 
> this situation!
> 
> Having experimented with new builds of the shared library (on "Big Sur") they 
> all work and the
> linking step creates @rpath/librexx.4.dylib, @rpath/librexxapi.4.dylib, and 
> @rpath/libjvm.dylib (but
> also /usr/lib/libc++.1.dylib and /usr/lib/libSystem.B.dylib).
> 
> Not sure whether further time investments would alleviate the problem on the 
> student's computer,
> given your wealth of MacOS systems and experiences (will have to adapt the 
> Mac installer of
> BSF4ooRexx to cater for zsh, and time permitting to change the installer to 
> check for the existence
> of ooRexx on the system already, and if so use that ooRexx instead the one on 
> board of BSF4ooRexx
> and the like)!
> 
> Best regards
> 
> ---rony
> 
> 
> 
> 
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel



___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Mac: "Library not loaded: @rpath/librexx.4.dylib"

2021-03-18 Thread Jean Louis Faucher
Hello Rony

2 URLs that could help

https://stackoverflow.com/questions/45464584/macosx-which-dynamic-libraries-linked-by-binary
 

try
DYLD_PRINT_LIBRARIES=1 DYLD_PRINT_LIBRARIES_POST_LAUNCH=1 DYLD_PRINT_RPATHS=1 
rexxj.sh ...


https://blog.krzyzanowskim.com/2018/12/05/rpath-what/ 


From here, I could be wrong, but I understand that @rpath instructs the dynamic 
linker to search a list of LC_RPATH in order, and substitute @rpath by the 
value of LC_RPATH to locate the dynamic library.

To display the LC_RPATH of rexx:
otool -l rexx | grep LC_RPATH -A2

The value is @executable_path/../lib
so @rpath/librexx.4.dylib
becomes 
@executable_path/../lib//librexx.4.dylib

rexxj.sh is launching java, not rexx.
I assume that java and rexx are not in the same folder, so maybe it’s the 
reason why this library is not found ?


> On 18 Mar 2021, at 17:47, Rony G. Flatscher  wrote:
> 
> Got a strange error on a student's MacBook (Mojave) which I am not able to 
> recreate at all nor have I received a comparable error report so far:
> T-MacBook-Air:~ t.f$ rexxj.sh 
> /Applications/ooRexx.app/Contents/utilities/ooRexxTry.rxj && exit 
> [BSFManager.loadScriptingEngine()] unable to load language: rexx: 
> java.lang.UnsatisfiedLinkError: 
> /Library/Frameworks/BSF4ooRexx.framework/Versions/A/Libraries/libBSF4ooRexx.dylib:
>  
> dlopen(/Library/Frameworks/BSF4ooRexx.framework/Versions/A/Libraries/libBSF4ooRexx.dylib,
>  1): Library not loaded: @rpath/librexx.4.dylib
>   Referenced from: 
> /Library/Frameworks/BSF4ooRexx.framework/Versions/A/Libraries/libBSF4ooRexx.dylib
>   Reason: image not found
> at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
> at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
> at 
> java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
> at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
> at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2659)
> at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
> at java.base/java.lang.System.loadLibrary(System.java:1873)
> at org.rexxla.bsf.engines.rexx.RexxAndJava.(RexxAndJava.java:871)
> at org.rexxla.bsf.engines.rexx.RexxEngine.initialize(RexxEngine.java:291)
> at org.apache.bsf.BSFManager$8.run(BSFManager.java:854)
> at java.base/java.security.AccessController.doPrivileged(Native Method)
> at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:852)
> at org.rexxla.bsf.RexxDispatcher.main(RexxDispatcher.java:117)
> Teresas-MacBook-Air:~ t.f$ 
> All the ooRexx libraries (e.g. librexx.3.dylib, librexx.4.dylib, 
> librexx.dylib) are in /usr/local/lib linking to: 
> /Library/Frameworks/ooRexx.framework/Libraries/ (librexx.3.dylib, 
> librexx.4.dylib are links to librexx.dylib).
> Running ooRexx programs from anywhere on the system works.
> Anyone with an idea, an advice what to look for, what to do in this case?
> 
> ---rony
> 
> P.S.: This BSF4ooRexx (which includes oorexx) got used: 
> 
>  
> 
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Old Process for Building the ooRexx Documentation (Publican)

2020-02-01 Thread Jean Louis Faucher
The notes and tools in my GitHub repository are for the old format of 
documentation, before the work made by David to switch to Publican.
Nothing you can reuse for the current version.


> On 1 Feb 2020, at 19:49, Gil Barmwater  wrote:
> 
> Hi Rony,
> 
> In looking at the documentation files on SF, I saw a number of .css files 
> which I assumed were needed/used by the HTML build process. Perhaps all they 
> need is some tweaking to fix the problems P.O. is seeing?
> 
> I've forgotten but does Jean-Louis' process produce the same railroad 
> diagrams that we are using now? The link you provided just leads to the diary 
> of his work.
> 
> I agree that color coding the examples would be nice but I believe that is a 
> "feature" of DocBook that may require a different transform program. This 
> link <http://www.sagehill.net/docbookxsl/SyntaxHighlighting.html> describes 
> how to do something like this but I have not delved into the details so I 
> don't know how one would tell the highlighting program that the code was 
> ooRexx and then how to color it. Sounds like a project for someone to 
> undertake after we get the new process up and running. It appears that each 
> example would require as least some modification and, by my count, there are 
> more than 6400(!) instances of the  tag in our documents. I 
> did that research because I know why* we are getting extra blank lines in our 
> examples and I wanted to see how hard it would be to fix. Based on the number 
> of instances, I decided to use Erich's program to strip the blanks instead.
> Finally, I have been working exclusively on Windows 10 since Erich noted that 
> Publican was not stable on the platform and we therefore needed some other 
> toolchain in order to be able to reliably produce our documentation for 
> ooRexx. I try to keep my systems up to date and a "ver" command gives:
> 
> Microsoft Windows [Version 10.0.18363.592]
> 
> *The reason we get leading blanks in our examples is that we are coding them 
> wrong! Docbook says that the contents of the  element are 
> treated "verbatim" and, because Docbook is XML and not HTML, whitespace is 
> preserved, including line breaks. So when we code the tag on one line but 
> start the example on the next line, the first "character" of the example is a 
> line break(!) and we get a blank line in the output. Simply starting the 
> example code immediately after the tag solves the problem. There were several 
> examples in the "common" files which I fixed that way along with the DTD 
> changes. 
> Gil
> On 2/1/2020 8:59 AM, Rony G. Flatscher wrote:
>> On 31.01.2020 22:09, P.O. Jonsson wrote:
>>> many thanks for your feedback, I read your thread and I think you gave me 
>>> just the hint I needed
>>> to inject Erichs cleaning script in to my build toolchain (it works 
>>> slightly different to Erichs
>>> setup). I will let you know if it worked.
>>> 
>>> When I compare what you write with the process I see using Publican the 
>>> differences are not very
>>> big, except you use more up-to-date tools, I use Publican 3.0 and fop 1.1 
>>> and something called
>>> LIBXSLT, an extension written in Python (in 2008!) to replace XSLTPROC that 
>>> you have chosen, so I
>>> have good hope that your toolchain will produce very similar results to 
>>> what we are used to.
>>> 
>>> What about the html - are they needed at all? They do not render very well 
>>> in comparison to the
>>> PDFs and the output looks different on different browsers (surprise), but 
>>> the main deficiency I
>>> see is that some diagrams overwrite text, they are simply to large in 
>>> comparison. Skipping the
>>> html would cut the rendering time with approx 40%.
>> Well, having HTML renderings would allow one to place all of the ooRexx 
>> documentation on the web and
>> allow it to be indexed by search machines, so I would think it to be very 
>> useful and makes ooRexx
>> more researchable, more visible. If you succeed in making the documentation 
>> an automated task on
>> Jenkins, then it should not be a problem at all. Additionally, changes to 
>> the documentation do not
>> occur frequently, such that time stamped regenerations would be relatively 
>> scarce.
>> 
>> Ad formatting: this could be fixed by defining a CSS (as a separate text 
>> file, referred to by the
>> HTML renderings in the head's style element) with formatting definitions for 
>> the HTML version, such
>> that all browsers render it the same. This could also be used to control the 
&g

Re: [Oorexx-devel] Need some help with linux debugging.

2019-02-02 Thread Jean Louis Faucher
I made a debug on MacOs with Xcode (after fixing the compile error).rexximage(30751,0x10075b380) malloc: *** error for object 0x101801800: pointer being freed was not allocated#0	0x7fff7b350b66 in __pthread_kill ()#1	0x0001007540f0 in pthread_kill ()#2	0x7fff7b2ac1ae in abort ()#3	0x7fff7b3aa822 in free ()#4	0x0001003ccf2c in FileNameBuffer::~FileNameBuffer() at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/memory/FileNameBuffer.hpp:60#5	0x0001003ca505 in FileNameBuffer::~FileNameBuffer() at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/memory/FileNameBuffer.hpp:57#6	0x00010044c10d in InterpreterInstance::resolveProgramName(RexxString*, RexxString*, RexxString*) at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/runtime/InterpreterInstance.cpp:1085#7	0x0001003e3831 in Activity::resolveProgramName(RexxString*, RexxString*, RexxString*) at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/concurrency/Activity.cpp:3400#8	0x0001003c7b79 in MemoryObject::createImage() at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/memory/Setup.cpp:1700#9	0x0001003c80cd in MemoryObject::initialize(bool) at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/memory/RexxMemory.cpp:200#10	0x0001004484a9 in Interpreter::startInterpreter(Interpreter::InterpreterStartupMode) at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/runtime/Interpreter.cpp:155#11	0x000100371beb in ::RexxCreateInterpreterImage() at /local/rexx/oorexx/official/sandbox/rick/rexxutil/interpreter/api/InterpreterAPI.cpp:93#12	0x00011f84 in main at /local/rexx/oorexx/official/sandbox/rick/rexxutil/utilities/rexximage/rexximage.cpp:44#13	0x7fff7b200015 in start ()Then during further investigation, I noticed other  things to fix (probably already fixed locally in your sandbox)FileNameBuffer.hpp : replace memcmp by memcpy where appropriate (2 occurrences)unix/SysInterpreterInstance.hpp :replace ‘;’ by ‘:’ where appropriate (2 occurrences)After fixing that and adding the copy constructor & operator, I was able to build your sandbox, and the resulting rexx executable is working.To check if the copy constructor & operator is really needed, you can declare them private.You will have some compilation errors, it’s a good way to see where the compiler creates temporary objects for FileNameBuffer

changes_applied.patch
Description: Binary data
On 2 Feb 2019, at 11:44, Rick McGuire  wrote:oops, I still had some uncommitted code. RickOn Fri, Feb 1, 2019 at 7:57 PM Enrico Sorichetti via Oorexx-devel  wrote:Hi Rick,I gave it a try with svn checkout https://svn.code.sf.net/p/oorexx/code-0/sandbox/rick/rexxutil oorexx.ricksvn infoPath: .Working Copy Root Path: /opt/oorexx.rickURL: https://svn.code.sf.net/p/oorexx/code-0/sandbox/rick/rexxutilRelative URL: ^/sandbox/rick/rexxutilRepository Root: https://svn.code.sf.net/p/oorexx/code-0Repository UUID: 0b6cbdbe-3aab-466e-b73a-abd511dda0a2Revision: 11703Node Kind: directorySchedule: normalLast Changed Author: bigrixxLast Changed Rev: 11702Last Changed Date: 2019-01-31 22:25:51 + (Thu, 31 Jan 2019)Unfortunately I get /opt/oorexx.rick/interpreter/platform/unix/SysRexxUtil.cpp: In function '_RexxObjectPtr* SysGetFileDateTime_impl(RexxCallContext*, CSTRING, CSTRING)':/opt/oorexx.rick/interpreter/platform/unix/SysRexxUtil.cpp:1693:102: error: 'echoOpt' was not declared in this scope                 invalidOptionException(context, "SysGetFileDateTime", "time selector", "'A' or 'W'", echoOpt);EnricoOn 2 Feb 2019, at 00:39, Rick McGuire  wrote:For my rexxutil sandbox version, I'm able to get a clean build on Windows, but on Linux, I get a crash running rexximage. I've tried debugging this using ddd, but it doesn't really give my any useful information. I'd really appreciate any assistance you can provide.Rick
___Oorexx-devel mailing listOorexx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/oorexx-devel___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

___Oorexx-devel mailing listOorexx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/oorexx-devel___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Need some help with linux debugging.

2019-02-02 Thread Jean Louis Faucher
FileNameBuffer
You should create a copy constructor and a copy assignment operator.
With their default implementation created by the compiler, the buffer is copied 
as-is, and you have multiple delete of the same buffer.

 FileNameBuffer(const FileNameBuffer );
 FileNameBuffer =(const FileNameBuffer )


> On 2 Feb 2019, at 11:44, Rick McGuire  wrote:
> 
> oops, I still had some uncommitted code. 
> 
> Rick
> 
> On Fri, Feb 1, 2019 at 7:57 PM Enrico Sorichetti via Oorexx-devel 
>  > wrote:
> Hi Rick,
> I gave it a try with 
> 
> svn checkout https://svn.code.sf.net/p/oorexx/code-0/sandbox/rick/rexxutil 
>  oorexx.rick
> 
> 
> svn info
> Path: .
> Working Copy Root Path: /opt/oorexx.rick
> URL: https://svn.code.sf.net/p/oorexx/code-0/sandbox/rick/rexxutil 
> 
> Relative URL: ^/sandbox/rick/rexxutil
> Repository Root: https://svn.code.sf.net/p/oorexx/code-0 
> 
> Repository UUID: 0b6cbdbe-3aab-466e-b73a-abd511dda0a2
> Revision: 11703
> Node Kind: directory
> Schedule: normal
> Last Changed Author: bigrixx
> Last Changed Rev: 11702
> Last Changed Date: 2019-01-31 22:25:51 + (Thu, 31 Jan 2019)
> 
> 
> Unfortunately I get 
> 
> /opt/oorexx.rick/interpreter/platform/unix/SysRexxUtil.cpp: In function 
> '_RexxObjectPtr* SysGetFileDateTime_impl(RexxCallContext*, CSTRING, CSTRING)':
> /opt/oorexx.rick/interpreter/platform/unix/SysRexxUtil.cpp:1693:102: error: 
> 'echoOpt' was not declared in this scope
>  invalidOptionException(context, "SysGetFileDateTime", "time 
> selector", "'A' or 'W'", echoOpt);
> 
> 
> Enrico
> 
> 
>> On 2 Feb 2019, at 00:39, Rick McGuire > > wrote:
>> 
>> For my rexxutil sandbox version, I'm able to get a clean build on Windows, 
>> but on Linux, I get a crash running rexximage. I've tried debugging this 
>> using ddd, but it doesn't really give my any useful information. I'd really 
>> appreciate any assistance you can provide.
>> 
>> Rick
>> ___
>> Oorexx-devel mailing list
>> Oorexx-devel@lists.sourceforge.net 
>> 
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel 
>> 
> 
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel 
> 
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] [Announce] Welcome Erico Mendonca as a committer on the ooRexx project

2016-07-04 Thread Jean-Louis Faucher
Congratulations Erico !
and welcome.
Jean-Louis


2016-07-04 19:33 GMT+02:00 Jon Wolfers :

> Erico has been working consistently on the build team for the project.
> The Committers and the RexxLa have invited him to become a committer and
> I'm very happy to say that he has accepted.
>
> Please welcome him.
>
> Jon
>
>
> --
> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Recent 5.0.0 windows build (x86_32)

2015-10-21 Thread Jean-Louis Faucher
Did you try to kill rxapi ?
Each time you swap between 32 & 64-bit, you have to kill rxapi.

On my system, I find mspdb140.dll here:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mspdb140.dll
C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin\amd64\mspdb140.dll
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\mspdb140.dll

A possible reason why the dll is not found, or the wrong version is used,
is because your PATH becomes too long if you execute several times
vcvarsall in the same cmd.


2015-10-21 23:56 GMT+02:00 Erich Steinböck <erich.steinbo...@gmail.com>:

> I was too quick to announce my first successful build.
> rexx -v is really the only thing that works for this 32-bit build.
> Any REXX program, even rexx -e "" hangs without a message.
> And devenv /debugexe rexx.exe does nothing except start the VS2015 GUI
> (same for devenv /debugexe rexximage.exe)
> Trying to build 64-bit won't work either (the x86_amd64 cl.exe won't start
> because of a missing dll)
>
> Erich
>
> On Wed, Oct 21, 2015 at 11:07 PM, Rick McGuire <object.r...@gmail.com>
> wrote:
>
>>
>>
>> On Wed, Oct 21, 2015 at 5:02 PM, Erich Steinböck <
>> erich.steinbo...@gmail.com> wrote:
>>
>>> *Jean-Louis, *that was the culprit.
>>> I just did a rxapi /u and nmake would continue happily.
>>> My very first build seems to be successful! *THANKS!!*
>>> Open Object Rexx Version 5.0.0 - Internal Test Version
>>> Build date: Oct 21 2015
>>> Addressing Mode: 32
>>>
>>> I'm normally running a 64-Bit rxapi, so I first tried to also *build *64
>>> bit.
>>> i.e. vcvarsall.bat x64, but then cmake -G "NMake Makefiles" [path]
>>> issued  a number of LINKer errors about machine and compiler bitness was
>>> different.  As I couldn't solve this, I did
>>> vcvarsall.bat x86 and after a few glitches, it seemed to work (see
>>> above).
>>>
>>> run rexximage in the debugger and see where the hang is.
>>>>
>>> *Rick*: I managed to start VS 2015 and tried
>>>
>>>1. Debug, Attach to Process (I could attach to the nmake process,
>>>but were unable to find out how to "debug" something)
>>>2. Debug, Profile, Performace Explorer, Start profiling: I could
>>>start nmake from here, but also don't see how to "debug" anything here
>>>
>>>
>> from the binary directory, just issue
>>
>> devenv /debugexe rexximage.exe
>>
>> to bring up rexximage in the debugger.  You can than run the program and
>> halt execution once it hangs.
>>
>> Rick
>>
>>>
>>>1.
>>>
>>> Erich
>>>
>>> On Wed, Oct 21, 2015 at 9:55 PM, Jean-Louis Faucher <
>>> jfaucher...@gmail.com> wrote:
>>>
>>>> Erich
>>>>
>>>> Do you have killer.exe in your PATH ?
>>>> A possible reason why rexximage hangs is because you have a running
>>>> rxapi whose bitness is different from the bitness of the rexx.exe you are
>>>> building..
>>>> If that's the case, then kill rxapi using the task manager.
>>>>
>>>>
>>>> 2015-10-21 21:49 GMT+02:00 Rick McGuire <object.r...@gmail.com>:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Oct 21, 2015 at 3:45 PM, Erich Steinböck <
>>>>> erich.steinbo...@gmail.com> wrote:
>>>>>
>>>>>> NMake proceeds further but then hangs at the point below.
>>>>>>>
>>>>>> Same issue here (Windows 7).
>>>>>> cmake ran successfully, nmake proceeds up to
>>>>>>
>>>>>> [ 80%] Generating bin/rexx.img
>>>>>>
>>>>>> and hangs.
>>>>>>
>>>>>> I see that exactly the same issue was independently reported also by
>>>>>> Staffan and René last September.
>>>>>>
>>>>>> Jon, did you solve this issue?
>>>>>> Any ideas what I should try?
>>>>>>
>>>>>>
>>>>> run rexximage in the debugger and see where the hang is.
>>>>>
>>>>> Rick
>>>>>
>>>>>
>>>>>> Thanks, Erich
>>>>>>
>>>>>> On Wed, May 27, 2015 at 9:16 AM, Jon Wolfers <sahana...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Jean-Louis,
>>>>>>&g

Re: [Oorexx-devel] Windows ooRexx way to GetLongPathName

2015-07-12 Thread Jean-Louis Faucher
In addition to the answer of Gil, you can have a look at this script which
uses GCI to call GetLongPathName :
https://gist.github.com/jlfaucher/78b32211790b7a752290
It works with Regina 32 bits and ooRexx 32 bits.
It works also with ooRexx 64 bits, but you will need to build GCI 64 bits
from the sources of the version 1.1. The procedure is described at the end
of the script, there are 2 modifications to apply to the sources.
Not working with Regina 64 bits, but I think it will if the change for
GCI_STACK_ELEMENT is applied to gci_convert.win64.vc

Jean-Louis

2015-07-08 16:26 GMT+02:00 Gil Barmwater gbarmwa...@alum.rpi.edu:

  Thanks Erich!  I had no idea Mark was working on this so this is good
 news.  Because of the lack of 64-bit support in Rexx GCI, I really wanted
 to try to do a DLL that would implement the GCI functions I had written.
 That DLL could then be compiled for 64- as well as 32-bit versions of
 ooRexx.  But it appears that what Mark has implemented is so much more than
 the small piece of the Windows console API that I had needed to do colored
 text/background.  The bad news is that there is no documentation :-( !
 So it will take a lot of study of the code and its comments in order to
 figure it out and, eventually, write the docs.  I can't promise that I can
 do that for 5.0.0 but I'll start looking at it as I have time.  At least I
 have some familiarity with the Windows API which is probably a (small) step
 ahead of anyone else that might tackle this. But there will surely be
 questions when I look at the *ix side as I have no expertise there.


 On 7/8/2015 9:59 AM, Erich Steinböck wrote:

   I used it to do colored text in a console window

 Gil, there's Mark's new ooConsole package in the incubator (
 https://sourceforge.net/p/oorexx/code-0/HEAD/tree/incubator/ooConsole/).
 It might be a candidate for inclusion in 5.0

 *ooConsole is an ooRexx extension package that provides access to the
 Windows console API.*

  I can't tell whether it's ready for release, as the binaries have yet to
 be built.  There also seems to be no documentation yet.  If you're
 interested, you might want to check it out and help bring it into 5.0

  Erich

 On Wed, Jul 8, 2015 at 2:49 PM, Gil Barmwater gbarmwa...@alum.rpi.edu
 wrote:

 Hi Michael,

 Perhaps you are referring to the Rexx GCI package which can be obtained
 from http://sourceforge.net/projects/rexx-gci/ .  The GCI package is
 used to
 access the Windows APIs.  I used it to do colored text in a console
 window.
 It is, however, only available for 32 bit (oo)Rexx .  HTH,

 On 7/8/2015 5:34 AM, Michael Lueck wrote:
  Greetings again,
 
  Michael Lueck wrote:
  I suspect this is what the qualify method of the Stream class is doing:
 
 https://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx
 
  GetFullPathName does not convert the specified file name, lpFileName.
 If the specified file name exists, you can use GetLongPathName or
 GetShortPathName to convert to long or short path names,
  respectively.
 
  I recalled some Rexx project with aim to bridge over to the vast
 majority of DLL API's without having to special develop/compile an
 interface in a Rexx DLL to said DLL API. Perhaps that would be a
  more convenient way to obtain access to GetLongPathName and
 GetShortPathName Windows API's.
 
  Can someone recall what project it is that came to mind?
 
  I am thankful,
 

 --
 Gil Barmwater


 --
 Gil Barmwater


 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud 
 Today.https://www.gigenetcloud.com/



 ___
 Oorexx-devel mailing 
 listOorexx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/oorexx-devel


 --
 Gil Barmwater



 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Oorexx-devel mailing list
 

Re: [Oorexx-devel] oorexx doc build

2015-07-11 Thread Jean-Louis Faucher
René

In the log output, I still see that :

+ cd oorexx
+ make brand

... (build ok)
+ make install
... (error)

The idea was to no longer install the brand during the automatic build.
I suppose that you have a script where make install is called.
You should put in comment this line, or use the option -i to ignore all the
errors.

Jean Louis

2015-07-08 16:26 GMT+02:00 Ruurd Idenburg ru...@idenburg.net:

  René
 Done

 Ruurd

 On 8-7-2015 16:12, René Jansen wrote:

 Hi Ruurd,

  the problem with this is, that the rexxla user now cannot access the
 files, as they now all are owned by root. So the builld fails.

  If you do something like chown -R rexxla:rexxla *
 it should work again; alternatively, a make clean should help. I hope this
 leaves the ‘brand’ in place.

  Can you try?

  René.


   On 8 jul. 2015, at 15:32, Ruurd Idenburg  ru...@idenburg.net
 ru...@idenburg.net wrote:

  René

 Did the following:

 cd /home/rexxla/workspace/oorexx-docs/oorexx
 sudo make brand
 sudo make install

 which seemed to work as there is now an 'oorexx' subdirectory in:

  /usr/share/publican/Common_Content/

 Ruurd

 On 8-7-2015 11:20, René Jansen wrote:

 Hi Ruurd,

  I just wanted to ask you -

  I think what is needed, is, from

  /home/rexxla/workspace/oorexx-docs

  issue the command:

  *sudo make brand*

  If that is done, the automatic build should go further than it does now.

  Many thanks in advance,

  best regards,

  René.


   On 8 jul. 2015, at 09:13, Ruurd Idenburg ru...@idenburg.net wrote:

  René

 If I gotta do something, just let me know.

 Ruurd
 On 7-7-2015 14:33, René Jansen wrote:

 Hi Jean-Louis,

  thank you - let’s try.


  best regards,

  René.

  On 6 jul. 2015, at 23:30, Jean-Louis Faucher  jfaucher...@gmail.com
 jfaucher...@gmail.com wrote:

  René
  The sudo is needed because the oorexx brand is copied to
 /usr/share/publican/Common_Content.
 The installation of the oorexx brand could be done immediatly after the
 installation of Publican. At that moment, using sudo should not be a
 problem (manual installation by an administrator).

  When the doc is built, there is no attempt to build  install the brand
 : the directory oorexx is not listed in SUBDIRS.
 This procedure is not ideal in case of update of the oorexx brand. But
 that happens rarely.

 Jean Louis

 2015-07-06 13:11 GMT+02:00 René Jansen  rvjan...@xs4all.nl
 rvjan...@xs4all.nl:

 Jean-Louis, Erich,

  I was wondering why there is a sudo in the makefile for the doc build.
 After seeing the build fail more than often on the raspberry, I have moved
 it to a larger machine (thanks, Ruurd!); which build oorexx in a jiffy, so
 I have good hopes for the documentation. If that works, I can start moving
 the books to oorexx.org automatically.

  Now building the ‘brand’ seems to need a sudo, and I don’t sudo on
 other people’s machines. Does either of you know why this is and if it is
 avoidable? (And if yes, could you check that in ;-) ?

  best regards,

  René.




 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.

 https://www.gigenetcloud.com/___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud 
 Today.https://www.gigenetcloud.com/



 ___
 Oorexx-devel mailing 
 listOorexx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/oorexx-devel



 --
 Ruurd Idenburg


 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.

 https://www.gigenetcloud.com/___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud 
 Today.https://www.gigenetcloud.com

Re: [Oorexx-devel] oorexx doc build

2015-07-06 Thread Jean-Louis Faucher
René
The sudo is needed because the oorexx brand is copied to
/usr/share/publican/Common_Content.
The installation of the oorexx brand could be done immediatly after the
installation of Publican. At that moment, using sudo should not be a
problem (manual installation by an administrator).

When the doc is built, there is no attempt to build  install the brand :
the directory oorexx is not listed in SUBDIRS.
This procedure is not ideal in case of update of the oorexx brand. But that
happens rarely.

Jean Louis

2015-07-06 13:11 GMT+02:00 René Jansen rvjan...@xs4all.nl:

 Jean-Louis, Erich,

 I was wondering why there is a sudo in the makefile for the doc build.
 After seeing the build fail more than often on the raspberry, I have moved
 it to a larger machine (thanks, Ruurd!); which build oorexx in a jiffy, so
 I have good hopes for the documentation. If that works, I can start moving
 the books to oorexx.org automatically.

 Now building the ‘brand’ seems to need a sudo, and I don’t sudo on other
 people’s machines. Does either of you know why this is and if it is
 avoidable? (And if yes, could you check that in ;-) ?

 best regards,

 René.






 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] @Erich : do you have rexxref/en-US/directoryclassmethods.xml ?

2015-07-05 Thread Jean-Louis Faucher
Erich

The file rexxref/en-US/directoryclassmethods.xml is not found when building
the doc.
Do you have it in local ?

Jean-Louis
--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Current rail-diagrams in ooRexx 5.0 docs wrong

2015-06-16 Thread Jean-Louis Faucher
The graphical syntax diagrams were generated by parsing the ascii syntax
diagrams
and generating a DITA representation.
http://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/syntaxdiagram.html

Since the ascii syntax diagrams have been removed, this approach is no
longer
possible. Editing the DITA representation manually would be too tedious.
It should be possible to generate a DITA representation from an ebnf file,
but I lack of motivation to work on that.

The tool is here :
http://svn.code.sf.net/p/oorexx/code-0/incubator/DocMusings

Example of DITA representation :
railroad/declarations.xml

The tool which generates the SVG from the DITA representation :
railroad/syntaxdiagram2svg/
Adapted from a DITA plugin, this is a mix of XSLT, JavaScript and CSS.
Regarding the graphical notation, I have no idea if it would be easy to
remove the arrows.

Jean-Louis


2015-06-16 17:36 GMT+02:00 Rony G. Flatscher rony.flatsc...@wu.ac.at:

 Hi Chip,

 AFAIK Jean-Louis was able to define most, if not all aspects of rendering
 to graphical rail
 diagrams, be it stroke intensities, arrows, fonts and the like. Hoping,
 that Jean-Louis can shed
 some light about the infrastructure he has used and his assessment how
 difficult/easy it is to set
 up the environment for creating grammatically, nice looking svg graphics.

 ---rony

 P.S.: One remark ad renderings and correctness: in JLF's rendering the
 semi-colon could (should?) be
 defined to be the default value and optional.


 On 15.06.2015 15:06, Chip Davis wrote:
  We all can agree that the existing ASCII-art rail diagrams are
  unacceptable, from both an esthetic and information-transfer
  standpoint.  We must adopt an alternative.
 
  While Jean-Louis' renderings are much better, they suffer from the
  visual clutter of unnecessary arrowheads.  The flow through a rail
  diagram is left-to-right except for a repetition of a term, which in
  ASCII-art required a back-arrow (e.g. MIN) to distinguish it from a
  default value.
 
  Erich's arrow-free diagrams accomplish this distinction with curved
  lines.  J-L's approach uses the same curved lines but inserts multiple
  arrowheads which add nothing but visual clutter.
 
  I very much prefer the clean renderings of Erich's approach because it
  has no internal arrowheads at all.  Also, it has the ability to use
  bold fonts, which is useful to denote a value taken as a constant.
 
  Regardless of the tool eventually adopted, we really must go back
  through the diagrams and verify their accuracy.  I happened to notice
  that the diagrams differ in their depictions of Overlay() and I'm not
  sure either one is totally correct.
 
  It must be noted that Erich's RexxRef5 file is only 6 Meg whereas the
  JLF RexxRef4.2 is not quite twice as large.  I doubt all those extra
  arrowheads made that much difference, but it's worth comparing the
  size of the two approaches within the same document.
 
  -Chip-
 
  On 6/14/2015 11:55 AM, Rony G. Flatscher wrote:
  The syntax rail-diagrams that currently get created are wrong in the
  areas, where there are optional arguments. The optional arguments are
  not identifiable and it is not clear what the default values would be,
  if an optional value is left out.
 
  This is probably due to a limitation in the rail-diagram tool that is
  being used, which I understand is some service on the WWW which has
  these limitations. Judging from studying the thread that David Ashley
  started (2014-07-31, 17:57)
  https://sourceforge.net/p/oorexx/mailman/message/32669824/ until the
  last post where this shortcoming was pointed out, without any further
  feedback by David Ashley:
  https://sourceforge.net/p/oorexx/mailman/message/32699294/
  (2014-08-09, 18:32, by J. Leslie Turriff).
 
  ---
 
  Not all developers may be aware, that years before that Jean-Louis has
  suggested svn-syntax-rail-diagrams to replace the (rather ugly)
  ASCII-syntax-rail-diagrams already. He not only suggested it but did
  all the necessary work and came up with beautiful PDFs and HTMLs
  renderings that include syntax rail-diagrams that are able to document
  optional arguments and default values. Unfortunately (and for no
  apparent reasons that I am aware of), years ago, his hard work was not
  picked up and put into production for the ooRexx distributions.
 
  Maybe it is worthwhile at this point of development to take a look at
  the different presentations of syntax-rail-diagrams,
 
* rendered as ASCII-snytax-rail-diagrams (just load the ooRexx 4.2.0
  rexxref.pdf from your ooRexx installation),
* the current 5.0 rexxref.pdf rendering (thanks to Erich in his
  svn-sandbox, 'sandbox/erich/docs/build' which one gets when
  checking out the ooRexx project with svn) at
  
 https://sourceforge.net/p/oorexx/code-0/HEAD/tarball?path=/sandbox/erich/docs/build
 
  named rexxref5.pdf and
* the ooRexx 4.2.0 rexxref.pdf by Jean-Louis at
  
 

Re: [Oorexx-devel] Recent 5.0.0 windows build (x86_32)

2015-05-26 Thread Jean-Louis Faucher
Rick, thanks.
Indeed, I installed only Visual Studio Community 2013, without additional
sdk.
This version is installed by default with several sdk (from  v7.0A to
v8.1A), and I found the file AgtCtl_i.c in the directory 'include' of the
sdk v7.1A. I will modify the include path to make it visible.

Jean-Louis

2015-05-27 0:08 GMT+02:00 Rick McGuire object.r...@gmail.com:

 Jean-Louis, you need to install the Windows 7 SDK (download here:
 http://www.microsoft.com/en-us/download/details.aspx?id=3138) and make
 sure the sdk include directory is also added to the include path.  My setup
 batch file I posted earlier includes that setup step, but you need the sdk
 installed.

 Rick

 On Tue, May 26, 2015 at 5:37 PM, Jean-Louis Faucher jfaucher...@gmail.com
  wrote:

 Jon
 Should compile now (tested under MacOs).

 You may have another problem when compiling
 extensions/platform/windows/ole.
 The fie AgtCtl_i.c is no longer delivered by Microsoft in the recent
 versions of Visual C++.
 If you have the problem, then you can copy the attached file in the
 directory 'ole' (not to commit in svn, this is a temporary workaround).
 Copied from an old version of Visual C++.

 I have seen a similar file in the public domain here :

 https://github.com/martell/i686-w64-mingw32/blob/master/i686-w64-mingw32/libsrc/agtctl_i.c
 Not tested, and not sure that this file could be committed in our svn
 repository.

 Jean Louis


 2015-05-26 19:55 GMT+02:00 Jon Wolfers sahana...@gmail.com:

 OK.  I have run CMake and NMake, but the build bombs out in
 objectclass.cpp(1773) where it could not choose a suitable overload for the
 reportException call.

 Erich, this looks like your change 10916  for setMethod exception
 reporting.  Do you need help with this?

 Jon

 On 26 May 2015 at 16:02, Rick McGuire object.r...@gmail.com wrote:

 Jon, no.  When you do the checkout, all the rest of the stuff prior to
 the last directory level is stripped off.  So assuming your checkout was
 done in similar fashion, then your source location would just be
 c:\oorexx\svn

 Rick

 On Tue, May 26, 2015 at 10:55 AM, Jon Wolfers sahana...@gmail.com
 wrote:

 Hi Rick,

 this is good stuff.  When you tell cmake where the checked out source
 is, where in the SVN tree do you point?

 Does this look right If I have my working copy in c:\ooRexx\svn?

 C:\oorexx\svn\code-0\main\trunk

 thanks

 Jon

 On 26 May 2015 at 15:15, Rick McGuire object.r...@gmail.com wrote:

 A small correction to the above.  I just double checked, and I am not
 using an installed NSIS version after all.  It is sufficient to down load
 the .zip file and unzip it into a directory.

 Rick

 On Tue, May 26, 2015 at 10:08 AM, Rick McGuire object.r...@gmail.com
  wrote:



 On Tue, May 26, 2015 at 9:26 AM, Erich Steinböck 
 erich.steinbo...@gmail.com wrote:

 can anyone lead me through building for Windows

 I'd also be very much interested in how to build the interpreter

 How much from scratch?  What do you have installed already (svn,
 cmake, visual studio of some flavor, nsis, etc.)?

 Until now I've just installed SVN


 Well, you will need to install some version of visual C++ (I
 recommend a recent version),  One of the free express downloads is
 sufficient.  You will also need Cmake (min 2.8.3 version).  Optionally, 
 you
 need a working Xerces install (although I suspect eventually you will 
 want
 to have this).  If you build the installer, you will need to also 
 install
 NSIS.  The downloads required for this can be found here:
 http://sourceforge.net/projects/oorexx/files/windows-build-tools/1.0/

 Important note:  When we switched to the CMake build, there's some
 stuff inside of CMake that looks for an installed version of NSIS.  I 
 found
 it necessary to download an NSIS install, then overlay that install with
 the files from the downloaded zip file.  This is a special NSIS version
 that includes support for long environment strings.

 I used the following simple batch file to setup my build environment
 in a command window where I'm doing work.

 set TEST_DIR=C:\ORexxDev\testset SRC_DRV=C:set 
 BLD_DIR=\OrexxDev\builds\%1set REXX_BUILD_HOME=%SRC_DRV%%BLD_DIR%set 
 REXX_HOME=%SRC_DRV%%BLD_DIR%set EDITOR=notepad.execall C:\Program 
 Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat x64set 
 INCLUDE=%INCLUDE%;c:\Program Files (x86)\Microsoft 
 SDKs\Windows\v7.1A\include;path 
 c:\NSIS;%REXX_BUILD_HOME%\bin;%PATH%;c:\Xalan\bin;c:\Xerces\bin;%TEST_DIR%;%TEST_DIR%\framework;cd
  %BLD_DIR%



 The argument to the batch file is the location of a particular
 build.  The build target will know the source location you work working
 with (more on this later).  This adds the build bin directory to the 
 path,
 as well as setting up path access to all of the needed build tools.  
 This
 version assumes the 64-bit build.  To build in 32-bits, remove the x64 
 from
 the vcvarsall batch file call.

 Once you have all of the tools installed, you can build with the
 following steps

[Oorexx-devel] Using Publican under MacOs

2015-05-25 Thread Jean-Louis Faucher
Some notes about Publican under MacOs, and a question for Erich at the end
of the mail.

According to my tests, Publican 4.2  4.3 is not producing good results
under MacOs.
I use Publican 4.1.3 which works good.

The pdf files look similar to a pdf that I downloaded a few month ago from
the build machine.
I have no html from the build machine to compare with.
The railroads in the html files are truncated. Is it the same when built on
other platforms ?

The documents not covered by the main makefile are built ok using their
local makefile :
buildmachine (doc not finished)
ooconsole (doc not finished)
ootest (doc not finished)
rexxgtk

The ooRexx Makefile for brand contains a hardcoded path
/usr/share/publican/Common_Content.
Under MacOs, the path is /opt/local/share/publican/Common_Content.

My locale under MacOs is french. To have english output from these commands
:
date +%A, %B %d, %Y  datepub.tmp
svnversion  svnrev.tmp
must do that :
LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 make

oodialog is too big for the memory settings suggested by the Publican
users' guide.
I use :
echo FOP_OPTS='-Xms50m -Xmx1024m'  ~/.foprc

Because of this error :
SEVERE: Couldn't find hyphenation pattern for lang=en
I installed fop-hyph.jar from http://sourceforge.net/projects/offo.
but the automatic hyphenation makes a bad break in the middle of the pdf
title :
ooRexx Docu-
mentation 5.0.0
Apparently, this extension was not installed on the build machine, the
title was :
ooRexx
Documentation 5.0.0

@Erich
Got those warnings when building rexxref. Do you have these files in local ?
WARNING: Image missing: tmp/en-US/xml/images/keywords/parse_upper_arg.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/do_repetitor.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/do_conditional.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/do_repetitor.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/do_conditional.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/parse_value.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/select2.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/select3.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/select4.svg
WARNING: Image missing: tmp/en-US/xml/images/keywords/trace.svg

Jean-Louis
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] doc ooRexx brand : directory 'publish' in SVN, needed ?

2015-05-25 Thread Jean-Louis Faucher
Publican ooRexx brand :
I made a change in en-US/Notices.xml, committed to svn
The same change has been propagated to the the file
publish/oorexx/en-US/Notices.xml by make. This file has now the svn status
'modified'.
Do we need the directory 'publish' in svn ? Seems to be a generated
directory.

Jean-Louis
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] [Announce] Welcome Erich Steinbock as a committer on the ooRexx project.

2015-04-27 Thread Jean-Louis Faucher
Congratulations Erich !
and welcome.
Jean-Louis

2015-04-27 23:02 GMT+02:00 Jon Wolfers sahana...@gmail.com:

 Erich has been working consistently on the documentation and testing side
 of the project.
 The Committers and the RexxLa have invited him to become a committer and
 I'm very happy to say that he has accepted.

 Please welcome him.

 Jon


 --
 One dashboard for servers and applications across Physical-Virtual-Cloud
 Widest out-of-the-box monitoring support with 50+ applications
 Performance metrics, stats and reports that give you Actionable Insights
 Deep dive visibility with transaction tracing using APM Insight.
 http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] ExpressionOperator.cpp : is it possible to catch an exception during the evaluation of operator ?

2013-10-04 Thread Jean-Louis Faucher
ExpressionOperator.cpp
Is it possible to catch an exception during the evaluation of operator, and
try something else with the same arguments ?

According to my tests, surrounding by catch/try is not enough.
The evaluation stack is probably in a bad state in the catch{}, I don't
know how to bring it back to a good state.
I tried to do like the catch in RexxActivation::run, but without success
(unwindToFrame and stack.clear).

The something else is an alternate way to find a candidate
implementation, where the dispatching is not limited to the first argument.

Thanks.
Jean-Louis


RexxObject *RexxBinaryOperator::evaluate(
RexxActivation  *context,  /* current activation context
*/
RexxExpressionStack *stack )   /* evaluation stack
*/
/**/
/* Function:  Execute a REXX binary
operator  */
/**/
{
/* evaluate the target   */
RexxObject *left = this-left_term-evaluate(context, stack);
/* evaluate the right term   */
RexxObject *right = this-right_term-evaluate(context, stack);
*try
{
*/* evaluate the message  */
RexxObject *result = callOperatorMethod(left, this-oper, right);
/* replace top two stack elements*/
stack-operatorResult(result);   /* with this
one */
 /* trace if
necessary*/
context-traceOperator(operatorName(), result);
return result;   /* return the
result */
*}
catch (RexxActivation *t)
{
// try something else with the same arguments left and right
}
*}
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] ExpressionOperator.cpp : is it possible to catch an exception during the evaluation of operator ?

2013-10-04 Thread Jean-Louis Faucher
ok, thanks.


2013/10/4 Rick McGuire object.r...@gmail.com

 This is seriously not going to work.  The code that handles the raising of
 the exception changes an awful lot of the internal state of the
 interpreter.

 Rick


 On Fri, Oct 4, 2013 at 7:59 AM, Jean-Louis Faucher 
 jfaucher...@gmail.comwrote:

 ExpressionOperator.cpp
 Is it possible to catch an exception during the evaluation of operator,
 and try something else with the same arguments ?

 According to my tests, surrounding by catch/try is not enough.
 The evaluation stack is probably in a bad state in the catch{}, I don't
 know how to bring it back to a good state.
 I tried to do like the catch in RexxActivation::run, but without success
 (unwindToFrame and stack.clear).

 The something else is an alternate way to find a candidate
 implementation, where the dispatching is not limited to the first argument.

 Thanks.
 Jean-Louis


 RexxObject *RexxBinaryOperator::evaluate(
 RexxActivation  *context,  /* current activation
 context*/
 RexxExpressionStack *stack )   /* evaluation
 stack  */

 /**/
 /* Function:  Execute a REXX binary
 operator  */

 /**/
 {
 /* evaluate the target   */
 RexxObject *left = this-left_term-evaluate(context, stack);
 /* evaluate the right term   */
 RexxObject *right = this-right_term-evaluate(context, stack);
 *try
 {
 */* evaluate the message  */
 RexxObject *result = callOperatorMethod(left, this-oper, right);
 /* replace top two stack elements*/
 stack-operatorResult(result);   /* with this
 one */
  /* trace if
 necessary*/
 context-traceOperator(operatorName(), result);
 return result;   /* return the
 result */
 *}
 catch (RexxActivation *t)
 {
 // try something else with the same arguments left and right
 }
 *}



 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 

 http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
 from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] What is needed to get Unicode support from/with ooRexx ?

2013-03-13 Thread Jean-Louis Faucher
Hi Rony,

I would say : That depends on your needs... Do you have some use cases in
mind ?

If you want the existing methods of the native String class support
Unicode, then you have to modify the internal representation of the strings
:
disruptive (for C++ API and external libraries) but good performance : use
wide char format utf-16 or utf-32.
conservative (for C++ API and external libraries) but less good perf : use
utf-8.
But once you have that, not sure you made a big progress towards Unicode...

If you want access to the character properties, support locales (date
format, number format, ...), Unicode in regex, transliteration, etc... then
you need a library like ICU, or Java through bsf4oorex (but you know that
already :-).
No need to make the interpreter kernel dependent on ICU (unless you want
that) : one or several wrapper classes will be enough. Now, if you want all
these services natively supported by the kernel, then the class String will
be adapted, and new classes probably added, and the C++ API adapted.

If you want a GUI which is Unicode-enabled :
- if you are user of ooDialog, then you have to compile oodialog in
wide-char mode, and convert to/from utf-16 at the boundaries (except if you
have an ooRexx kernel with native support for utf-16).
- if you are user of Java GUI, then you have already solved the problem
with bsf4oorexx (I think you manage the conversion from/to utf-16, right ?)
- Other GUI exist, but I can't tell a lot. Gtk+ uses utf-8, QT supports
Unicode but can't tell more.

Can't tell for sqlite, except what I read in the FAQ (ICU optionally
supported for case-insensitive comparisons, they don't want to bloat sqlite
by default).

Personally, I don't need (currently) Unicode. But if I wanted to work on a
concrete subject, I would probably work on wrapper classes for ICU, for
learning purpose.

Jean-Louis



2013/3/13 Rony G. Flatscher rony.flatsc...@wu.ac.at

 Subject says it all.

 ---rony



 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_mar
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] What is needed to get Unicode support from/with ooRexx ?

2013-03-13 Thread Jean-Louis Faucher
2013/3/13 Rony G. Flatscher rony.flatsc...@wu.ac.at


 I would say : That depends on your needs... Do you have some use cases in
 mind ?

 Well, thinking about working on Unicode encoded (XML) files and finally
 getting the ability to have all glyphs available that are needed for
 European information systems, which also means interfacing with databases
 that are encoding in Unicode.


The favorite encoding for XML is utf-8.
For me, no need of special support by ooRexx, if your goal is to read the
strings as-is and pass them to the database API (except changing the
encoding, if utf-8 not supported by the database API).
 all glyphs available : for display, I suppose ? because otherwise, I
don't see a problem here.


 No need to make the interpreter kernel dependent on ICU (unless you want
 that) : one or several wrapper classes will be enough. Now, if you want all
 these services natively supported by the kernel, then the class String will
 be adapted, and new classes probably added, and the C++ API adapted.

 Probably that is what I would be really after.

 Would you have any estimates about the size (code-wise, time-wise) of such
 an endeavor by any chance, knowing that you have a lot of experience in
 Unicode?



Sorry Rony, I have no experience of ICU... so no idea :-)

ICU is large, but no need to wrap everything. Some services taken from the
user guide :
Unicode character properties
Unicode normalization
Code page conversion (encoding)
Locale (language + region)
Transliteration
Date and time
Formatting
Searching and sorting (collation)
Text analysis (positions of words, sentences, paragraphs, line wrapping,
regular expressions)
Text layout (bidi : left to right, right to left)
...



 Well, the challenge is to use plain ooRexx and create the needed UTF on
 all operating systems from ooRexx' strings.

 On Linux it is even mandatory, if one wishes to automate/remote-control
 Linux (as can be done on Windows using OLE), taking advantage of the widely
 unknown DBus transport service when sending strings as arguments as I
 learned while creating an external ooRexx library to support it.

 Again BSF4ooRexx can (and in the case of DBus effectively) serves as a
 fallback here.


So I understand that the main need is to convert from the system default
encoding to utf-8... And vice-versa.
ICU probably not needed here... Each platform supported by ooRexx should
have services to do that (Windows and Linux : yes. Others ? I don't know).
But that would be the opportunity to analyze in depth the ICU services for
code page conversion.


Jean-Louis
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Test OS X build for me

2012-07-29 Thread Jean-Louis Faucher
Hi Mark

The build is ok under Mac OS X 10.6.8.

Output of test4.rex, using the SysFileTreeB from root directory :
Collecting SysFileTree information
Collection complete, 2563302 stem variables.
Problem #3405740 didn't occur.

Jean-Louis


2012/7/29 Mark Miesfeld miesf...@gmail.com

 Hi Bruce or Jean-Louis

 Could you test the RexxUtil build for me on OS X when one of you gets the
 chance.

 I have a trunk tree in my sandbox at

 https://oorexx.svn.sourceforge.net/svnroot/oorexx/sandbox/mark/trunk.work

 The only change is in rexxutil.cpp, so you could either check out that
 tree and build, or grab just:

 extensions\rexxutil\platform\unix\rexxutil.cpp

 from that tree, drop it in your trunk tree, and build.

 It builds fine in Linux, I just want to make sure there's no problem under
 OS X

 Thanks in advance.  There's no rush, whenever it might be convenient.

 Oh, Bruce you said you could get a crash with SysFileTree() before.  You
 could also see if that crash is fixed.  I have a new implementation for
 SysFileTree.  Right now there is a SysFileTree() and a SysFileTreeB() in
 the RexxUtil above.  SysFileTreeB() is the new implementation.  If you
 could test that SysFileTree() still gives you a crash and see if the same
 test using SysFileTreeB() passes or not - that'd be cool.

 --
 Mark Miesfeld


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Try building ooSQLite on Mac ?

2012-06-16 Thread Jean-Louis Faucher
Hi Bruce

Thanks for the makefile !

I had to do these changes in Makefile.mac :
1) disable readline, seems I don't have it by default (link error)
2) add $(SO_LFLAGS) on the line which builds liboosqlite.dylib (otherwise
link error)
3) replace .so by .dylib everywhere (otherwise library not found by oorexx)

Now it works for me...
Let me know if i have to commit.

Jean-Louis

2012/6/8 Mark Miesfeld miesf...@gmail.com

 On Fri, Jun 8, 2012 at 12:12 PM, CVBruce cvbr...@gmail.com wrote:
  I'll give it a go.

 Thanks Bruce.

 --
 Mark Miesfeld


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Try building ooSQLite on Mac ?

2012-06-16 Thread Jean-Louis Faucher


 If it works, check it in.  Bruce can always adjust it if he has to and
 we could talk about what the final version should be.  Other than the
 readline issue, once it is working it should work on all the current
 Macs shouldn't it?


Ok, I will commit 2) and 3) and keep the readline activated.
I'm using Mac OS X 10.6.8
Can't tell for the Mac OS X Lion, but no reason it doesn't work.

Jean-Louis
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Fwd: Rainer are you still around?

2012-06-14 Thread Jean-Louis Faucher
About the three failures TEST_MANY_CHARS.
I have them under windows, when running the test from an USB drive.
http://sourceforge.net/mailarchive/message.php?msg_id=26103047

Seems 200Mb is too big, and it remains around 42Mb not written... Disk full
?

Jean-Louis

2012/6/14 Mark Miesfeld miesf...@gmail.com

 Hi,

 I meant this to go to the dev list, not straight to Rainer.

 --
 Mark Miesfeld


 -- Forwarded message --
 From: Mark Miesfeld miesf...@gmail.com
 Date: Thu, Jun 14, 2012 at 8:10 AM
 Subject: Re: [Oorexx-devel] Rainer are you still around?
 To: Rainer Tammer tam...@tammer.net


 On Wed, Jun 13, 2012 at 11:11 PM, Rainer Tammer tam...@tammer.net wrote:

 Hi Rainer,

 First off, thanks a lot for doing this when your are so busy.  Please
 don't feel any pressure to build the package until you have the time
 for it.

  any ideas before I start the real AIX builds??

 My idea is that 4.1.1 has been released, so just use the release code
 in your build.  If you persistently get errors running the test suite,
 you can open a bug.

 Having said that, I bet that this test failure is transient:

 [failure] [20120612 09:32:34.659518]
  svn:r6418   Change date: 2010-11-30 14:26:10 +0100
  Test:   TEST_9
  Class:  TIME.long.testGroup
  File:
 /daten/source/ooRexx_4_1_1/test/4.1.0/ooRexx/base/bif/TIME.testGroup
  Line:   1984
  Failed: assertTrue
Expected: [1]
Actual:   [[0], identityHash=100801275]
Message:  cb3a should be greater than or equal to 5, cb3a is: 4.999197

 In other words if you run the test several times you won't see the
 failure every time.  I  don't think it indicates a bug in the
 interpreter code.  I think it reflects that you can not expect the
 system clock to produce sub-millisecond accuracy in user space.

 That leaves the 3 CHAR test failures.  I don't see those failures on
 Windows and I didn't see them on the several Linux systems I ran the
 test suite on at the time of the release.

 Here's Windows with a download of the 4.1.1 release:

 ooTest Framework - Automated Test of the ooRexx Interpreter


 Interpreter: REXX-ooRexx_4.1.1(MT) 6.03 16 May 2012
 Addressing Mode: 64
 ooRexxUnit:  2.0.0_3.2.0ooTest: 1.0.0_4.0.0

 Tests ran:   19257
 Assertions:  576586
 Failures:1
 Errors:  0
 Skipped files:   1

 [failure] [20120614 07:40:07.582000]
  svn:r3541   Change date: 2008-10-14 16:31:57 -0700
  Test:   TEST_READRECORDS05
  Class:  WindowsEventLog.testGroup
  File:
 C:\work.ooRexx\...\platform\windows\rxwinsys\WindowsEventLog.testGroup
  Line:   524
  Failed: assertSame
Expected: [[57413], identityHash=1099388258186]
Actual:   [[57412], identityHash=1099388258194]

 File search:00:00:13.822000
 Suite construction: 00:00:01.95
 Test execution: 00:10:05.236000
 Total time: 00:10:29.321000

 The one failure shows that between the time the record events log was
 filled and the time of the second asset, 1 record was added to the
 event log.  This is not unusual on a busy system and is perhaps a flaw
 in the test case, certainly not a bug in the interpreter or the
 extension..

 I don't have a Linux system handy to re-test on right now.  But, I
 didn't see those failures at the time of the release.

 So - I say build the AIX package with the release code.  Open a bug if
 the test suite continues to fail on the CHAR tests.

 Just be sure you are using the actual release source:

 https://oorexx.svn.sourceforge.net/svnroot/oorexx/main/releases/4.1.1/trunk

 Thanks again for building the AIX packages Rainer

 --
 Mark Miesfeld


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] ActivityManager::getRootActivity and suspension of old activity

2012-04-15 Thread Jean-Louis Faucher
ok, thanks.
Then I will see with Rony.

Jean-Louis

Le 15 avril 2012 14:09, Rick McGuire object.r...@gmail.com a écrit :



 On Sunday, April 15, 2012, Jean-Louis Faucher wrote:

  What is the purpose of this code in getRootActivity ?

 // Do we have a nested interpreter call occurring on the same
 thread?  We need to
 // mark the old activity as suspended, and chain this to the new
 activity.
 if (oldActivity != OREF_NULL)
 {
 oldActivity-setSuspended(true);
 // this pushes this down the stack.
 activityObject-setNestedActivity(oldActivity);
 }


 I meet this case with ooRexxShell where BSF.cls is loaded.
 One remark : I load BSF.cls to make it available from the command line,
 but there is no dependency on it.
 Other remark : There is no reply in ooRexxShell, so everything runs in
 one thread.

 The executable section of BSF.cls calls CreateRexxInterpreter, which
 calls getRootActivity. This is done from the current thread running
 ooRexxShell.

 A new activity is created for the same thread, the old activity is
 suspended (just a flag set to true), but it continues to execute and
 everything works fine, except one thing : the calls to GCI registered
 routines no longer works (I use them to change console colors). This is
 because the variable pool is enabled for the old activity, but not for the
 new activity which is found by ActivityManager::findActivity from the
 current thread id.

 Call stack showing the problem :
 rexx.dll!ActivityManager::findActivity
 threadId = 57972
 listIndex = 1 -- activity = 0x7f69bea8
 rexx.dll!ActivityManager::findActivity
 rexx.dll!ActivityManager::getActivity
 rexx.dll!NativeContextBlock::NativeContextBlock
 rexx.dll!RexxVariablePool
 gci.dll!readRexx
 gci.dll!GCI_readNewRexx
 gci.dll!loadStem
 gci.dll!GCI_execute
 gci.dll!_GciDispatcher
 rexx.dll!RexxNativeActivation::callRegisteredRoutine
 rexx.dll!RegisteredRoutine::call
 activity = 0x7eee5fa0 (old activity)
 JLF : threadId = 57972

 As explained above, the activity 0x7eee5fa0 has been suspended by
 getRootActivity when BSF.cls was loaded, but the ooRexx code continues to
 execute with this activity. And the variable pool is enabled for it.

 For the moment, I don't know where to investigate... Is it a bad use of
 CreateRexxInterpreter ? or is it a problem with the interpreter (running a
 suspended activity) ?

 Definitely a bad use of CtreateInterpreter.  This creates a new active
 instance on the thread, which pushes down the instance that
 RexxVariablePool needs to interact with.

 Rick


 Jean-Louis



 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?

2012-04-01 Thread Jean-Louis Faucher
ok, I will use a queue to pass infos from the external called routine.
For the test of RC in case of syntax error, I will add it in
RESULT_RC_SIGL.testGroup (if not already tested, did not analyze in
details).

Thanks.

Jean-Louis

Le 1 avril 2012 15:37, Rick McGuire object.r...@gmail.com a écrit :

 This seems reasonable.  If the called program has multiple assertions,
 perhaps it could push a message onto the queue giving a failure
 reason.  The calling test driver could then pull that message and use
 it in a failure assertion.

 This method also has the side benefit of testing the ability to pass
 back a return code.  While you're doing this, it might be a good idea
 to include a test of using the rexx command on a file that raises a
 syntax error to make sure the syntax error code shows up as the return
 code.

 Rick

 On Sun, Apr 1, 2012 at 3:30 AM, Jean-Louis Faucher
 jfaucher...@gmail.com wrote:
  Commit done for the size of rxcargs.
 
  I wanted to add a few tests for syscargs, but I'm not sure of the best
 way
  to do that... I need to call an external routine, but I can't use the
 assert
  from this external routine (right ?).
  What i'm thinking to do :
  Create a file syscargs_test0.rex to test the case 0 args, do the test I
 want
  and returns 1 if ok, 0 otherwise. Call this file from a testgroup, assert
  RC==1.
  Idem for the case 1 arg, etc...
 
  I will do that this evening, unless a better approach is possible ?.
 
  Jean-Louis
 
  Le 26 mars 2012 01:40, Jean-Louis Faucher jfaucher...@gmail.com a
 écrit :
 
  Commit done, but I see that this declaration
  rxcargs = pgmThrdInst-NewArray(1);
  could also be declared with the right size, as done in rexxhide.
 
  Several files to fix, nothing urgent, I will do that next WE.
 
  Jean-Louis
 
  2012/3/26 Jean-Louis Faucher jfaucher...@gmail.com
 
  Hi Mark
 
  Ok, I will fix trunk by using the same style of code than Windows, i.e.
  size 0 or 1.
 
  Jean-Louis
 
 
  2012/3/26 Mark Miesfeld miesf...@gmail.com
 
  Hi Jean-Louis,
 
  I saw your commit and realized that the unix version of rexx is
  probably still broken.  I checked and it is.
 
  You're correct in that the argument array must be of size 0 if there
 are
  no arguments.  I personally perfer to create the array the correct
 size, as
  is done in the Windows version of rexx, rather than create it and
 then have
  to expand it.  But, your fix in your sandbox is prefectly fine also.
 
  I'd say go ahead and fix trunk now.
 
  --
  Mark Miesfeld
 
  On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher
  jfaucher...@gmail.com wrote:
 
  Hi
 
  Tiny fix for unix, works for me.
  Will apply it in trunk, unless David wants to fix differently.
 
  Jean-Louis
 
  -- Forwarded message --
  From: jfauc...@users.sourceforge.net
  Date: 2012/3/26
  Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699]
  sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp
  To: oorexx-...@lists.sourceforge.net
 
 
  Revision: 7699
   http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev
  Author:   jfaucher
  Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012)
  Log Message:
  ---
  arg()==1 when no arg : fixed by declaring an array of size 0
 
  Modified Paths:
  --
 sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 
  Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
  ===
  --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
  2012-03-25 20:46:25 UTC (rev 7698)
  +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
  2012-03-25 22:27:58 UTC (rev 7699)
  @@ -143,7 +143,8 @@
  else {
  RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL);
  // configure the traditional single argument string
  -rxargs = pgmThrdInst-NewArray(1);
  +// Initial size must be zero, because in
  CallProgramDispatcher::run, size will be tested, not items
  +rxargs = pgmThrdInst-NewArray(0); // Will be extended if
  needed
  if (argCount  0) {
  pgmThrdInst-ArrayPut(rxargs,
 
  pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1);
 
  This was sent by the SourceForge.net collaborative development
  platform, the world's largest Open Source development site.
 
 
 
 
 --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  Oorexx-svn mailing list
  oorexx-...@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-svn
 
 
 
 
 --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  Oorexx-devel mailing list
  Oorexx-devel

[Oorexx-devel] Fwd: [Oorexx-svn] SF.net SVN: oorexx:[7716] docs/trunk/oodguide/Chapter06.xml

2012-03-31 Thread Jean-Louis Faucher
Oliver

I had to fix that to get a pdf under cygwin, you may need the sames fixes.

Chapter02.xml
line 302 role=italic
-- add quotes : role=italic

Chapter05.xml
line 436 xref linkend=chap05-defimage
-- close the tag : xref linkend=chap05-defimage/

Chapter06.xml
line 471 : endterm=offsetting.title
-- reference to non-existent ID OFFSETTING.TITLE


Jean-Louis

-- Message transféré --
De : os...@users.sourceforge.net
Date : 31 mars 2012 17:39
Objet : [Oorexx-svn] SF.net SVN: oorexx:[7716]
docs/trunk/oodguide/Chapter06.xml
À : oorexx-...@lists.sourceforge.net


Revision: 7716
 http://oorexx.svn.sourceforge.net/oorexx/?rev=7716view=rev
Author:   osims
Date: 2012-03-31 15:39:00 + (Sat, 31 Mar 2012)
Log Message:
---
Chapter 6 finished (except for any cleanup after seeing the PDF).

Modified Paths:
--
   docs/trunk/oodguide/Chapter06.xml

Modified: docs/trunk/oodguide/Chapter06.xml
===
--- docs/trunk/oodguide/Chapter06.xml   2012-03-31 10:48:45 UTC (rev 7715)
+++ docs/trunk/oodguide/Chapter06.xml   2012-03-31 15:39:00 UTC (rev 7716)
@@ -330,7 +330,7 @@
by double-clicking an icon in the Order Management window is discussed.
  /para

-section id=chap06-popups-starttitleStarting a Popup Dialog/title
 !-- Section 6.2.2 --
+section id=chap06-popups-starttitleStarting a Popup Dialog/title
 !-- Section 6.2.1 --

indextermprimaryPopups/primarysecondaryParents/secondary/indexterm

indextermprimaryParents/primarysecondaryPopups/secondary/indexterm
  paraIn previous chapters, dialogs have been started using the statement
@@ -357,9 +357,8 @@
argument for emphasis
role=italic~popupAsChild(parentDlg)/emphasis is the parent
dialog./para
  /listitem
/itemizedlist
-!-- if startupcustomerlist, if open a customer, then close list, cust
also closes. But if use startup, it doesn't. --
-
 
indextermprimaryPopups/primarysecondaryPopupAsChild/secondary/indexterm
-  indextermprimaryPopupAsChild/primary/indexterm
+
 
indextermprimaryPopups/primarysecondaryPopupAsChild/secondary/indexterm
+indextermprimaryPopupAsChild/primary/indexterm
  /para
  para
It is the latter - emphasis role=italic~popupAsChild/emphasis -
@@ -501,38 +500,32 @@
/para
  /section  !-- End of Section 6.2.2 --

-  section id=chap06-popups-interprettitleUse of Interpret/title
 !-- Section 6.2.3 --
+  section id=chap06-popups-interprettitle id=interpret.titleUse of
Interpret/title  !-- Section 6.2.3 --
paraWhen an icon in the Order Management dialog is double-clicked, a
child dialog is surfaced.
-  This is handled by two methods in the
computeroutputOrderMgrView/computeroutput class.
-  First, the event-handling method emphasisonDoubleClick/emphasis
catches the double-click,
-  works out which icon (or record - see xref
linkend=chap06-lviews/ below) was double-clicked,
-  and then calls the emphasis role=italicshowModel/emphasis
method.
-  This method uses an
-  emphasis role=italicinterpret/emphasis instruction to launch a
view of the
-  component represented by chosen icon, as follows:
-  programlisting
+  This is handled by two methods in the
computeroutputOrderMgrView/computeroutput class.
+  First, the event-handling method
emphasisonDoubleClick/emphasis catches the
+  double-click, works out which icon (or record - see xref
linkend=chap06-lviews/
+  below) was double-clicked, and then calls the emphasis
role=italicshowModel/emphasis
+  method. This method uses an emphasis
role=italicinterpret/emphasis instruction to
+  launch a view of the component represented by chosen icon, as
follows: programlisting
  ![CDATA[
use arg record
className = record~ID
viewClassName = className||View
interpret .||viewClassName||~newInstance(self)
  ]]
-  /programlisting
-  Thus in principle icons for additional components can be added
-  without changing the code. An arguably better approach could have
been to hold the
-  class object in the record, and to invoke
-  emphasis role=italicnewInstance/emphasis directly on the class
object.
-  However, in the next exercise, the mechanics of invoking the various
components will be moved
-  to a support class called
computeroutputObjectMgr/computeroutput, where use of
-  emphasisinterpret/emphasis will not be optional.
-/para
-para
-  Finally, a separate file -
computeroutputRequiresList.rex/computeroutput - is used
-  to contains the set of emphasis role=italic::requires/emphasis
statements corresponding
-  to the components that might be surfaced. This is why the first
executable statement in
-  the file computeroutputOrderMgrView.rex/computeroutput is
-  emphasis role=italiccall OrderMgr\RequiresList.rex/emphasis.
-/para
+  /programlistingThus in principle icons for additional components
can 

Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?

2012-03-25 Thread Jean-Louis Faucher
Hi Mark

Ok, I will fix trunk by using the same style of code than Windows, i.e.
size 0 or 1.

Jean-Louis

2012/3/26 Mark Miesfeld miesf...@gmail.com

 Hi Jean-Louis,

 I saw your commit and realized that the unix version of rexx is
 probably still broken.  I checked and it is.

 You're correct in that the argument array must be of size 0 if there are
 no arguments.  I personally perfer to create the array the correct size, as
 is done in the Windows version of rexx, rather than create it and then have
 to expand it.  But, your fix in your sandbox is prefectly fine also.

 I'd say go ahead and fix trunk now.

 --
 Mark Miesfeld

 On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher jfaucher...@gmail.com
  wrote:

 Hi

 Tiny fix for unix, works for me.
 Will apply it in trunk, unless David wants to fix differently.

 Jean-Louis

 -- Forwarded message --
 From: jfauc...@users.sourceforge.net
 Date: 2012/3/26
 Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699]
 sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp
 To: oorexx-...@lists.sourceforge.net


 Revision: 7699
  http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev
 Author:   jfaucher
 Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012)
 Log Message:
 ---
 arg()==1 when no arg : fixed by declaring an array of size 0

 Modified Paths:
 --
sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp

 Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 ===
 --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 2012-03-25 20:46:25 UTC (rev 7698)
 +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 2012-03-25 22:27:58 UTC (rev 7699)
 @@ -143,7 +143,8 @@
 else {
 RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL);
 // configure the traditional single argument string
 -rxargs = pgmThrdInst-NewArray(1);
 +// Initial size must be zero, because in
 CallProgramDispatcher::run, size will be tested, not items
 +rxargs = pgmThrdInst-NewArray(0); // Will be extended if needed
 if (argCount  0) {
 pgmThrdInst-ArrayPut(rxargs,

 pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1);

 This was sent by the SourceForge.net collaborative development platform,
 the world's largest Open Source development site.



 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Oorexx-svn mailing list
 oorexx-...@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-svn



 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rexx.cpp when no args under unix : ok to apply this fix in trunk ?

2012-03-25 Thread Jean-Louis Faucher
Commit done, but I see that this declaration
rxcargs = pgmThrdInst-NewArray(1);
could also be declared with the right size, as done in rexxhide.

Several files to fix, nothing urgent, I will do that next WE.

Jean-Louis

2012/3/26 Jean-Louis Faucher jfaucher...@gmail.com

 Hi Mark

 Ok, I will fix trunk by using the same style of code than Windows, i.e.
 size 0 or 1.

 Jean-Louis


 2012/3/26 Mark Miesfeld miesf...@gmail.com

 Hi Jean-Louis,

 I saw your commit and realized that the unix version of rexx is
 probably still broken.  I checked and it is.

 You're correct in that the argument array must be of size 0 if there are
 no arguments.  I personally perfer to create the array the correct size, as
 is done in the Windows version of rexx, rather than create it and then have
 to expand it.  But, your fix in your sandbox is prefectly fine also.

 I'd say go ahead and fix trunk now.

 --
 Mark Miesfeld

 On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher 
 jfaucher...@gmail.com wrote:

 Hi

 Tiny fix for unix, works for me.
 Will apply it in trunk, unless David wants to fix differently.

 Jean-Louis

 -- Forwarded message --
 From: jfauc...@users.sourceforge.net
 Date: 2012/3/26
 Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699]
 sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp
 To: oorexx-...@lists.sourceforge.net


 Revision: 7699
  http://oorexx.svn.sourceforge.net/oorexx/?rev=7699view=rev
 Author:   jfaucher
 Date: 2012-03-25 22:27:58 + (Sun, 25 Mar 2012)
 Log Message:
 ---
 arg()==1 when no arg : fixed by declaring an array of size 0

 Modified Paths:
 --
sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp

 Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 ===
 --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 2012-03-25 20:46:25 UTC (rev 7698)
 +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp
 2012-03-25 22:27:58 UTC (rev 7699)
 @@ -143,7 +143,8 @@
 else {
 RexxCreateInterpreter(pgmInst, pgmThrdInst, NULL);
 // configure the traditional single argument string
 -rxargs = pgmThrdInst-NewArray(1);
 +// Initial size must be zero, because in
 CallProgramDispatcher::run, size will be tested, not items
 +rxargs = pgmThrdInst-NewArray(0); // Will be extended if needed
 if (argCount  0) {
 pgmThrdInst-ArrayPut(rxargs,

 pgmThrdInst-NewStringFromAsciiz(arg_buffer), 1);

 This was sent by the SourceForge.net collaborative development platform,
 the world's largest Open Source development site.



 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Oorexx-svn mailing list
 oorexx-...@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-svn



 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel



--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] tests in trunk : some failures/errors

2012-03-14 Thread Jean-Louis Faucher
Hi

I have some failure/errors when runing that from main/trunk :

rexx testOORexx.rex -R ooRexx\base\bif
rexx testOORexx.rex -R ooRexx\base\class

One of the failures is for non existing file : the expected returned value
is 0 for chars or lines, but we return . A quick debug shows that the
value is taken on the condition object (defaultResult).
No time for the moment to investigate more.

An example of error :
In circularqueue.testGroup, line 168 : a2=a1~section(1)
raises Not enough arguments in method; 1 expected

Is it only me ?

Jean-Louis
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Fix for bug 3274050 missing from 4.1.1 beta

2012-02-26 Thread Jean-Louis Faucher
Rick
Looks good to me after your last commit for SysFile.cpp

rexx testOORexx.rex -s -S -R ooRexx\base\bif -f stream
Interpreter: REXX-ooRexx_4.1.1(MT) 6.03 26 Feb 2012
Addressing Mode: 32
ooRexxUnit:  2.0.0_3.2.0ooTest: 1.0.0_4.0.0

Tests ran:   43
Assertions:  217
Failures:0
Errors:  0
Skipped files:   0


2012/2/26 Rick McGuire object.r...@gmail.com

 btw, still working on the datetime problem.  Don't include that update
 in the branch yet.

 Rick

 On Sun, Feb 26, 2012 at 3:38 PM, Rick McGuire object.r...@gmail.com
 wrote:
  Ok, found the differences.  There were some changes from SysFile.cpp
  that also were needed to go with the other changes.  Absent these, the
  linends were getting written out as '0d0d0a'x, so the file sizes were
  not matching.
 
  Rick
 
  On Sun, Feb 26, 2012 at 3:21 PM, Rick McGuire object.r...@gmail.com
 wrote:
  Ok, I'm really confused here.  The StreamNative.cpp files are
  identical between the trunk and 4.1 branch versions.  I don't
  understand why they are giving different results...
 
  Rick
 
  On Sun, Feb 26, 2012 at 3:09 PM, Mark Miesfeld miesf...@gmail.com
 wrote:
  On Sun, Feb 26, 2012 at 12:01 PM, Rick McGuire object.r...@gmail.com
 wrote:
  Rats, I had hoped that this would have been tested before. I'm
  curious, do you see those same errors for the trunk?
 
  I just went to do that, test in trunk.  I see some errors related to
  DateTime, but not the errors that show in the 4.1 tree.
 
  It sems to me that I've run the test suite for trunk after Jean-Louis
  made the commit, but I'm not positive.
 
  --
  Mark Miesfeld
 
 
 --
  Virtualization  Cloud Management Using Capacity Planning
  Cloud computing makes use of virtualization - but cloud computing
  also focuses on allowing computing to be delivered as a service.
  http://www.accelacomm.com/jaw/sfnl/114/51521223/
  ___
  Oorexx-devel mailing list
  Oorexx-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-devel


 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Performance problem under windows

2012-02-19 Thread Jean-Louis Faucher
Windows only : If you run the attached script, you will see that a routine
call is on average 15 times slower than a method call.
routine call :  1.2030  1.  1.0780  1.0620  1.1100
method call :   0.0470  0.0780  0.1090  0.0780  0.0630
ratio :25.5957 12.8205  9.8899 13.6154 17.6190

Don't know if this is my machine only (WinXP), or if others have the same
problem.
I don't have profiling tools under Windows, but after investigation, I
think that the problem comes from SystemInterpreter::setupProgram which is
called at each call of routine (not called for methods). This method reads
the environment variable RXTRACE.
If I put in comment the reading of RXTRACE, then the ratio is on average 1.

routine call :  0.1090  0.1090  0.0630  0.0470  0.0780
method call :   0.0940  0.0630  0.0470  0.0620  0.0940
ratio : 1.1596  1.7302  1.3404  0.7581  0.8298


Jean-Louis


call_vs_method.rex
Description: Binary data
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] SysFileTree under unix : parameters tattrib and nattrib not supported ?

2012-02-11 Thread Jean-Louis Faucher
Under MacOs, I had an invalid routine call returned by SysFileTree
because of a path too long.
The call to variablePoolGetVariable  returned a NULL retriever.
I did not investigate more here, because I saw that the current file path
was longer than the buffer size.
After replacing MAX by PATH_MAX where appropriate, I had no more error.

My next step was to run test4.rex provided by Jerry, but I discover that
the Unix version of SysFileTree takes only 3 arguments... So no way to pass
tattrib and nattrib under Unix ?

I'm currently running test4.rex without tattrib on my Mac. Will tell you if
I have an error.

Jean-Louis

-- Forwarded message --
From: jfauc...@users.sourceforge.net
Date: 2012/2/11
Subject: [Oorexx-svn] SF.net SVN: oorexx:[7518]
sandbox/jlf/trunk/extensions/rexxutil/platform/ unix/rexxutil.cpp
To: oorexx-...@lists.sourceforge.net


Revision: 7518
 http://oorexx.svn.sourceforge.net/oorexx/?rev=7518view=rev
Author:   jfaucher
Date: 2012-02-11 13:45:14 + (Sat, 11 Feb 2012)
Log Message:
---
A possible fix for SysFileTree bug 3405740, but not yet the ultimate good
fix.
Some buffers are too small (MAX=256).
Now using the predefined PATH_MAX, but a buffer overflow is still possible :
http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html

Modified Paths:
--
   sandbox/jlf/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp

Modified: sandbox/jlf/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp
===
--- sandbox/jlf/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp
 2012-02-10 01:49:33 UTC (rev 7517)
+++ sandbox/jlf/trunk/extensions/rexxutil/platform/unix/rexxutil.cpp
 2012-02-11 13:45:14 UTC (rev 7518)
@@ -385,9 +385,9 @@
SHVBLOCK shvb; /* Request block for RxVar*/
size_t stemlen;/* Length of stem */
size_t vlen;   /* Length of variable value   */
-char TargetSpec[MAX+1];/* Target filespec*/
-char truefile[MAX+1];  /* expanded file name */
-char Temp[MAX+80]; /* buffer for returned values */
+char TargetSpec[PATH_MAX+1];   /* Target filespec*/
+char truefile[PATH_MAX+1]; /* expanded file name */
+char Temp[PATH_MAX+80];/* buffer for returned values */
char varname[MAX]; /* Buffer for variable name   */
size_t nattrib;/* New attrib, diff for each  */
 } RXTREEDATA;
@@ -1282,7 +1282,7 @@
  size_t   options )   /* Search and output format   */
   /* options*/
 {
-  char  tempfile[MAX+1];   /* Used to hold temp file name*/
+  char  tempfile[PATH_MAX+1];  /* Used to hold temp file name*/
  DIR *dir_handle; /* Directory handle   */
  struct stat finfo;   /* file information   */
  char * filename;

This was sent by the SourceForge.net collaborative development platform,
the world's largest Open Source development site.


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Oorexx-svn mailing list
oorexx-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-svn
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Exponential form question 3aE+6 ?

2012-02-06 Thread Jean-Louis Faucher
rev 6673 in scanner.cpp seems the reason of this change.

old : else if (inch  '0'  inch  '9')
new : else if (inch  '0' || inch  '9')

If the test above is true then :
state = EXP_EXCLUDED;  /* no longer scanning a number

So there was a bug in 4.1.0 and before...

Jean-Louis

2012/2/6 Rick McGuire object.r...@gmail.com

 On Mon, Feb 6, 2012 at 2:04 PM, Mark Miesfeld miesf...@gmail.com wrote:
  In trunk this line of code raises an error condition:
 
  x = 3aE+6
 
  But, in 4.1.0 and all the way back to 3.0.0 it is accepted.
 
  I see that according to the definition of numbers:
 
 
  The definition of numbers is, therefore, extended as follows:
 
 -++--+--+--+-digits+--
 
 +-whitespace-+  +-sign--++-+  +-digits.digits-+
 
 +-whitespace-++-.digits---+
 
   +-digits.---+
 
 --+-+--++-
 
 +-E--+--+--digits-+  +-whitespace-+
 
  +-sign-+
 
 
 
  the 'a' is not valid if we use the statement: digits are one or more of
 the
  decimal digits 0-9 from the first, un-extended definition.

 The rule that applies here is not the definition of a number, but the
 definition of a SYMBOL.  Section 1.10.4.4.  This states:

 One other form of symbol is allowed to support the representation of
 numbers in exponential format. The
 symbol starts with a digit (0-9) or a period, and it can end with the
 sequence E or e, followed immediately
 by an optional sign (- or +), followed immediately by one or more
 digits (which cannot be followed by
 any other symbol characters). The sign in this context is part of the
 symbol and is not an operator.
 These are valid numbers in exponential notation:
 17.3E-12
 .03e+9

 By this definition, 3ae+6 should be scanned as a single symbol token
 (the old behavior).  I'm not aware of any updates that would have
 changed this behavior.

 Rick


 
  But, under the extended definition, there is no statement as to what
  'digits' is.
 
  This seems like such a fundamental change.
 
  Has ooRexx always been wrong and this is just fixed in 4.2.0?  Since
 3.0.0
  is, I've always assumed, the same as IBM' Object Rexx, was this wrong
 there
  also?
 
 
 
  --
 
  Mark Miesfeld
 
 
 
 --
  Try before you buy = See our experts in action!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-dev2
  ___
  Oorexx-devel mailing list
  Oorexx-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-devel
 


 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] ok to update doc for SysFileCopy/Move ?

2012-01-31 Thread Jean-Louis Faucher
These two functions are available in main/trunk only (for Linux).
The doc of 4.1.0 was updated by mistake : SysFileCopy is for Windows only.

Jean-Louis

2012/1/31 Bill Turner, WB4ALM wb4...@arrl.net

 **
 on 01/03/2010 Jean-Louis Faucher stated that SysFileCopy was available for
 Linux


 I have the 64 bit version of Rexx installed on a Ubuntu 11.04 Linux system:

 rexx -version
 Open Object Rexx Version 4.1.0
 Build Date: Dec 3 2010
 Addressing Mode: 64

 the statement

call SysFileCopy  testfile ,
 /home/bill/xxx//PhysicalSitename?index.php

 issued the following error message:
 REX0043E: Error 43 running /home/bill/bin/testcc line 48:  Routine not
 found
 REX0417E: Could not find routine SYSFILECOPY

 The docfile  rexxref.pdf   does not say that it is Windows Only.

 What am I doing wrong?

 /s/ Bill Turner, wb4alm




 On 01/03/2010 12:35 PM, Jean-Louis Faucher wrote:

 SysFileCopy and SysFileMove are now available for Unix.
 Is it ok to update the doc accordingly ? (basically remove Windows only)

 There is a script for the tests :
 test/trunk/ooRexx/base/rexxutil/platform/unix/SysFileCopyMove.sh

 Currently not integrated in the test framework.
 Usage : ./SysFileCopyMove.sh (from any directory)
 The following variables must be adjusted before running the script :
 d1=/tmp/testSysFile
 d2=/local/tmp/testSysFile
 To work correctly, this script must use paths that are located on
 different filesystems (i.e. different mounts), to generate EXDEV errors.

 Potential problem : I test the expected error codes, assuming that all
 platforms use the same codes, which is probably wrong... If problem
 confirmed, then I should test if the code is 0 or not 0.

 Jean-Louis


 --
 This SF.Net email is sponsored by the Verizon Developer Community
 Take advantage of Verizon's best-in-class app development support
 A streamlined, 14 day to market process makes app distribution fast and easy
 Join now and get one step closer to millions of Verizon 
 customershttp://p.sf.net/sfu/verizon-dev2dev


 ___
 Oorexx-devel mailing 
 listOorexx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Ad Trampoline, Partial arguments, higher order functions, pipeline (Re: Ad experimental ooRexx ...

2012-01-07 Thread Jean-Louis Faucher
Guten abend Rony,


- Partial arguments: this looks very interesting. However, I have
been a little bit surprised that the creation of the final argument array
does not append the new arguments to the partial ones and also leaves out
array entries that are empty. Why is this? It may be the case that for some
analysis it becomes important to be able to learn whether an argument was
omitted or not.

 Since ooRexx lets omit arguments, I thought it was interesting to keep
this  feature for partial arguments.
An example with oodialog. I give the signature of the method, and then I
define a closure for this method, with partial arguments. You will see that
createTahoma keeps omitted arguments. Some of these omitted arguments are
provided by createCenteredTahoma (chained partials).
The first argument of the closures is an instance of .UserDialog, because
the closures are built from a message (so the 1st arg becomes the receiver).
PS : I don't claim this example is a good example with oodialog. I needed
methods with many arguments, to illustrate ~partial with omitted arguments.
And oodialog fits this need. This example also demonstrates that closures
are functional, not object-oriented.


-- .UserDialog~create(x, y, cx, cy, title, style, dlgClass, fontName,
fontSize, expected)

-- createTahoma(dialog, x, y, cx, cy, title, style, fontSize, expected)
createTahoma = create~partial(Tahoma)

-- for illustration of chained partials (could use ~createCenter directly)
-- createCenteredTahoma(dialog, cx, cy, title, fontSize, expected)
createCenteredTahoma = createTahoma~partial(,0,0center)

-- .UserDialog~createStaticText(id, x, y, cx, cy, style, text)
-- createStaticText(dialog, cx, cy, text)
createStaticText = createStaticText~partial(,-1,1,1,,,SUNKEN)

dialog = .UserDialog~new
createCenteredTahoma~(dialog, 100, 10, hello, 30)
createStaticText~(dialog,,, this is a static text (close me))
dialog~execute(showtop)

::requires oodialog.cls
::requires extension/extensions.cls



- Higher-order functions: are the following basic definitions
correct?
   - reduce: iterates over the items of a collection and supplies
   them one by one as an argument to the block processing/accumulating 
 them in
   one way or the other.
   - each: iterates over the items of a collection and returns an
   array in which each visited item was processed according to the 
 RexxBlock,
   - map: iterates over the items of a collection and returns the
   collection in which each visitied item was processed according to the
   RexxBlock,
   - reduceW is reduceWords, reduceC is reduceChar, mapW is
   mapWords, mapC is mapChars, eachW is eachWords, eachC is
   eachChars: they are available for .String and .MutableBuffer and 
 there as
   a convenience (assuming that one could always create an array of words 
 or
   chars from a string and then use reduce, map and each on them)?


yes, all this is correct


- Higher-order functions:
   - What are mapR and eachI for?


R stands for Replace :
~map returns a copy of the collection.
~mapR modifies the collection in-place.

I stands for Indexed
~each returns an array of results
~eachI returns an array of results and indexes. In the dropbox delivery,
it's an array of two arrays. I'm reworking that in my sandbox : now it's an
array of pairs (result, index). This is because I'm implementing a specific
version of ~each for the coactivities. A lazy ~each must yield one result
at a time, so when indexed, must be a pair (result, index).



- What are mapCR, mapWR, eachCI, eachWI for?


mapCR : iterate over the characters and replace them by the returned
results (update in-place).
mapWR : iterate over the words and replace them by the returned results
(update in-place).
eachCI : iterate over the characters and return an array of indexed results.
eachCI : iterate over the words and return an array of indexed results.



- functionDoer will get two named arguments value and index and in
   the case of reduce these two arguments will be preceded by an argument
   (frist argument) representing the current value. It would be probably
   helpful for the ooRexx programmer, if value was named item as this 
 is
   the term used in the ooRexx documentation for collections.


yes. I will change that. Will also apply this change to pipelines.



- ad filter: what is a filter and where and how can one use it?


The method ~each lets filter : if no result returned, then no entry added
in the array.
I will commit soon the methods ~select and ~reject which are convenience
methods. You can do the same with ~each, but the block is smaller, just a
boolean expression.



- ad  times, times.yield, resume: for which objects are these
methods defined and what do they do?


~times and ~times.yield are defined on .String, but works only with numbers
(because do i=self to ...). Execute N times the given 

Re: [Oorexx-devel] Some comments/impressions/questions ... (Re: Ad experimental ooRexx ...

2012-01-04 Thread Jean-Louis Faucher


- Parser : Refinement of tokens 'subclass' attribute: unfortunately,
I was not able to get to see this. I defined (Windows) RXTRACE_PARSING=ON,
but unfortunately it seems that no dumping of the clauses and tokens take
place.


ah yes, you need the debug version of ooRexx, does not work with the
dropbox delivery.
Under Windows, the output is sent to the debug output.
If needed, download DebugView (Microsoft Sysinternals).
You may want to limit the output to the parsing :
From DebugView, Edit/Filter : Include = (Parsing)



- Parser : = ==: not sure what the problem is and what changes you
implemented. What behaviour is systematically changed here?

 In fact, only == is impacted. The goal is to support pure expressions
like in select below. The second line is not supported by the current
delivery in dropbox, the change is not yet committed. So you can see by
yourself what happens if you run the second line.

.array~of(1,2,1)~pipe(.select {value==1} | .console)
.environment~pipe(.select {index~left(1) == S} | .console)


   - Parser : Message term: interesting idea, not sure whether really
   needed (looks a bit awkward: sending a message to an object, but not giving
   that message an explicit name; one all of a sudden must remember such a
   short-cut to become able to understand/read code employing it; *however*, I
   would prefer .yield~() to .yield[] which looks even more awkward,
   although this is possible already with ooRexx).

Most of the languages which support anonymous functions let call them like
named functions, when stored in a variable. In ooRexx, a function call is
f(), but we can't do that :
f = {return 1}
say f()-- calls the function f, not the value of the variable f

Hence the ~(), anonymous message.


[now a long digression about yield]

For yield, I had to re-read my notes to remember why I use this notation,
and why I don't use a routine : it's because when a routine is called as a
function, a result is mandatory. Of course, I can use the call notation if
I don't want to use the returned value.

Assuming I add this definition to coactivity.cls :
::routine yield public
.Coactivity~sendWith(yield, arg(1, a))
if var(result) then return result

Then I can write that :

c={::coactivity yield(1) ; yield(2)}
c~()=-- [1]
c~()=-- error No data returned from function YIELD

The method ~yield returns the array of arguments passed to c~() which
forwards to ~do which forwards to ~resume.
With one exception : if the array has 0 item then no result is returned by
~yield.
Can't remember why I don't return an empty array, maybe to rework.
Hence the error No data returned...

I have to call yield to avoid the error :
c={::coactivity call yield(1) ; call yield(2)}
c~()=-- [1]
c~()=-- [2]
c~()=-- [no result]

If I pass an argument then I'm exposed to the automatic execution of
command if I forget to use the result of yield :
c={::coactivity yield(1) ; yield(2)}
c~(hello)=-- [1]
c~(hello)=-- try to execute 'an' as a command, because the string
representation of the result returned by yield is an Array.

No such problem with a message term : there is no attempt to execute a
command, the result is stored in the variable result.


*Maybe* the good solution would be to add a new instruction yield.
An instruction does not return a result.
But what I need is not a result, I need the arguments passed to ~resume.
ooRexx has already all what needed for that, except it works only for the
1st entry in the coactivity :
c = {::coactivity
use arg arg1, arg2-- 1, 2
yield arg1+arg2
use arg arg1, arg2-- should be 3, 4
yield arg1+arg2
etc...
}

c~(1,2)=-- [3]
c~(3,4)=-- [7]
etc...

Currently, the code above can be written like that :
c = {::coactivity
use arg arg1, arg2-- 1, 2
args = .yield[arg1+arg2]
arg1 = args[1]-- 3
arg2 = args[2]-- 4
args = .yield[arg1+arg2]
etc...
}

Jean-Louis
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Questions/comments ad blocks, coactivity and closures, # 2... (Re: Ad experimental ooRexx ...

2012-01-03 Thread Jean-Louis Faucher
Guten tag Rony

 [One comment ad abbreviations: maybe it would be good for mere mortal Rexx
 programmers ;) to spell out keywords in full and not abbreviate them (the
 same for values for attributes like 'kind' in RexxBlock). The abbreviations
 just save very few keystrokes while writing, but make the programs quite
 hard to read and therefore hard to comprehend, if one is not always working
 with the features where these abbreviations are possible. Some questions
 probably are needed because of the use of abbreviations.


Yes, you're right, I will avoid abbreviations when writing examples.
Abbreviations are useful when writing one-liners, which happens all the
time when using ooRexxShell.
By the way, I will commit soon a version of ooRexxTry.rxj which preloads
all the packages, like ooRexxShell. Multiline blocks are possible with
ooRexxTry.rxj :-)


 The same is true for the names of methods standing for higher-order
 functions,


I suppose you do reference to ~map, ~mapC, ~mapCI, mapCR etc...
If you look at the file diary.txt, section 2011 oct 16, you will see why
the method names are like that.
See
http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29#Folds_in_various_languages
Some languages use just one letter to make a distinction between several
methods. Ex with Haskell : foldl, foldr, foldl1, foldr1.
Of course, some languages are more verbose, but this is not the style I
prefer.


 or~{} instead of ~do() or ~run();


The notation f~(), this is one of the two possible notations if you want
something close to the real function call f(). The other possible
notation is f[] as it's done in pipe.rex or with .yield[].
I discovered a few days ago that the notation ~() had been considered in
the early days of Oryx.
http://www.docstoc.com/docs/53779711/An-Object-REXX-Retrospective
page 13 :
*1989: The Essential Core
Some things didn’t survive: closures, keyword arguments, [] for pointers
and reference arguments, assertions, coercion, ~* and ~, ~()
*

 Questions ad blocks:

- defining a block like:

   a={x=1
  y=3
  say x/y}


then sending it the message ~do or ~() does not yield an
execution. When sending the Rexx block 'a' the message rawExecutable
returns in this case a routine object, which can be run by sending it the
call message.

However, I was expecting to be able to send ~do or ~() to it. How
can I get a doer from the Rexx block 'a' that understands 'do'?


Did you requires extension/extensions.cls ?
The support for ~() or ~do is not part of the predefined classes.
On the other hand, ~rawExecutable is predefined.

Questions ad coactivity:

- Is a coactivity always a RexxBlock?


A RexxBlock is a factory of coactivity (among others) when the tag is
::coactivity or ::routine.coactive or ::method.coactive. But you don't have
to always use a block. You can use directly a routine or a method or a
message.
See the method ascendingValues in
http://oorexx.svn.sourceforge.net/viewvc/oorexx/sandbox/jlf/samples/concurrency/binary_tree.cls?view=log
Here, the coactivity is created explicitely, passing as parameters the
message visitAscending and the root object of the binary tree.


- What is the difference between ::coactivity and ::closure and
coactive.closure?

 A ::coactivity remembers its internal state. It can be called several
times : The execution is resumed after the last .yield[].
A ::closure remembers its outer environment. It can be called several times
but the execution is always from the start of the code.
A ::closure.coactive is both a closure and a coactivity. The method
yield.upto in functional.cls returns a coactive closure.


- Whyt is the difference between ::method and ::method.coactive,
as well as ::routine and ::routine.coactive?


Same reason as previously for closure. If you want a routine or method
which remembers its internal state and can be resumed, then you have to
declare it coactive.


- Why is there a .yield[] (a class named yield with a method named
[])?


.yield[args...] is a shotcut notation for .Coactivity~yield(args...) where
[] is a class method. Some languages like ruby or python have a yield
statement and I wanted to emulate this statement, without modifying the
interpreter... At that time, I did not yet add support for ~(), so [] was
the only possible shortcut (borrowed from Rick's usage in pipe.rex).



- What does yield do?

 yield lets the producer return a result to the consumer.
On the consumer side, the consumer uses
producerResult = aCoactivity~resume(args...)
On the producer side, the producer uses
clientArguments = .yield[args...]
yield can be called only from within a coactivity, i.e. the first call in
the call stack must be aCoactivity~start.
Try that from ooRexxShell : .yield[]
You will have the error yield can be used only from a coactivity.


- How does the following example from your readme.txt file
work/execute?

v = 1
w = 2

Re: [Oorexx-devel] Question ad closures... (Re: Ad experimental ooRexx ... (Re: Question ad rev. 7391 (sandbox/jlf)

2011-12-31 Thread Jean-Louis Faucher
Hi Uli,

do you mind if I make me linux binaries from your sandbox, using the
 packages
 from dropbox ?


No problem.

Something to know : the rxapi server has been modified to send trace
messages to stderr.
If you do a release-build from the sandbox, then you will have intermittent
crashes, because the server starts as a daemon (no stderr). I will fix that
in the sandbox, by not writing to stderr if started as a daemon.
In the meantime, you can edit this file :
sandbox/jlf/trunk/rexxapi/server/platform/unix/linux/APIService.cpp
and put in comment : #define RUN_AS_DAEMON
Then, you have just to start rxapi by hand in a terminal, and use another
terminal to run rexx.

Just in case, I made a build for Puppy Linux, available through dropbox.
I don't know if that will work for other Linux distributions.
Puppy Linux is a minimal distribution. There is only one user : root
So the files owner in the taz is root...

Jean-Louis
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad closures... (Re: Ad experimental ooRexx ... (Re: Question ad rev. 7391 (sandbox/jlf)

2011-12-30 Thread Jean-Louis Faucher
Guten tag Rony,

 What is a closure and what is your syntax for it?


A closure is a block (class RexxBlock) who remembers the value of the
variables defined in its outer environment.
The syntax is {::closure ...}, where ::closure is a tag which can be
abbreviated ::cl.
For a list of all tags, see
http://oorexx.svn.sourceforge.net/viewvc/oorexx/sandbox/jlf/trunk/interpreter/RexxClasses/Parser.orx?view=log


 E.g. what does {}~variables do and why is [::closure}~variables
 different to the former?


{} is an empty source literal.  The default tag is ::routine.
{::closure} is a source literal tagged ::closure. The tag makes the
difference.
Since doing a copy of .context~variables has a cost, there is no reason to
do it when not needed.
Not sure I will keep the method ~variables on RexxBlock. Currently, I need
it to initialize the closure instance, but there is probably no reason for
an end-user to have access to this directory.

  Ex1 :
 In this example, you create functions on-the-fly from a common block.

 range = { use arg min, max ; return { ::closure expose min max ; use arg
 num ; return min = num  num = max }}

 Hmm, why would you have nested blocks?


The first block can be rewritten as a routine, no more nested blocks, but
the code is less compact, and the order less natural (you discover the
definition of the routine after the place from where it's called). The
inner block is an object (RexxBlock) returned by the routine.

from5to8 = range(5, 8) -- function call, here no tilde
say from5to8~(6) -- from5to8 is a RexxBlock to which the message ~() is
sent

::routine range
use arg min, max
return { ::closure expose min max ; use arg num ; return min = num  num
= max }

Why is the inner block led in by ::closure and why is that necessary in
 this example?


The tag ::closure is needed to capture the values of min and max.
When the RexxBlock is returned to the caller, the values of min and max are
still available, despite the fact the context of the routine 'range' no
longer exists.


 What does expose in a closure do?


A closure is an instance of .Closure which has only one do method, whose
source is given by the source literal (after removing the tag). The
directory of variables on the RexxBlock is used to create instance
variables inside the closure instance. The expose is used to make visible
the needed variables.
This is a naive implementation, there is room for optimization.


 What does use arg num in the inner block refer to and why?


Since the object returned by range is a RexxBlock, you can execute this
block and pass arguments. Here, the block expects a number argument.

  So is from5to8 an object representing the code above and by sending
 that doer/executable/runnable object a message, it gets executed supplying
 the arguments of the message to that code block?


yes, exactly.
from5to8 is a RexxBlock to which the message ~() is sent with the
argument 6. This message is forwarded as do message to the doer
associated to the RexxBlock. Here, the doer is a closure. The do method
receives the argument 6 and has access to the exposed min and max
variables, which were captured when the range routine was called.

  from20to30 = range~(20, 30)

 Again, is from20to30 a block of executable code, where min and max
 are set and which later can be used to execute code?


yes.
Each time the range routine is called, a new instance of RexxBlock is
returned, which holds the .context~variables of the range routine. Since
the parameters min and max belongs to this directory, they are captured.

And if so, why is the argument to the message not supplied as an argument
 to the executable code (outer block), but obviously as an argument to the
 inner block defined to be a closure?


See comments above.


   Ex2 :
 In this example, a closure is needed to have access to the 'translation'
 variable. You can't pass it by parameter, because it's not you who calls
 the block.

 Who does call/execute the block then?


The block is called by the mapW method.
You call the mapW method, but you have no way to pass the translation
directory to it, because mapW accepts only one parameter : the action to
apply on each word of the string.
The action must be a doer factory, i.e. must understand ~doer. The action
can be a routine or a method or a message or a coactivity or a closure or a
block. Among all those objects, only a block is really a factory. The other
objects return themselves when sending the message ~doer, because they are
already executable.


   translation = .Directory~new
 translation[quick] = slow
 translation[lazy] = nervous
 translation[brown] = yellow
 translation[dog] = cat
 translation~setMethod(UNKNOWN, return arg(1))
 say The quick brown fox jumps over the lazy dog~mapW{::cl expose
 translation ; translation[arg(1)]}

 Which argument does arg(1) refer to in the above statement?


arg(1) is the current word being processed.

 What does the method mapW do? What are the arguments to it? What would
 be the 

Re: [Oorexx-devel] Questions ad extension-mechanism ... (Re: Ad experimental ooRexx ... (Re: Question ad rev. 7391 (sandbox/jlf)

2011-12-29 Thread Jean-Louis Faucher


- How stable is your implementation of extensions? Are there any
unexpected side-effects to be expected?


The only thing I implemented is the ::extension directive which delegates
to the methods 'define' and 'inherit'.
 The core implementation was already in place in the interpreter. I had
just to unlock the 'define' and 'inherit' methods, to let them work on
predefined classes. And to allow propagation of the extensions to existing
instances (seems more work is needed here) :
- An extension made on .Object is not available on a class.
- An extension made on .Object is not available on the .nil object.
That's why I asked a big picture for metaclasses, classes, instances a few
weeks ago. But I had no time to investigate.

So far, I don't see unexpected side-effects.


- How can one achieve the following extension (from extensions.cls)
directives dynamically at runtime (e.g. if one creates a method object for
the 'quoted' method at runtime, how could one use that to extend the
.String class at runtime) ?

 ::extension String

::method quoted
use strict arg quote=''
return quote || self~changeStr(quote,quote||quote) || quote



 .String~define(quoted, use strict arg quote='' ; return quote ||
self~changeStr(quote,quote||quote) || quote)


- How is it possible to learn which methods got extended in a class?


To my knowledge, not possible  (is it possible to know which methods were
incorporated specifically with define ?)
You can query the methods inherited by extension, but there is nothing
specific to extension here.
Ex :
::extension String inherit StringDoer StringReducer StringMapper
StringRepeater StringIterator
10~instanceMethods(.StringRepeater)=
# 1: index=[UPTO] - item=[a Method id#_540414686]
# 2: index=[YIELD.DOWNTO] - item=[a Method id#_540524136]
# 3: index=[TIMES.YIELD]  - item=[a Method id#_540396602]
# 4: index=[TIMES]- item=[a Method id#_540379280]
# 5: index=[DOWNTO]   - item=[a Method id#_540478658]
# 6: index=[YIELD.UPTO]   - item=[a Method id#_540460386]


- What happens, if different programs extend a class with a method by
the same name? Is this allowed, and if so what are the rules (each
extension method replaces an exisiting extended method; or it is an error
to extend a method, if the method exists already)?


The rules are those of 'define' and 'inherit'.
Currently, the only case of error is when the same method appears several
times in a given::extension directive. It's like that because I duplicated
the code for ::class.
It's possible to extend a class several times in a same package.
It's possible to extend a class in different packages.
If the same method appears in different ::extension directives for the same
class, there is no error.
During parsing, the extensions methods of an  ::extension directive are
accumulated in a table (todo : use an ordered collection). The 'inherit'
declarations are accumulated in a list. When the extensions of a package
are installed, the extension methods and the inherit declarations of each
::extension are processed in the order of accumulation.
If the same method appears in several ::extension directives, then the most
recent replaces the older (because 'define' works like that).
Each package is installed separately, this is the standard behaviour. The
visibility rules for classes are also standard, nothing special for
extensions. Each package has its own visibility on classes.

http://oorexx.svn.sourceforge.net/viewvc/oorexx/sandbox/jlf/samples/extension/test_extension_order.rex?view=log

Todo : forbids to replace a predefined method. The goal is to extend, not
to alter the behavior. Maybe not so easy to do for 'inherit'.


- Is it possible to remove an extended method later in the program? If
so, how?

  .String~define(quoted)
Todo : forbid to remove a predefined method.


Jean-Louis
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question at .CoRoutine ... (Re: Ad experimental ooRexx ... (Re: Question ad rev. 7391 (sandbox/jlf)

2011-12-29 Thread Jean-Louis Faucher
 what is the purpose of a .CoRoutine? How does that differ from having
 Rexx methods execute concurrently?


Excerpt from
http://ssw.jku.at/Research/Papers/Stadler11Master/Stadler11Master.pdf

Producer/consumer problems can often be implemented elegantly with
coroutines.
Coroutines also provide an easy way to inverse recursive algorithms into
iterative ones.
Coroutines are non-preemptive light-weight processes. Their advantage over
threads is that they do not have to be synchronized because they pass
control to each other explicitly and deterministically.


Of course, it's possible to emulate coroutines with threads, this is what I
do with .Coactivity. But this is not a good choice for performances. A
possible real implementation would be to use fibers, but that's more
ambitious.



 What does one need to know to decide whether to use a CoRoutine or not?


See http://www.dabeaz.com/coroutines/Coroutines.pdf
This is about Python but the use cases are interesting.

Jean-Louis
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad closures... (Re: Ad experimental ooRexx ... (Re: Question ad rev. 7391 (sandbox/jlf)

2011-12-29 Thread Jean-Louis Faucher
 It looks as if one is able to define any Rexx code as a literal by using
 curly brackets around them.
 These literals can then be run/executed later.


yes, but not all blocks are closures.
Only a block starting with ::cl[osure] will let create a closure. This
block has an associated directory of variables. No need to create a
snapshot of the variables for the other kinds blocks.

v=1 ; {}~variables=
[The NIL object id#_537657582]

v=1 ; {::cl}~variables=
type: The Directory class: (3 items)

# 1: index=[RC]   - item=[0]
# 2: index=[SIGL] - item=[364]
# 3: index=[V]- item=[1]



 Do you have a brief problem, example where one can see what is needed for
 a bare-bone closure and
 how it helps solve some problems in an easier way than with what is
 currently available in ooRexx?

 Or maybe reformulated: what is special about the closures, that makes it
 easier for the programmer
 to take advantage of them, rather than using what ooRexx has already? What
 do closures allow for,
 that is not really possible now?


Well, it's a matter of code organization. There is nothing you can't do
without closures. It's just you can have more compact code, assuming you
like this kind of code :-)

Ex1 :
In this example, you create functions on-the-fly from a common block.

range = { use arg min, max ; return { ::closure expose min max ; use arg
num ; return min = num  num = max }}
from5to8 = range~(5, 8)
from20to30 = range~(20, 30)
say from5to8~(6) -- 1
say from5to8~(9) -- 0
say from20to30~(6) -- 0
say from20to30~(25) -- 1


Ex2 :
In this example, a closure is needed to have access to the 'translation'
variable. You can't pass it by parameter, because it's not you who calls
the block.

translation = .Directory~new
translation[quick] = slow
translation[lazy] = nervous
translation[brown] = yellow
translation[dog] = cat
translation~setMethod(UNKNOWN, return arg(1))
say The quick brown fox jumps over the lazy dog~mapW{::cl expose
translation ; translation[arg(1)]}
::requires extension/extensions.cls


Ex3 :
In this example, the 'partial' method returns a closure which remember the
parameter 10.

add10 = +~partial(10)
say add10~(1) -- 11
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad rev. 7391 (sandbox/jlf)

2011-12-26 Thread Jean-Louis Faucher
The sandbox binaries for MacOsX and Win32 are available.
http://dl.dropbox.com/u/20049088/oorexx/sandbox/index.html

Jean-Louis
--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad rev. 7391 (sandbox/jlf)

2011-12-20 Thread Jean-Louis Faucher
Guten abend Rony

 Does this comment mean that your sandbox version of ooRexx is fully
 Unicode-enabled already?


no...I did not work on Unicode since several months. But since uft-8 is
compatible with ascii, it's possible to process utf-8 strings and pass them
to (or receive them from) oodialog. That's why I say I can use
oodialog.wchar to test unicode, assuming I restart to work on Unicode.


 If so, how would you describe its stability? In any case: would it be
 possible to get at a binary version of it (Windows, Linux or Mac, any
 bitness) to be able to test it over Christmas?

 The sandbox version is very stable. I run ooRexxShell daily, which loads
*all* the packages/libraries, including bsf4oorexx. After modifying one of
the packages, I enter the 'reload' command which reloads everything in a
few seconds, and I test.
I can deliver a binary version for Windows (32 bits)  and Mac (64 bits)
through dropbox. The main thing to test is the RexxContextualSource (that I
will probably rename RexxBlock) and all its derivatives.

---

 Also another question in this context: what about oodialog.wchar that you
 state to be outdated, was it fully Unicode-enabled (as wchar and your
 respective documentation in the sandbox indicate)? What about the newest
 version of oodialog then?


yes, oodialog.wchar is fully Unicode. Internally, all the strings are
utf-16 strings. At the boundaries, the multi-bytes strings (which covers
ascii, utf-8 strings) are converted to/from UTF-16. You have just to
specify the code page of the multi-bytes strings.
I don't plan to redo this work for the new oodialog, But the work is not
lost...

Jean-Louis
--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Reconnecting to the SVN

2011-12-01 Thread Jean-Louis Faucher
Hi Jon

The .svn subdirectories contain the needed info, I don't think you need to
register your local directory. If you right click on the root directory and
choose Relocate..., you should see something like that :
https://oorexx.svn.sourceforge.net/svnroot/oorexx

If you still have problems, then remove your svn tree and recreate it using
SVN Checkout... from your root directory.

Jean-Louis

2011/12/2 Sahananda (Jon) Wolfers sahana...@gmail.com

 Hi,

 I have had to completely reinstall windows on my laptop.  I still had the
 ooRexx svn tree, but I needed to register it as a repository with tortoise
 svn (version 1.7.1 on Windows XP SP3).

 I right clicked on the root directory and choose create repository here I
 get the error message

 Subversion reported an error while creating a repository!
 Make sure the folder is empty and not write protected


 So I deleted all the files (I still have them on a backup) pointed at the
 folder and clicked create repository.
 That created an empty repository (not what I wanted) so I spent a futile
 few minutes rtfm-ing and guessed that import would do the trick.
 It allowed me to specify the url of the repository, but then sat for 20
 minutes or so with a dialog box on screen which reads

 Action: Command
 Path Import D:\My Documents\ooRexxSVN to
 https://oorexx.svn.sourceforge.net/svnroot/ooRexx

 Which reads to me like the wrong way around.

 It has now woken up and asked me for my username and password.

 I don't want to enter them, in case I replace the tree on the SVN with my
 empty repository.

 Can anyone guide me through the process of connecting with the SVN using
 tortoise please,

 thanks,

 Jon



 --
 All the data continuously generated in your IT infrastructure
 contains a definitive record of customers, application performance,
 security threats, fraudulent activity, and more. Splunk takes this
 data and makes sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-novd2d
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Testing RexxGtk : I have an assert error with test2-1.rex

2011-11-27 Thread Jean-Louis Faucher
After thoughts, I think this part of my previous mail is not so obvious :
Obviously, the overwritting should not happen.

If declaring CSELF is like doing expose CSELF, then it's normal to have a
specific value at each scope.
Exposed variables are not inherited, so the assignment of DictWidget seems
ok, knowing that the link DictWidget--DictWindow has been created. I
suppose that there is no need of specific ordering when linking the
dictionaries ?

If that's correct, then I think the CSELF value should be managed with two
methods get and set, whose scope is GTWIDGET. That way, the CSELF value
would be always stored in DictWidget.

Jean-Louis
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Testing RexxGtk : I have an assert error with test2-1.rex

2011-11-26 Thread Jean-Louis Faucher
1,5 year later...
I installed a more recent distribution of GTK (the all-in-one bundle from
http://www.gtk.org/download/win32.php), made a rebuild and still get the
same problem.

window = .GTKWindow~new(.gtk~GTK_WINDOW_TOPLEVEL)
window~show()

CSELF is null when executing the native method GrxWidgetShow.

Reminder of the inheritance (from super to subclass) :
GtkWidget   ~show
GtkContainer
GtkWindow   ~new~init   ~set_title

What I see under debugger :

When running .GTKWindow~new, the scope of the native method GrxWindowNew is
GTKWINDOW. The value of CSELF is stored in a dictionnary (say DictWindow)
whose scope is GTKWINDOW. This dictionary is referenced by the window :
window.objectVariables == DictWindows

When running window~show, the scope of the native method GrxWidgetShow is
GTKWIDGET. When RexxNativeActivation::processArguments search for CSELF,
the search is started from the scope GTKWIDGET (see below, the reference to
DictWindow has been overwritten), and NULL is returned.

Why the search start from scope GTKWIDGET :
In RexxNativeActivation::cself, there is a call to methodVariables().
Since RexxNativeActivation.objectVariables == NULL (I think it's normal),
the next line in methodVariables is executed :
this-objectVariables =
this-receiver-getObjectVariables(method-getScope())
but here, the method's scope is GTKWIDGET...
In RexxObject::getObjectVariables, no dictionary at this scope is found,
and a new one (say DictWidget) is created at scope GTKWIDGET. Its next
dictionnary is set to DictWindow (bad order, no ? : superclass --
subclass). And the current reference to DictWindow is overwritten (the
receiver is the window) :
window.objectVariables = DictWidget

Obviously, the overwritting should not happen. But difficult for me to say
what to fix :
- method-getScope() in RexxNativeActivation::methodVariables ?
- the sequence of actions in RexxObject::getObjectVariables ?
- the way how the native methods and CSELF are used in RexxGtk ?

Jean-Louis


2010/5/14 David Ashley david.ashley@gmail.com

 **
 Very strange. This has just started with the recent fixes to GTK applied
 by Fedora on my system. It worked fine until recently.

 Still trying to figure out what has changed but this may be a GTK bug.

 David Ashley


 On 05/14/2010 01:37 PM, Jean-Louis Faucher wrote:

 I'm testing RexxGtk and I get an assert error in test2-1.rex.
 Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed
 David, is it working for you ?

 Maybe I'm totally wrong, but it seems that the CSELF assignment should be
 moved to GtkWidget.

 When debugging show, I see that CSELF is NULL
 If I understand correctly, the CSELF variable is searched from subclass to
 superclass.
 When ~show is called, is it the pool of GtkWidget which is used as
 starting point ?

 The inheritance is like that (from super to subclass) :
 GtkWidget   ~show
 GtkContainer
 GtkWindow   ~new~init   ~set_title


 Jean-Louis


 --




 ___
 Oorexx-devel mailing 
 listOorexx-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --


 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A possible fix for bug 3274050

2011-11-14 Thread Jean-Louis Faucher
Committed an adjustment.

Using this script :

-- file append.rex

use arg file

call lineout file, one

call lineout file, two

rexx append.rex read_write.txt
rexx append.rex read_write.txt
cat read_write.txt
one
two
one
two

The same actions with read_only.txt gave
one
twoone
two


Now with the adjusment, I get
one
two
one
two


Jean Louis

2011/11/12 Jean-Louis Faucher jfaucher...@gmail.com

 forget my comment about isopen... It is at the right place in both cases.

 The difference between implicit open and explicit open comes from the test
 isDevice(), done only when explicit open.

 Can't tell if this test is needed also in implicit open... I suppose we
 should have the same behavior in both cases ?

 Jean-Louis


 2011/11/12 Jean-Louis Faucher jfaucher...@gmail.com

 sorry, I wrote charout[2], this is charout[1].

 Jean Louis


 2011/11/12 Jean-Louis Faucher jfaucher...@gmail.com

 Still working on the test cases...

 From the script below, I see that :
 The charout [2] succeeds in implicit opening of the stream, but fails in
 the ctrl_z stuff.
 If the file is empty then the charout [2] succeeds since there is no
 ctrl_z stuff.
 The following char/lineout are ok.

 So there is a workaround : use an implicit open and write a dummy line.
 The following writes will be ok.

 A last point, I was curious to understand why the first write fails
 after the command open, and why it succeeds afer :
 In implicitOpen, the attribute isopen is set to true before testing
 ctrl_z, so not impacted by a write-only file.
 In streamOpen, the attribute isopen is set to true after testing ctrl_z,
 so impacted by a write-only file.

 To be consistent, in streamOpen, the attribute isopen should be assigned
 true before the ctrl_z stuff (in my opinion).


 file = write_only.txt -- permissions : --w--w--w-

 say stream(file, c, open write append)  -- error 13

 say charout(file, [1] || some chars)-- 13 characters remaining
 to write (no error if file is empty)

 say charout(file, [2] || more chars)-- 0correctly written...

 say lineout(file, [3] || line1) -- 0

 say lineout(file, [4] || line2) -- 0

 say charout(file, [5] || EOF)   -- 0

 say charout(file, [6] || 1Ax) -- eof-- 0



 Jean Louis


 2011/11/11 CVBruce cvbr...@gmail.com

  ctrl_z is a hold over from CP/M-80 at least.  CP/M didn't have any
 sort of counter or pointer to tell where the data ended in the last
 allocated disk block, so a marker was used.  I don't know why ctrl_z was
 chosen.  Ctrl_\ , the ASCII file separator charter would have seemed to be
 a better choice.  I'm sure they had their reasons.

 Bruce
 On Nov 11, 2011, at 9:43 AM, Mark Miesfeld wrote:

 On Fri, Nov 11, 2011 at 8:08 AM, Jean-Louis Faucher 
 jfaucher...@gmail.com wrote:

 After replacing the test isDevice() by true, the open is ok, but...
 ...

 Tested under MacOs, looks good.
 Not tested under Linux or Windows.
 Not sure if I break something by not testing ctrl_z... For me, ctrl_z
 is Windows specific, no ? is the write-only mode supported under Windows ?



 Opening a file for write only is supported under Windows.  ctrl_z is a
 hold over from DOS I think.  I believe I read that the operating system
 ignores it now and goes by the size of the file.  I.e. if you have a ctrl-z
 at position 100, but the file size is 200, the OS uses 200.

 I say commit the fix and I'll try to get some time to test it on
 Windows / look more closely at the ctrl-z issue.

 --
 Mark Miesfeld


 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now

 http://p.sf.net/sfu/rsa-sfdev2dev1___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now
 http://p.sf.net/sfu/rsa-sfdev2dev1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel





--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A possible fix for bug 3274050

2011-11-12 Thread Jean-Louis Faucher
Still working on the test cases...

From the script below, I see that :
The charout [2] succeeds in implicit opening of the stream, but fails in
the ctrl_z stuff.
If the file is empty then the charout [2] succeeds since there is no ctrl_z
stuff.
The following char/lineout are ok.

So there is a workaround : use an implicit open and write a dummy line. The
following writes will be ok.

A last point, I was curious to understand why the first write fails after
the command open, and why it succeeds afer :
In implicitOpen, the attribute isopen is set to true before testing ctrl_z,
so not impacted by a write-only file.
In streamOpen, the attribute isopen is set to true after testing ctrl_z, so
impacted by a write-only file.

To be consistent, in streamOpen, the attribute isopen should be assigned
true before the ctrl_z stuff (in my opinion).


file = write_only.txt -- permissions : --w--w--w-

say stream(file, c, open write append)  -- error 13

say charout(file, [1] || some chars)-- 13 characters remaining to
write (no error if file is empty)

say charout(file, [2] || more chars)-- 0correctly written...

say lineout(file, [3] || line1) -- 0

say lineout(file, [4] || line2) -- 0

say charout(file, [5] || EOF)   -- 0

say charout(file, [6] || 1Ax) -- eof-- 0



Jean Louis

2011/11/11 CVBruce cvbr...@gmail.com

 ctrl_z is a hold over from CP/M-80 at least.  CP/M didn't have any sort of
 counter or pointer to tell where the data ended in the last allocated disk
 block, so a marker was used.  I don't know why ctrl_z was chosen.  Ctrl_\ ,
 the ASCII file separator charter would have seemed to be a better choice.
  I'm sure they had their reasons.

 Bruce
 On Nov 11, 2011, at 9:43 AM, Mark Miesfeld wrote:

 On Fri, Nov 11, 2011 at 8:08 AM, Jean-Louis Faucher jfaucher...@gmail.com
  wrote:

 After replacing the test isDevice() by true, the open is ok, but...
 ...

 Tested under MacOs, looks good.
 Not tested under Linux or Windows.
 Not sure if I break something by not testing ctrl_z... For me, ctrl_z is
 Windows specific, no ? is the write-only mode supported under Windows ?



 Opening a file for write only is supported under Windows.  ctrl_z is a
 hold over from DOS I think.  I believe I read that the operating system
 ignores it now and goes by the size of the file.  I.e. if you have a ctrl-z
 at position 100, but the file size is 200, the OS uses 200.

 I say commit the fix and I'll try to get some time to test it on Windows /
 look more closely at the ctrl-z issue.

 --
 Mark Miesfeld



 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now

 http://p.sf.net/sfu/rsa-sfdev2dev1___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now
 http://p.sf.net/sfu/rsa-sfdev2dev1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A possible fix for bug 3274050

2011-11-12 Thread Jean-Louis Faucher
sorry, I wrote charout[2], this is charout[1].

Jean Louis

2011/11/12 Jean-Louis Faucher jfaucher...@gmail.com

 Still working on the test cases...

 From the script below, I see that :
 The charout [2] succeeds in implicit opening of the stream, but fails in
 the ctrl_z stuff.
 If the file is empty then the charout [2] succeeds since there is no
 ctrl_z stuff.
 The following char/lineout are ok.

 So there is a workaround : use an implicit open and write a dummy line.
 The following writes will be ok.

 A last point, I was curious to understand why the first write fails after
 the command open, and why it succeeds afer :
 In implicitOpen, the attribute isopen is set to true before testing
 ctrl_z, so not impacted by a write-only file.
 In streamOpen, the attribute isopen is set to true after testing ctrl_z,
 so impacted by a write-only file.

 To be consistent, in streamOpen, the attribute isopen should be assigned
 true before the ctrl_z stuff (in my opinion).


 file = write_only.txt -- permissions : --w--w--w-

 say stream(file, c, open write append)  -- error 13

 say charout(file, [1] || some chars)-- 13 characters remaining to
 write (no error if file is empty)

 say charout(file, [2] || more chars)-- 0correctly written...

 say lineout(file, [3] || line1) -- 0

 say lineout(file, [4] || line2) -- 0

 say charout(file, [5] || EOF)   -- 0

 say charout(file, [6] || 1Ax) -- eof-- 0



 Jean Louis


 2011/11/11 CVBruce cvbr...@gmail.com

 ctrl_z is a hold over from CP/M-80 at least.  CP/M didn't have any sort
 of counter or pointer to tell where the data ended in the last allocated
 disk block, so a marker was used.  I don't know why ctrl_z was chosen.
  Ctrl_\ , the ASCII file separator charter would have seemed to be a better
 choice.  I'm sure they had their reasons.

 Bruce
 On Nov 11, 2011, at 9:43 AM, Mark Miesfeld wrote:

 On Fri, Nov 11, 2011 at 8:08 AM, Jean-Louis Faucher 
 jfaucher...@gmail.com wrote:

 After replacing the test isDevice() by true, the open is ok, but...
 ...

 Tested under MacOs, looks good.
 Not tested under Linux or Windows.
 Not sure if I break something by not testing ctrl_z... For me, ctrl_z is
 Windows specific, no ? is the write-only mode supported under Windows ?



 Opening a file for write only is supported under Windows.  ctrl_z is a
 hold over from DOS I think.  I believe I read that the operating system
 ignores it now and goes by the size of the file.  I.e. if you have a ctrl-z
 at position 100, but the file size is 200, the OS uses 200.

 I say commit the fix and I'll try to get some time to test it on Windows
 / look more closely at the ctrl-z issue.

 --
 Mark Miesfeld


 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now

 http://p.sf.net/sfu/rsa-sfdev2dev1___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now
 http://p.sf.net/sfu/rsa-sfdev2dev1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel



--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A possible fix for bug 3274050

2011-11-12 Thread Jean-Louis Faucher
forget my comment about isopen... It is at the right place in both cases.

The difference between implicit open and explicit open comes from the test
isDevice(), done only when explicit open.

Can't tell if this test is needed also in implicit open... I suppose we
should have the same behavior in both cases ?

Jean-Louis

2011/11/12 Jean-Louis Faucher jfaucher...@gmail.com

 sorry, I wrote charout[2], this is charout[1].

 Jean Louis


 2011/11/12 Jean-Louis Faucher jfaucher...@gmail.com

 Still working on the test cases...

 From the script below, I see that :
 The charout [2] succeeds in implicit opening of the stream, but fails in
 the ctrl_z stuff.
 If the file is empty then the charout [2] succeeds since there is no
 ctrl_z stuff.
 The following char/lineout are ok.

 So there is a workaround : use an implicit open and write a dummy line.
 The following writes will be ok.

 A last point, I was curious to understand why the first write fails after
 the command open, and why it succeeds afer :
 In implicitOpen, the attribute isopen is set to true before testing
 ctrl_z, so not impacted by a write-only file.
 In streamOpen, the attribute isopen is set to true after testing ctrl_z,
 so impacted by a write-only file.

 To be consistent, in streamOpen, the attribute isopen should be assigned
 true before the ctrl_z stuff (in my opinion).


 file = write_only.txt -- permissions : --w--w--w-

 say stream(file, c, open write append)  -- error 13

 say charout(file, [1] || some chars)-- 13 characters remaining to
 write (no error if file is empty)

 say charout(file, [2] || more chars)-- 0correctly written...

 say lineout(file, [3] || line1) -- 0

 say lineout(file, [4] || line2) -- 0

 say charout(file, [5] || EOF)   -- 0

 say charout(file, [6] || 1Ax) -- eof-- 0



 Jean Louis


 2011/11/11 CVBruce cvbr...@gmail.com

  ctrl_z is a hold over from CP/M-80 at least.  CP/M didn't have any sort
 of counter or pointer to tell where the data ended in the last allocated
 disk block, so a marker was used.  I don't know why ctrl_z was chosen.
  Ctrl_\ , the ASCII file separator charter would have seemed to be a better
 choice.  I'm sure they had their reasons.

 Bruce
 On Nov 11, 2011, at 9:43 AM, Mark Miesfeld wrote:

 On Fri, Nov 11, 2011 at 8:08 AM, Jean-Louis Faucher 
 jfaucher...@gmail.com wrote:

 After replacing the test isDevice() by true, the open is ok, but...
 ...

 Tested under MacOs, looks good.
 Not tested under Linux or Windows.
 Not sure if I break something by not testing ctrl_z... For me, ctrl_z
 is Windows specific, no ? is the write-only mode supported under Windows ?



 Opening a file for write only is supported under Windows.  ctrl_z is a
 hold over from DOS I think.  I believe I read that the operating system
 ignores it now and goes by the size of the file.  I.e. if you have a ctrl-z
 at position 100, but the file size is 200, the OS uses 200.

 I say commit the fix and I'll try to get some time to test it on Windows
 / look more closely at the ctrl-z issue.

 --
 Mark Miesfeld


 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now

 http://p.sf.net/sfu/rsa-sfdev2dev1___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now
 http://p.sf.net/sfu/rsa-sfdev2dev1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] some questions for tests

2011-11-12 Thread Jean-Louis Faucher
Hi Mark

Is it possible to execute only a specific method in a testgroup ?
my command is : rexx Stream.testGroup, launched from ooRexx/base/class
With my debug version in sandbox, it takes about 10s. Not so long, but when
repeated several times, it counts :-)

Is there an assert which allows to continue the current method, even if
failed ?
I use self~assertSame, and in my test case, I know I can continue even if
the assert failed.
Currently, i put in comment the assert, when the fail is as expected, and
relaunch the script to test the next assert, etc...

Jean Louis
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] some questions for tests

2011-11-12 Thread Jean-Louis Faucher
Thanks Mark

You're right, I will split the method in several methods, and make it work
under Windows. The test \== Windows was already used in this file for one
test, where chmod is used. I took it as a model, that was exactly what I
needed :-).

Under Windows, I don't think I can have vrite-only files. Attrib can make a
file read-only but not write-only. That doesnt forbid to run the test
cases, it's just that the conditions of the original defect are not met.

I played with the permissions settings from the file explorer where I can
set a directory write-only (by selecting refuse read access).
With this setting, I can create a file like that :
echo line  write-only\file.txt
which cannot be read.
But I can't append datas :
echo line  write-only\file.txt (access denied)
An open with ooRexx fails at first try (RW) and second try (W)

Regarding the logic of the tests, it's the good one for testing the fix (no
failure).
But when I asked the question, I was developing the tests with an ooRexx
not yet fixed. And I wanted confirmation of the workaround that I described
in a previous mail. Hence the need to continue despite the first failure.
In the test cases, there is a comment -- ko before fix
which indicates which assertions failed.

Thanks a lot for having taken time for your very detailled answer.

Jean Louis

2011/11/12 Mark Miesfeld miesf...@gmail.com

 On Sat, Nov 12, 2011 at 6:49 AM, Jean-Louis Faucher jfaucher...@gmail.com
  wrote:


 Is it possible to execute only a specific method in a testgroup ?
 my command is : rexx Stream.testGroup, launched from ooRexx/base/class
 With my debug version in sandbox, it takes about 10s. Not so long, but
 when repeated several times, it counts :-)


 There are several ways you could do it.  You could just add a temp change
 to the the test group file:

   parse source . . s

   group = .TestGroup~new(s)
   --group~add(.Stream.testGroup)
   --group~add(.StreamClassQualify_QueryExists)

   group~addWithCollection(.Stream.testGroup,
 .array~of('test_open_write_only_3274050'))
   if group~isAutomatedTest then return group
   say Executing small test
   testResult = group~suite~execute~~print

 return testResult

 Which is what I would do if I wanted to temporarily eliminate any excess
 time.  You could add more test case names (method names) to the array.


 E:\work.ooRexx\wc\ooTest\4.xrexx ooRexx\base\class\Stream.testGroup
 Executing small test
 Executing test_open_write_only_3274050
 Interpreter: REXX-ooRexx_4.2.0(MT) 6.04 7 Nov 2011
 Addressing Mode: 64
 ooRexxUnit:  2.0.0_3.2.0ooTest: 1.0.0_4.0.0
 Tests ran:   3
 Assertions:  0
 Failures:0
 Errors:  0
 Skipped files:   0
 Test execution: 00:00:00.016000

 You could also simply copy the Stream.testGroup file to a second file and
 delete all the excess tests from the second file and run that.  Just don't
 commit the second file.

 However, the first time I went to try my temp change above, it looked like
 nothing executed.  When I looked at the test case I saw:

 ::method test_open_write_only_3274050
   if .ooRexxUnit.OSName \== WINDOWS then do
 That's sort of ... well I don't know exactly what to call it.

 Each test case (individual method) should be generic and run on all
 platforms (preferable.)  Or if it really is platform specific, it should be
 in a separate test group and marked that way.

 So, you should put your *nix only tests in a separate test group file and
 mark it as *nix only:


   group = .TestGroup~new(s)
   group~restrictOS('LINUX', 'SUNOS', 'AIX', 'MACOSX')

 Although, without giving a lot of thought to it, it seems better to me to
 make the test generic to all platforms.  Test for Windows and use attrib
 instead of chmod.

 You could also write a small program to just execute a few methods in the
 Stream.testGroup and execute that program only.  Something along the lines
 of:

 /* qTest.rex */

   parse source . . s
   s = s~left(s~lastPos('\'))
   s ||= 'ooRexx\base\class\Stream.testGroup'

   group = .TestGroup~new(s)

   group~addWithCollection(.Stream.testGroup,
 .array~of('test_open_write_only_3274050'))

   say Executing small test
   group~suite~execute~~print

 ::requires 'ooRexx\base\class\Stream.testGroup'
 ::requires 'ooTest.frm'
 ::requires 'FileUtils.cls'
 Which produces for me, when run in the framework directory:

 E:\work.ooRexx\wc\ooTest\4.xqTest.rex
 Executing small test
 Executing test_open_write_only_3274050
 Interpreter: REXX-ooRexx_4.2.0(MT) 6.04 7 Nov 2011
 Addressing Mode: 64
 ooRexxUnit:  2.0.0_3.2.0ooTest: 1.0.0_4.0.0
 Tests ran:   3
 Assertions:  0
 Failures:0
 Errors:  0
 Skipped files:   0
 Test execution: 00:00:00.015000
 Executing small test
 Executing test_open_write_only_3274050
 Interpreter: REXX-ooRexx_4.2.0(MT) 6.04 7 Nov 2011
 Addressing Mode: 64
 ooRexxUnit:  2.0.0_3.2.0ooTest: 1.0.0_4.0.0
 Tests ran:   3
 Assertions

[Oorexx-devel] A possible fix for bug 3274050

2011-11-11 Thread Jean-Louis Faucher
The problem comes from
StreamNative.cpp
const char *StreamInfo::streamOpen(const char *options)
When the O_WRONLY flag is set, ooRexx tries read-write first,
but does not fallback to write-only in case of failure (limited to device)

After replacing the test isDevice() by true, the open is ok, but...

another problem in this method, when testing if the last character is
ctrl_z.
Since the handle is write-only, the attempt to read the last character
fails and notReadyError is called.
Fixed by not testing if ctrl_z when write-only.

The same workaround for ctrl_z must be done in
StreamInfo::implicitOpen
StreamInfo::handleOpen

Tested under MacOs, looks good.
Not tested under Linux or Windows.
Not sure if I break something by not testing ctrl_z... For me, ctrl_z is
Windows specific, no ? is the write-only mode supported under Windows ?

Jean-Louis

-- Forwarded message --
From: jfauc...@users.sourceforge.net
Date: 2011/11/11
Subject: [Oorexx-svn] SF.net SVN: oorexx:[7286]
sandbox/jlf/trunk/interpreter/streamLibrary/ StreamNative.cpp
To: oorexx-...@lists.sourceforge.net


Revision: 7286
 http://oorexx.svn.sourceforge.net/oorexx/?rev=7286view=rev
Author:   jfaucher
Date: 2011-11-11 16:04:41 + (Fri, 11 Nov 2011)
Log Message:
---
A possible fix for bug 3274050 (to discuss on the dev list)

Modified Paths:
--
   sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp

Modified: sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
===
--- sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
 2011-11-11 04:23:38 UTC (rev 7285)
+++ sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
 2011-11-11 16:04:41 UTC (rev 7286)
@@ -632,6 +632,8 @@
// position at the end, and set the write position
setPosition(size(), charWritePosition);

+if (!write_only)
+{
char   char_buffer;
size_t bytesRead;
// read the last character of the buffer.
@@ -651,6 +653,7 @@
/* explicitly set the position   */
setPosition(charWritePosition, charWritePosition);
}
+}
}
lineWritePosition = 0;
lineWriteCharPosition = 0;
@@ -793,6 +796,8 @@
// position at the end, and set the write position
setPosition(size(), charWritePosition);

+if (!write_only)
+{
char   char_buffer;
size_t bytesRead;
// read the last character of the buffer.
@@ -812,6 +817,7 @@
/* explicitly set the position   */
setPosition(charWritePosition, charWritePosition);
}
+}
}
// set default line positioning
lineWritePosition = 0;
@@ -2384,7 +2390,8 @@
{
// if this is some sort of device, it might be output only (i.e., a
// printer).  Try opening again write only
-if (fileInfo.isDevice())
+// bug 3274050 : no longer limited to device, a regular file can
have write-only permissions
+if (true /*fileInfo.isDevice()*/)
{
if (!open(WR_CREAT, S_IWRITE, shared))
{
@@ -2428,6 +2435,8 @@
// position at the end, and set the write position
setPosition(size(), charWritePosition);

+if (!write_only)
+{
char   char_buffer;
size_t bytesRead;
// read the last character of the buffer.
@@ -2447,6 +2456,7 @@
/* explicitly set the position   */
setPosition(charWritePosition, charWritePosition);
}
+}
}
/* set default line positioning  */
lineWritePosition = 0;

This was sent by the SourceForge.net collaborative development platform,
the world's largest Open Source development site.


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Oorexx-svn mailing list
oorexx-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-svn
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] A possible fix for bug 3274050

2011-11-11 Thread Jean-Louis Faucher
ok.
on my side I don't plan to commit in trunk, was just an experimentation.
I prefer to leave you decide what to do :-)

Jean-Louis

2011/11/11 Rick McGuire object.r...@gmail.com

 I was looking at something similar, but my Linux system is castors up
 at the moment, so I haven't really been able to test anything.  I'm
 not totally comfortable with the isDevice() test just being commented
 out.  I think this should be if (write_only || fileInfo.isDevice())
 rather than just being an unconditional.  It would be wrong to open
 any stream as write only if the options were requesting otherwise.

 Rick

 On Fri, Nov 11, 2011 at 11:08 AM, Jean-Louis Faucher
 jfaucher...@gmail.com wrote:
  The problem comes from
  StreamNative.cpp
  const char *StreamInfo::streamOpen(const char *options)
  When the O_WRONLY flag is set, ooRexx tries read-write first,
  but does not fallback to write-only in case of failure (limited to
 device)
  After replacing the test isDevice() by true, the open is ok, but...
  another problem in this method, when testing if the last character is
  ctrl_z.
  Since the handle is write-only, the attempt to read the last character
 fails
  and notReadyError is called.
  Fixed by not testing if ctrl_z when write-only.
  The same workaround for ctrl_z must be done in
  StreamInfo::implicitOpen
  StreamInfo::handleOpen
  Tested under MacOs, looks good.
  Not tested under Linux or Windows.
  Not sure if I break something by not testing ctrl_z... For me, ctrl_z is
  Windows specific, no ? is the write-only mode supported under Windows ?
  Jean-Louis
  -- Forwarded message --
  From: jfauc...@users.sourceforge.net
  Date: 2011/11/11
  Subject: [Oorexx-svn] SF.net SVN: oorexx:[7286]
  sandbox/jlf/trunk/interpreter/streamLibrary/ StreamNative.cpp
  To: oorexx-...@lists.sourceforge.net
 
 
  Revision: 7286
   http://oorexx.svn.sourceforge.net/oorexx/?rev=7286view=rev
  Author:   jfaucher
  Date: 2011-11-11 16:04:41 + (Fri, 11 Nov 2011)
  Log Message:
  ---
  A possible fix for bug 3274050 (to discuss on the dev list)
 
  Modified Paths:
  --
 sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
 
  Modified: sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
  ===
  --- sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
   2011-11-11 04:23:38 UTC (rev 7285)
  +++ sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
   2011-11-11 16:04:41 UTC (rev 7286)
  @@ -632,6 +632,8 @@
  // position at the end, and set the write position
  setPosition(size(), charWritePosition);
 
  +if (!write_only)
  +{
  char   char_buffer;
  size_t bytesRead;
  // read the last character of the buffer.
  @@ -651,6 +653,7 @@
  /* explicitly set the position   */
  setPosition(charWritePosition, charWritePosition);
  }
  +}
  }
  lineWritePosition = 0;
  lineWriteCharPosition = 0;
  @@ -793,6 +796,8 @@
  // position at the end, and set the write position
  setPosition(size(), charWritePosition);
 
  +if (!write_only)
  +{
  char   char_buffer;
  size_t bytesRead;
  // read the last character of the buffer.
  @@ -812,6 +817,7 @@
  /* explicitly set the position   */
  setPosition(charWritePosition, charWritePosition);
  }
  +}
  }
  // set default line positioning
  lineWritePosition = 0;
  @@ -2384,7 +2390,8 @@
  {
  // if this is some sort of device, it might be output only
 (i.e., a
  // printer).  Try opening again write only
  -if (fileInfo.isDevice())
  +// bug 3274050 : no longer limited to device, a regular file can
  have write-only permissions
  +if (true /*fileInfo.isDevice()*/)
  {
  if (!open(WR_CREAT, S_IWRITE, shared))
  {
  @@ -2428,6 +2435,8 @@
  // position at the end, and set the write position
  setPosition(size(), charWritePosition);
 
  +if (!write_only)
  +{
  char   char_buffer;
  size_t bytesRead;
  // read the last character of the buffer.
  @@ -2447,6 +2456,7 @@
  /* explicitly set the position   */
  setPosition(charWritePosition, charWritePosition);
  }
  +}
  }
  /* set default line positioning  */
  lineWritePosition = 0;
 
  This was sent by the SourceForge.net collaborative development platform,
 the
  world's largest Open Source development site.
 
 
 
 --
  RSA(R) Conference 2012
  Save $700

Re: [Oorexx-devel] A possible fix for bug 3274050

2011-11-11 Thread Jean-Louis Faucher
ok, I will do that.
I see that there is one test case in Stream.testGroup which uses chmod. I
will do something similar to add a test case for the write-only bug.

Jean-Louis

2011/11/11 Rick McGuire object.r...@gmail.com

 Unfortunately, I don't have a means at the moment to try out potential
 fixes.  If you have something that appears to fix the problem, then go
 ahead and commit the fix and we can adjust as needed.

 Rick

 On Fri, Nov 11, 2011 at 11:27 AM, Jean-Louis Faucher
 jfaucher...@gmail.com wrote:
  ok.
  on my side I don't plan to commit in trunk, was just an experimentation.
  I prefer to leave you decide what to do :-)
 
  Jean-Louis
 
  2011/11/11 Rick McGuire object.r...@gmail.com
 
  I was looking at something similar, but my Linux system is castors up
  at the moment, so I haven't really been able to test anything.  I'm
  not totally comfortable with the isDevice() test just being commented
  out.  I think this should be if (write_only || fileInfo.isDevice())
  rather than just being an unconditional.  It would be wrong to open
  any stream as write only if the options were requesting otherwise.
 
  Rick
 
  On Fri, Nov 11, 2011 at 11:08 AM, Jean-Louis Faucher
  jfaucher...@gmail.com wrote:
   The problem comes from
   StreamNative.cpp
   const char *StreamInfo::streamOpen(const char *options)
   When the O_WRONLY flag is set, ooRexx tries read-write first,
   but does not fallback to write-only in case of failure (limited to
   device)
   After replacing the test isDevice() by true, the open is ok, but...
   another problem in this method, when testing if the last character is
   ctrl_z.
   Since the handle is write-only, the attempt to read the last character
   fails
   and notReadyError is called.
   Fixed by not testing if ctrl_z when write-only.
   The same workaround for ctrl_z must be done in
   StreamInfo::implicitOpen
   StreamInfo::handleOpen
   Tested under MacOs, looks good.
   Not tested under Linux or Windows.
   Not sure if I break something by not testing ctrl_z... For me, ctrl_z
 is
   Windows specific, no ? is the write-only mode supported under Windows
 ?
   Jean-Louis
   -- Forwarded message --
   From: jfauc...@users.sourceforge.net
   Date: 2011/11/11
   Subject: [Oorexx-svn] SF.net SVN: oorexx:[7286]
   sandbox/jlf/trunk/interpreter/streamLibrary/ StreamNative.cpp
   To: oorexx-...@lists.sourceforge.net
  
  
   Revision: 7286
http://oorexx.svn.sourceforge.net/oorexx/?rev=7286view=rev
   Author:   jfaucher
   Date: 2011-11-11 16:04:41 + (Fri, 11 Nov 2011)
   Log Message:
   ---
   A possible fix for bug 3274050 (to discuss on the dev list)
  
   Modified Paths:
   --
  sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
  
   Modified: sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
   ===
   --- sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
2011-11-11 04:23:38 UTC (rev 7285)
   +++ sandbox/jlf/trunk/interpreter/streamLibrary/StreamNative.cpp
2011-11-11 16:04:41 UTC (rev 7286)
   @@ -632,6 +632,8 @@
   // position at the end, and set the write position
   setPosition(size(), charWritePosition);
  
   +if (!write_only)
   +{
   char   char_buffer;
   size_t bytesRead;
   // read the last character of the buffer.
   @@ -651,6 +653,7 @@
   /* explicitly set the position   */
   setPosition(charWritePosition, charWritePosition);
   }
   +}
   }
   lineWritePosition = 0;
   lineWriteCharPosition = 0;
   @@ -793,6 +796,8 @@
   // position at the end, and set the write position
   setPosition(size(), charWritePosition);
  
   +if (!write_only)
   +{
   char   char_buffer;
   size_t bytesRead;
   // read the last character of the buffer.
   @@ -812,6 +817,7 @@
   /* explicitly set the position   */
   setPosition(charWritePosition, charWritePosition);
   }
   +}
   }
   // set default line positioning
   lineWritePosition = 0;
   @@ -2384,7 +2390,8 @@
   {
   // if this is some sort of device, it might be output only
   (i.e., a
   // printer).  Try opening again write only
   -if (fileInfo.isDevice())
   +// bug 3274050 : no longer limited to device, a regular file
   can
   have write-only permissions
   +if (true /*fileInfo.isDevice()*/)
   {
   if (!open(WR_CREAT, S_IWRITE, shared))
   {
   @@ -2428,6 +2435,8 @@
   // position at the end, and set the write position
   setPosition(size(), charWritePosition);
  
   +if (!write_only

[Oorexx-devel] No calls to uninit inside a loop, even if GC. By design ?

2011-11-06 Thread Jean-Louis Faucher
While testing the WeakReference class, I observed that the calls to uninit
are not triggered inside a loop, except when a security manager is in place.
Is it a design decision to call checkUninitQueue only from
RexxActivation::run when execution_state == RETURNED ?

See http://oorexx.svn.sourceforge.net/viewvc/oorexx/sandbox/jlf/samples/gc/
The _readme.txt describes 4 test cases.

testcase1.output.default.txt (with a security manager)
one GC during the loops, uninits called during the loop (sounds good)

testcase1.output.10_000.txt (no security manager)
no GC during the loops, so uninits called when halting (ok).

testcase1.output.100_000.txt (no security manager)
one GC during the loop in step2, but NO call to uninit. Why ?
The uninit are called  AFTER the loop.

testcase1.output.1000_000.txt (no security manager)
several GC during the loops, but NO call to uninit.
pendingUninits=18 (6 GC * 3 zombies) : I suppose it's not a problem to have
18 instead of 3 ? If I understand correctly, the only important information
is pendingUninits  0, to decide when calling runUninits.

Jean-Louis
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] No calls to uninit inside a loop, even if GC. By design ?

2011-11-06 Thread Jean-Louis Faucher
Indeed, the code in the loop was too simple. I added a call to a 2nd
routine from inside the loop and now the uninit are called.
In fact, it seems that at least one user-defined procedure/routine/method
must be called to trigger the calls to uninit.
If I use only predefined functions/methods inside the loop then no uninit
is called (quick tests...).

Thanks!
Jean-Louis


2011/11/7 Rick McGuire object.r...@gmail.com

 uninits are only processed at important boundaries, such as return
 from method calls.  So if you have a tight loop that isn't making any
 method calls, then it is possible that these would not be processed
 until the loop completes.  The security manager changes this dynamic
 by introducing some method call boundaries.

 Rick

 On Sun, Nov 6, 2011 at 7:11 PM, Jean-Louis Faucher
 jfaucher...@gmail.com wrote:
  While testing the WeakReference class, I observed that the calls to
 uninit
  are not triggered inside a loop, except when a security manager is in
 place.
  Is it a design decision to call checkUninitQueue only from
  RexxActivation::run when execution_state == RETURNED ?
 
  See
 http://oorexx.svn.sourceforge.net/viewvc/oorexx/sandbox/jlf/samples/gc/
  The _readme.txt describes 4 test cases.
 
  testcase1.output.default.txt (with a security manager)
  one GC during the loops, uninits called during the loop (sounds good)
 
  testcase1.output.10_000.txt (no security manager)
  no GC during the loops, so uninits called when halting (ok).
 
  testcase1.output.100_000.txt (no security manager)
  one GC during the loop in step2, but NO call to uninit. Why ?
  The uninit are called  AFTER the loop.
 
  testcase1.output.1000_000.txt (no security manager)
  several GC during the loops, but NO call to uninit.
  pendingUninits=18 (6 GC * 3 zombies) : I suppose it's not a problem to
 have
  18 instead of 3 ? If I understand correctly, the only important
 information
  is pendingUninits  0, to decide when calling runUninits.
 
  Jean-Louis
 
 
 --
  RSA(R) Conference 2012
  Save $700 by Nov 18
  Register now
  http://p.sf.net/sfu/rsa-sfdev2dev1
  ___
  Oorexx-devel mailing list
  Oorexx-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-devel
 
 


 --
 RSA(R) Conference 2012
 Save $700 by Nov 18
 Register now
 http://p.sf.net/sfu/rsa-sfdev2dev1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] GC : Which is the rule to decide if objectVariables must be marked ?

2011-10-26 Thread Jean-Louis Faucher
I had a crash during GC that I was able to fix by marking the attribute
objectVariables (RexxContextualSource).
RexxActivation::run : Seems that when a method is guarded, then the
attribute objectVariables is assigned a value, and this value must be
protected from GC.
Most of the exported classes do this marking, except :
Pointer
Buffer
WeakReference
RexxContext
StackFrame
Exception

So I wonder which is the rule to decide if objectVariables must be marked ?
All the classes above have guarded methods, so the same problem as mine
could happen, no ?

Jean-Louis
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] GC : Which is the rule to decide if objectVariables must be marked ?

2011-10-26 Thread Jean-Louis Faucher
thanks Rick.

One more question I forgot to ask :
what about ~flatten for objectVariables ?
Is it always
flatten_reference(newThis-objectVariables, envelope);
or is it ok to do
newThis-objectVariables = OREF_NULL
?

My class is somewhat similar to RexxContext, i.e. not intended to be
serialized in the image (assuming flatten is for image...).

Jean-Louis


2011/10/26 Rick McGuire object.r...@gmail.com

 On Wed, Oct 26, 2011 at 3:45 AM, Jean-Louis Faucher
 jfaucher...@gmail.com wrote:
  I had a crash during GC that I was able to fix by marking the attribute
  objectVariables (RexxContextualSource).
  RexxActivation::run : Seems that when a method is guarded, then the
  attribute objectVariables is assigned a value, and this value must be
  protected from GC.
  Most of the exported classes do this marking, except :
  Pointer
  Buffer
  WeakReference
  RexxContext
  StackFrame
  Exception
 
  So I wonder which is the rule to decide if objectVariables must be marked
 ?
  All the classes above have guarded methods, so the same problem as mine
  could happen, no ?

 Yes, you are absolutely right, all exported classes should be marking
 the object variables.  For the ones you highlighted above, this could
 only become an issue if somebody created a subclass of these classes.
 Since they are not widely used, this apparently has never happened.
 StackFrame and Exception have never been in a released version, but
 the Exception class is definitely intended to be something one would
 subclass.

 Rick

 
  Jean-Louis
 
 
 
 
 --
  The demand for IT networking professionals continues to grow, and the
  demand for specialized networking skills is growing even more rapidly.
  Take a complimentary Learning@Cisco Self-Assessment and learn
  about Cisco certifications, training, and career opportunities.
  http://p.sf.net/sfu/cisco-dev2dev
  ___
  Oorexx-devel mailing list
  Oorexx-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-devel
 
 


 --
 The demand for IT networking professionals continues to grow, and the
 demand for specialized networking skills is growing even more rapidly.
 Take a complimentary Learning@Cisco Self-Assessment and learn
 about Cisco certifications, training, and career opportunities.
 http://p.sf.net/sfu/cisco-dev2dev
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] GC : Which is the rule to decide if objectVariables must be marked ?

2011-10-26 Thread Jean-Louis Faucher
ok, thanks !


2011/10/26 Rick McGuire object.r...@gmail.com

 On Wed, Oct 26, 2011 at 7:00 AM, Jean-Louis Faucher
 jfaucher...@gmail.com wrote:
  thanks Rick.
 
  One more question I forgot to ask :
  what about ~flatten for objectVariables ?
  Is it always
  flatten_reference(newThis-objectVariables, envelope);
  or is it ok to do
  newThis-objectVariables = OREF_NULL
  ?
 
  My class is somewhat similar to RexxContext, i.e. not intended to be
  serialized in the image (assuming flatten is for image...).

 Flattening is not used for creating the image, but rather to create
 program images used for saving (e.g., what happens when you use rexxc
 on a program).  If the class in question can show up as part of
 serialized source, then the object variables should always be included
 in the flattening process.

 Rick

 
  Jean-Louis
 
 
  2011/10/26 Rick McGuire object.r...@gmail.com
 
  On Wed, Oct 26, 2011 at 3:45 AM, Jean-Louis Faucher
  jfaucher...@gmail.com wrote:
   I had a crash during GC that I was able to fix by marking the
 attribute
   objectVariables (RexxContextualSource).
   RexxActivation::run : Seems that when a method is guarded, then the
   attribute objectVariables is assigned a value, and this value must be
   protected from GC.
   Most of the exported classes do this marking, except :
   Pointer
   Buffer
   WeakReference
   RexxContext
   StackFrame
   Exception
  
   So I wonder which is the rule to decide if objectVariables must be
   marked ?
   All the classes above have guarded methods, so the same problem as
 mine
   could happen, no ?
 
  Yes, you are absolutely right, all exported classes should be marking
  the object variables.  For the ones you highlighted above, this could
  only become an issue if somebody created a subclass of these classes.
  Since they are not widely used, this apparently has never happened.
  StackFrame and Exception have never been in a released version, but
  the Exception class is definitely intended to be something one would
  subclass.
 
  Rick
 
  
   Jean-Louis
  
  
  
  
  
 --
   The demand for IT networking professionals continues to grow, and the
   demand for specialized networking skills is growing even more rapidly.
   Take a complimentary Learning@Cisco Self-Assessment and learn
   about Cisco certifications, training, and career opportunities.
   http://p.sf.net/sfu/cisco-dev2dev
   ___
   Oorexx-devel mailing list
   Oorexx-devel@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/oorexx-devel
  
  
 
 
 
 --
  The demand for IT networking professionals continues to grow, and the
  demand for specialized networking skills is growing even more rapidly.
  Take a complimentary Learning@Cisco Self-Assessment and learn
  about Cisco certifications, training, and career opportunities.
  http://p.sf.net/sfu/cisco-dev2dev
  ___
  Oorexx-devel mailing list
  Oorexx-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-devel
 
 
 
 --
  The demand for IT networking professionals continues to grow, and the
  demand for specialized networking skills is growing even more rapidly.
  Take a complimentary Learning@Cisco Self-Assessment and learn
  about Cisco certifications, training, and career opportunities.
  http://p.sf.net/sfu/cisco-dev2dev
  ___
  Oorexx-devel mailing list
  Oorexx-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/oorexx-devel
 
 


 --
 The demand for IT networking professionals continues to grow, and the
 demand for specialized networking skills is growing even more rapidly.
 Take a complimentary Learning@Cisco Self-Assessment and learn
 about Cisco certifications, training, and career opportunities.
 http://p.sf.net/sfu/cisco-dev2dev
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] hostemu for windows : missing RexxEntry in the declaration of GrxHost

2011-10-22 Thread Jean-Louis Faucher
Hi David

When using hostemu from ooRexxShell under WinXP, I had sometimes a crash or
corrupted data.
Fixed by changing the declaration of GrxHost to add RexxEntry.

I can commit the changes done in the attached patch file, if you wish.
Since RexxEntry is empty for Unix, I didn't touch unix/hostemu.cpp.

Jean-Louis


hostemu.patch
Description: Binary data
--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] some errors in doc XML files

2011-10-16 Thread Jean-Louis Faucher
Hi Mark, Oliver

I get some errors detected by transformdir.rex.
The doc on the build machine seems ok, so I don't commit and forward the
point for information.

oodguide/chapter2.xml
role=italic
add quotes italic

oodguide/chapter5.xml
linkend=chap05-defimage
add missing slash at the end /

oodguide/chapter6.xml
linkend=chapFour
add missing slash at the end /


oodialog/eventNotification.xml
WheelScrollLines/LINK
lowercase /link


oodialog/utilityclasses.xml
Several occurences of /primarysecondary
where the closing  of primary is missing :
/primarysecondary


and some syntax diagrams that can't be parsed, but that's not a problem for
the moment. I will commit their fixes when close to deliver a release which
use the doc in trunk.

Jean-Louis
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] some errors in doc XML files

2011-10-16 Thread Jean-Louis Faucher
ok, I will commit the fixes that I listed previously.

For the syntax diagrams, most of the time, it's a problem of alignment.
Ex :
PropertySheetDialogs.xml :
in section id=mthInitUpdateListView
in section id=mthNewClsTabOwnerDialog
in section section id=mthTabOwnerSetActive
etc...


Jean-Louis

2011/10/16 Mark Miesfeld miesf...@gmail.com

 Hi Jean-Louis,

 I just built both on Fedora 15 and didn't get any errors.  That's probably
 why the doc on the build machine is okay.  I think David builds the doc on
 Fedora 15.  For some reason these errors are not picked up.
 If you get errors like these, just go ahead and commit a fix if it's not
 too much trouble.  If the build doesn't report errors, its hard for me to
 find them.  grin

 What's the problem with the syntax diagrams?  I think we talked about it
 before but I don't remember the details.

 --
 Mark Miesfeld
 On Sun, Oct 16, 2011 at 10:46 AM, Jean-Louis Faucher 
 jfaucher...@gmail.com wrote:

 Hi Mark, Oliver

 I get some errors detected by transformdir.rex.
 The doc on the build machine seems ok, so I don't commit and forward the
 point for information.

 oodguide/chapter2.xml
 role=italic
 add quotes italic

 oodguide/chapter5.xml
 linkend=chap05-defimage
 add missing slash at the end /

 oodguide/chapter6.xml
 linkend=chapFour
 add missing slash at the end /


 oodialog/eventNotification.xml
 WheelScrollLines/LINK
 lowercase /link


 oodialog/utilityclasses.xml
 Several occurences of /primarysecondary
 where the closing  of primary is missing :
 /primarysecondary


 and some syntax diagrams that can't be parsed, but that's not a problem
 for the moment. I will commit their fixes when close to deliver a release
 which use the doc in trunk.

 Jean-Louis


 --
 All the data continuously generated in your IT infrastructure contains a
 definitive record of customers, application performance, security
 threats, fraudulent activity and more. Splunk takes this data and makes
 sense of it. Business sense. IT sense. Common sense.
 http://p.sf.net/sfu/splunk-d2d-oct
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel




 --
 All the data continuously generated in your IT infrastructure contains a
 definitive record of customers, application performance, security
 threats, fraudulent activity and more. Splunk takes this data and makes
 sense of it. Business sense. IT sense. Common sense.
 http://p.sf.net/sfu/splunk-d2d-oct
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rxapi abends ...

2011-08-20 Thread Jean-Louis Faucher
 O.K., then one more question: is there a 32-bit debug version of ooRexx
 available somewhere that I should/could use? If not, then for which version
 of ooRexx should I create a debug version: from the trunk, from the 4.1.1
 branch or from 4.1.0 ?

 Well, I think you should definitively build your own debug version :-)
Use the version you plan to use for dbus (4.1.0).
I assume you know what to do :-)

Jean-Louis
--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rxapi abends ...

2011-08-20 Thread Jean-Louis Faucher
You probably have already all what needed to build several versions of
ooRexx. But just in case, I attached files which set environment for 4.1.0
and main (adjust to your own paths).
This is a simplified version of the scripts I use, but they are enough to
build/test.

When you double-clic on one of them (after renaming .txt to .bat), a cmd
shell is opened.
Enter :
cdtrunk
makeorx DEBUG

From here, you can test your scripts.

Jean-Louis
set config=dbg

set src_drv=d:
set oorexx_dir=\local\Rexx\ooRexx
set src_dir=%oorexx_dir%\svn\main\releases\4.1.0\trunk
set doc_dir=%oorexx_dir%\svn\docs\releases\4.1.0

doskey cdtrunk=%src_drv%$Tcd %src_dir%

echo Setting path for running ooRexx ^(%config%^)
set PATH=%src_drv%%src_dir%\Win32%config%;%PATH%

echo Setting path for killer.exe
set PATH=%src_drv%%oorexx_dir%\ooRexx-build-utils-1.0.0-windows;%PATH%

call E:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat x86
set MSVCVER=9.0

set PATH=D:\XSLT\Xalan-C_1_10_0\bin;%PATH%

%comspec% /k title Environment for ooRexx-4.1.0 (%config%)
set config=dbg

set src_drv=d:
set oorexx_dir=\local\Rexx\ooRexx
set src_dir=%oorexx_dir%\svn\main\trunk
set doc_dir=%oorexx_dir%\svn\docs

doskey cdtrunk=%src_drv%$Tcd %src_dir%

echo Setting path for running ooRexx ^(%config%^)
set PATH=%src_drv%%src_dir%\Win32%config%;%PATH%

echo Setting path for killer.exe
set PATH=%src_drv%%oorexx_dir%\ooRexx-build-utils-1.0.0-windows;%PATH%

call E:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat x86
set MSVCVER=9.0

set PATH=D:\XSLT\Xalan-C_1_10_0\bin;%PATH%

%comspec% /k title Environment for ooRexx-main (%config%)
--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] object, class, metaclass... Big picture ?

2011-08-08 Thread Jean-Louis Faucher
I try to understand the underlying model for object, class, metaclass
(source excerpt at the end of the mail). Not easy...

I can't find a suitable definition for the ??? below.

Extracted from rexxref :

5.1.1
The Object class is the root of the class hierarchy.
The instance methods of the Object class are, therefore, available on all
objects.
[JLF] The class methods of the Object class are ???

5.1.2
The Class class is like a factory that produces the factories that produce
objects. It is a subclass of the
Object class.
The instance methods of the Class class are also the class methods of all
classes.
[JLF] The class methods of the Class class are ???

4.1.4
A metaclass is a class you can use to create another class. The only
metaclass that Rexx provides is .Class, the Class class. The Class class is
the metaclass of all the classes Rexx provides. This means that instances of
.Class are themselves classes.
[JLF] The instance methods of a metaclass are ??? : [proposition] the class
methods of all the classes associated to this metaclass.
[JLF] The class methods of a metaclass are ???


What is a scope ? (I see scopes and metaClassScopes in the source excerpt).

Is there any publication that gives a big picture of this data model ?
In particular, I try to put in words the actions done by these methods :
~instanceMethods
~methods
~send


Source excerpt :

ObjectClass.hpp
  class RexxInternalObject : public RexxVirtualBase{
 inline RexxBehaviour *getObjectType() { return behaviour; }
 -
 RexxBehaviour *behaviour; /* the object's behaviour
*/

  class RexxObject : public RexxInternalObject {
 inline RexxBehaviour *behaviourObject() { return this-behaviour; }


RexxBehavious.hpp
 class RexxBehaviour : public RexxInternalObject
 {
   inline RexxTable  *getMethodDictionary()   { return
this-methodDictionary; };
   RexxIdentityTable  *scopes;   /* scopes
table  */
   RexxTable  *methodDictionary;   /* method dictionary
*/
   RexxClass  *owningClass;/* class that created this object
*/
   RexxTable  *instanceMethodDictionary; /* methods added via
SETMETHOD   */


ClassClass.hpp
 class RexxClass : public RexxObject {
RexxTable *classMethodDictionary; // class methods specific to
this class
RexxBehaviour *instanceBehaviour; // instances of this class inherit
this behaviour
RexxTable *instanceMethodDictionary; // methods added to this
class
-
RexxClass *baseClass; // Baseclass of this class
RexxArray *metaClass; // Metaclass of this class
RexxArray *metaClassMethodDictionary; // Metaclass mdict
RexxIdentityTable *metaClassScopes; // Metaclass scopes
-
RexxArray *classSuperClasses; // The superclass and any
inherited mixins for class behaviour
RexxArray *instanceSuperClasses; // The superclass and any
inherited mixins for instance behaviour
-
RexxList  *subClasses; // our list of weak referenced
subclasses


Jean Louis
--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos  much more. Register early  save!
http://p.sf.net/sfu/rim-blackberry-1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] object, class, metaclass... Big picture ?

2011-08-08 Thread Jean-Louis Faucher
Thanks a lot Rony !

About ~send, I was focusing on the search order for method selection, and I
found the answer in rexxref 4.2.5.
There is no reference to metaclass there, so I assume that the methods of a
metaclass are not visible from an object.

Honestly, I can't say it's still very clear for the distinction
class/metaclass. I thought that a metaclass was the class of a class, but
this is not the case in the internal model.

(All the details in the attached file...)

RexxClass is a RexxObject. As such, it inherits the attribute 'behaviour'
which is used for : ~class, ~instanceMethod, ~instanceMethods, ~setMethod,
~unsetMethod
Though this behaviour, I can get the class of a RexxClass.

But RexxClass has also an attribute 'metaClass' which is an array of
RexxClass.

The other attributes for which it's not clear are :
scopes
classMethodDictionary (~!DEFINE_CLASS_METHOD)
metaClassMethodDictionary
metaClassScopes

Jean-Louis

2011/8/8 Rony G. Flatscher rony.flatsc...@wu-wien.ac.at

 **
 Hi Jean-Louis,

 overlooked the send question: in ooRexx the defined methods and the
 messages (represented by the tilde/twiddle/~) are represented in their own
 ooRexx classes.

 So if in a Rexx program the ~ is encountered a message object (an
 instance of the class Message) is created. However, the creation of a
 message does not yet cause that message to be dispatched to the object. In
 order to dispatch a message object (which actually carries out the message)
 one has to send it either the mssage send or start.

- Using the send method causes the execution to halt until the
message has been carried out in full and allows one to fetch directly a
result value, if any.
- Using the start method cuases the execution to go on, the message
is carried out concurrently and returns an object, which can be 
 interrogated
for the status of the asynchroneous execution of the started message.
Eventually, when the asynchroneous message finished, one can learn that and
even fetch the result.

 Cf. the reference documentation of the class Message.

 HTH,

 ---rony



 On 08.08.2011 11:39, Rony G. Flatscher wrote:

 Hi Jean-Louis,

 it seems that Rick is currently not online, so I try to give some shots,
 hoping they may help a little bit.

 [One problem in OO is the terminology, which sometimes comes into ones way
 (instead of clarifying concepts, sometimes they obfuscate them,
 unfortunately). There are quite a few synonyms, like object == instance
 == value etc. or class == type etc.]

 On 08.08.2011 10:23, Jean-Louis Faucher wrote:

 I try to understand the underlying model for object, class, metaclass
 (source excerpt at the end of the mail). Not easy...


 ooRexx has been quite influenced by Smalltalk, so some of the concepts are
 directly from there.

 In general there are no class methods!
 (This means among other things that all methods are instance methods!)
 :)

 ---

- There is simply a class that allows one to define methods and
attributes the methods of a class can have direct access to.
 - A 'method is a function/procedure that is only available for
   instances of the class in which the methods are defined.
- An object is just an instance of a class. The object possesses the
functionality/behaviour of the methods of its class.
 - There is a class hierarchy which is used when method resolution
takes place with the concept that all methods (not attributes!) of all the
superclasses (shortest path to root class) get inherited. (This is also the
area where scope becomes important w.r.t. method resolution, but also 
 access
to attributes, i.e. concurrency issues and the like.)
 - The class hierarchy allows an object to have more methods
   (functionality/behaviour) than defined in its own class, by means of
   inheritance.
- The root of a class hierarchy is usually calld Object, which is a
class, as it defines methods. As all other classes in ooRexx are derived
directly (by default) or indirectly from this root class, its methods
(functionality/behaviour) is inherited by all other classes (and its
instances)!

 ---

 In dynamic languages the class definitions (the name, the methods) are
 represented in objects as well. The class used for creating objects that
 keep the definition of a class in ooRexx (and many other languages) is
 called Class. As instances of this class describe the structure and
 behaviour of individual classes the term metaclass is used for it. So the
 ooRexx class Class is the metaclass of ooRexx. Of course, if one
 subclasses Class it inherits all abilities of Class and as such keeps on
 being able to maintain the definition of classes. An instance of Class or
 one of its subclasses (hence of any metaclass) is called class object.

 The instance methods of metaclasses (i.e. class objects) are called
 class methods, indicating that these methods belong to the class object.

 ---

 When ooRexx

Re: [Oorexx-devel] Explicitly listed methods, multiple inheritance possible with metaclasses as well (Re: object, class, metaclass... Big picture ?

2011-08-08 Thread Jean-Louis Faucher
Rony,

Thanks again for this overview.
In fact, in place of the ???, I was searching for a sentence which explains
the impacts (or consequences), like it's done for the instance methods below
:

5.1.1
The Object class is the root of the class hierarchy.
The instance methods of the Object class are, therefore, available on all
objects.
[JLF] The class methods of the Object class are ??? a sentence which
summarizes the impacts.

I try to make a mental model of ooRexx internals...
Something that would be similar to :
http://www.iam.unibe.ch/~ducasse/Teaching/Archives/STOBJ/allPapers.pdf
See section 2 The ObjVlisp model on 3rd page. There is a set of definitions,
and I just try to write similar postulates for ooRexx... I can't say that I
understand all the subtleties of ObjVlisp :-) And the situation is currently
the same for ooRexx, but trying to describe in plain words the ooRexx model
should help me to understand better.


Jean Louis

2011/8/8 Rony G. Flatscher rony.flatsc...@wu-wien.ac.at

 **
 Hi Jean-Louis,

 totally overlooked your original questions related to the reference
 documentations:

 On 08.08.2011 10:23, Jean-Louis Faucher wrote:

 I can't find a suitable definition for the ??? below.

 Extracted from rexxref :

 5.1.1
 The Object class is the root of the class hierarchy.
 The instance methods of the Object class are, therefore, available on all
 objects.
 [JLF] The class methods of the Object class are ???

 All methods of the class Class: =, \=, ==, \==, , ,
 baseClass, defaultName, define, delete, enhanced, hashcode,
 id, inherit, isSubclassOf, metaClass, method, methods,
 mixinClass, new, queryMixinClass, subClass, subClasses,
 superClass, superClasses, uninherit.

 Plus all methods of the root class Object via inheritance.

 5.1.2
 The Class class is like a factory that produces the factories that produce
 objects. It is a subclass of the
 Object class.
 The instance methods of the Class class are also the class methods of all
 classes.
 [JLF] The class methods of the Class class are ???

 All methods of the class Class: =, \=, ==, \==, , ,
 baseClass, defaultName, define, delete, enhanced, hashcode,
 id, inherit, isSubclassOf, metaClass, method, methods,
 mixinClass, new, queryMixinClass, subClass, subClasses,
 superClass, superClasses, uninherit.

 Plus all methods of the root class Object via inheritance.

 4.1.4
 A metaclass is a class you can use to create another class. The only
 metaclass that Rexx provides is .Class, the Class class. The Class class is
 the metaclass of all the classes Rexx provides. This means that instances of
 .Class are themselves classes.
 [JLF] The instance methods of a metaclass are ??? : [proposition] the class
 methods of all the classes associated to this metaclass.

 All methods of the class Class: =, \=, ==, \==, , ,
 baseClass, defaultName, define, delete, enhanced, hashcode,
 id, inherit, isSubclassOf, metaClass, method, methods,
 mixinClass, new, queryMixinClass, subClass, subClasses,
 superClass, superClasses, uninherit.

 Plus all methods of the root class Object via inheritance.

 ---

 If you think about a metaclass you defined yourself, that needs to be a
 subclass of .Class, then:

 All methods you defined.

 Plus all methods of all superclasses, among them all instance methods of
 the class Class via inheritance: =, \=, ==, \==, , ,
 baseClass, defaultName, define, delete, enhanced, hashcode,
 id, inherit, isSubclassOf, metaClass, method, methods,
 mixinClass, new, queryMixinClass, subClass, subClasses,
 superClass, superClasses, uninherit.

 Plus all methods of the root class Object via inheritance.

 [JLF] The class methods of a metaclass are ???

 All methods of the class Class: =, \=, ==, \==, , ,
 baseClass, defaultName, define, delete, enhanced, hashcode,
 id, inherit, isSubclassOf, metaClass, method, methods,
 mixinClass, new, queryMixinClass, subClass, subClasses,
 superClass, superClasses, uninherit.

 Plus all methods of the root class Object via inheritance.

 ---

 If you think about a metaclass you defined yourself, that needs to be a
 subclass of .Class, then:

 All methods you defined with the subkeyword class.

 Plus all class methods of all superclasses, among them all methods of the
 class Class via inheritance: =, \=, ==, \==, , ,
 baseClass, defaultName, define, delete, enhanced, hashcode,
 id, inherit, isSubclassOf, metaClass, method, methods,
 mixinClass, new, queryMixinClass, subClass, subClasses,
 superClass, superClasses, uninherit.

 Plus all methods of the root class Object via inheritance.

 ---

 You could look at the methods interactively, e.g. with rgf_util2.rgf in
 rexxtry sessions resp. your shell:

 call rgf_util2.rex
 call dump2 .class~methods -- lists all methods defined for instances of the
 class Class, includes inherited methods
 call dump2 .class~methods(.class) -- lists all methods defined for
 instances of the class Class only
 call dump2 .class~methods(.object) -- lists all methods defined

Re: [Oorexx-devel] Explicitly listed methods, multiple inheritance possible with metaclasses as well (Re: object, class, metaclass... Big picture ?

2011-08-08 Thread Jean-Louis Faucher
Rick

That's *exactly* what I was looking for ! Now I have to read that at least
10 times to make it enter in my mind :-). But that will help greatly to read
the code.

Jean-Louis

2011/8/8 Rick McGuire object.r...@gmail.com

 A metaclass has one very important distinction:  The NEW method of a
 metaclass MUST return a class object, not some other sort of object.
 It is a factory for making class objects used to build new classes.

 The processing goes something like this:

 1)  Send a NEW message to the metaclass to create a new class object
 instance.  This object will implement some number of methods directly
 just be virtue of being an object.  These are the class object's
 instance methods, but since it is a class object, they are frequently
 referred to as class methods.  It also has an internal dictionary
 which are the methods that will be given to its instances when they
 are created.  These are the methods that are frequently referred to as
 instance methods.  Typically, the metaclass is just the Class class.

 2)  Give the two dictionaries above (I'll refer to them as the class
 method dictionary and the instance method dictionary from here on), a
 merging process then takes place to create the new class object.  Each
 of these dictionaries are merged with the following:

a)  The class and instance method dictionaries from the superclass.
b)  The class and instance method dictionaries from each of the
 inherited mixin classes
c)  The additional methods defined by the directories.  The
 methods tagged with the CLASS keyword are added to the class
 dictionary, the regular methods are added to the instance
 dictionary.

 A lot of the metaclass processing was driven by the since removed SOM
 support.  On an import, a SOM metaclass object was used to retrieve
 the methods associated with the imported SOM class.  I believe that
 the SOM support was the reason the metaclasses array exists.  I think
 the SOM object model allowed for multiple metaclasses.  It has been a
 long time and I never was directly involved with the SOM support in
 the first place.

 Contrary to Rony's assertions, I was not the original implementer of
 this particular bit of code.  One of the few portions of the runtime
 where this isn't the case.  I generally find I have to carefully read
 through what's going on every time I need to touch that area, and
 there are a few things I found a bit strange about it, but have not
 had a good reason to do a major cleanup pass, particularly since this
 is an area that has tended to be pretty sensitive to changes.

 Rick

 On Mon, Aug 8, 2011 at 10:35 AM, Rony G. Flatscher
 rony.flatsc...@wu-wien.ac.at wrote:
  Hi Jean-Louis,
 
  totally overlooked your original questions related to the reference
  documentations:
 
  On 08.08.2011 10:23, Jean-Louis Faucher wrote:
 
  I can't find a suitable definition for the ??? below.
 
  Extracted from rexxref :
 
  5.1.1
  The Object class is the root of the class hierarchy.
  The instance methods of the Object class are, therefore, available on all
  objects.
  [JLF] The class methods of the Object class are ???
 
  All methods of the class Class: =, \=, ==, \==, , ,
  baseClass, defaultName, define, delete, enhanced, hashcode,
  id, inherit, isSubclassOf, metaClass, method, methods,
  mixinClass, new, queryMixinClass, subClass, subClasses,
  superClass, superClasses, uninherit.
 
  Plus all methods of the root class Object via inheritance.
 
  5.1.2
  The Class class is like a factory that produces the factories that
 produce
  objects. It is a subclass of the
  Object class.
  The instance methods of the Class class are also the class methods of all
  classes.
  [JLF] The class methods of the Class class are ???
 
  All methods of the class Class: =, \=, ==, \==, , ,
  baseClass, defaultName, define, delete, enhanced, hashcode,
  id, inherit, isSubclassOf, metaClass, method, methods,
  mixinClass, new, queryMixinClass, subClass, subClasses,
  superClass, superClasses, uninherit.
 
  Plus all methods of the root class Object via inheritance.
 
  4.1.4
  A metaclass is a class you can use to create another class. The only
  metaclass that Rexx provides is .Class, the Class class. The Class class
 is
  the metaclass of all the classes Rexx provides. This means that instances
 of
  .Class are themselves classes.
  [JLF] The instance methods of a metaclass are ??? : [proposition] the
 class
  methods of all the classes associated to this metaclass.
 
  All methods of the class Class: =, \=, ==, \==, , ,
  baseClass, defaultName, define, delete, enhanced, hashcode,
  id, inherit, isSubclassOf, metaClass, method, methods,
  mixinClass, new, queryMixinClass, subClass, subClasses,
  superClass, superClasses, uninherit.
 
  Plus all methods of the root class Object via inheritance.
 
  ---
 
  If you think about a metaclass you defined yourself, that needs to be a
  subclass of .Class, then:
 
  All methods you defined.
 
  Plus all methods

Re: [Oorexx-devel] Remove trailing whitespace before commits

2011-08-08 Thread Jean-Louis Faucher
Trailing white spaces happens with Jedit (I use it under Windows for XML
files and rexx files).
So I suppose I'm one of the commiters to blame :-)
I made a quick search and see two ways to eliminate them :
- edit/indent/remove trailing whitespace (must select all before), to do
before a save.
- use plugin whitespace : better since automatic (requires jedit = 4.3)

I use jedit 4.2 so will have to upgrade...

Jean-Louis


2011/8/8 Mark Miesfeld miesf...@gmail.com

 On Mon, Aug 8, 2011 at 1:18 PM, Rony G. Flatscher
 rony.flatsc...@wu-wien.ac.at wrote:

  If a script would take automatically take care of stripping off
  whitespace, then no one is forced to configure his editor to do that
  automatically.
 
  AFAIK subversion/svn allows for defining hook scripts.

 It does allow hook scripts, but that is not much use here because it
 won't work well.  Or is at least is advised against.

 Pre-commit hooks can only be used to prevent a transaction, they can
 not modify the transaction.

 A post-commit hook that removed the whitespace would then require a
 second commit.  I've seen this advised against, although I guess that
 could come down to individual like or dislike.  It would certainly
 leave the committer's file out of sync with the repository immediately
 after the commit.  I personally would rather configure my editor than
 deal with that.  grin

 Most cooperative projects I've looked at, require the programmer to
 conform to the style guidelines, if they have them, rather than
 changing code after it is committed.

 --
 Mark Miesfeld


 --
 BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
 The must-attend event for mobile developers. Connect with experts.
 Get tools for creating Super Apps. See the latest technologies.
 Sessions, hands-on labs, demos  much more. Register early  save!
 http://p.sf.net/sfu/rim-blackberry-1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos  much more. Register early  save!
http://p.sf.net/sfu/rim-blackberry-1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RexxSetHalt()

2011-08-06 Thread Jean-Louis Faucher
I see two reasons to return RXARI_NOT_FOUND from RexxSetHalt :
either the interpreter is not started (not your case)
or the threadid parameter is not registered with a RexxActivity
(the procid parameter is not used)

0 is not a good value for threadid (I saw this value in one of your next
mails).

Jean-Louis

2011/8/3 Rony G. Flatscher rony.flatsc...@wu-wien.ac.at

 **
 When issuing a RexxSetHalt() to halt all Rexx threads with

 size_t res=RexxSetHalt(getpid(), (pthread_t) 0);



  the result is 1, which according to rexxpg.pdf means:RXARI_NOT_FOUND 1
 The target Rexx procedure was not found..

 The documentation reads:

 10.10.1.1. RexxSetHalt

 RexxSetHalt raises a HALT condition in a running Rexx program.


 retc = RexxSetHalt(ProcessId, ThreadId);


 10.10.1.1.1. Parameters

 ProcessId (process_id_t) - input
is the process ID of the target Rexx procedure. ProcessId is the
 application process that called the
RexxStart function.

 ThreadId (thread_id_t) - input
is the thread ID of the target Rexx procedure. ThreadId is the
 application thread that called the
RexxStart function. If ThreadId=0, all the threads of the process are
 canceled.

 10.10.1.1.2. Return Codes

 RXARI_OK 0 The function completed successfully.
 RXARI_NOT_FOUND 1 The target Rexx procedure was not found.
 RXARI_PROCESSING_ERROR 2 A failure in Rexx processing occurred.

 10.10.1.1.3. Remarks

 This call is not processed if the target Rexx program is running with the
 RXHLT exit enabled.

 ---

 RexxSetHalt() is issued on another thread than the one that issued
 RexxStart(), but in the same process, of course.

 Is the ProcessId-related documentaiton wrong? Should it read thread
 instead of application process or is the API wrong or is there another
 reason one would get 1 as a result?

 ---rony



 --
 BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
 The must-attend event for mobile developers. Connect with experts.
 Get tools for creating Super Apps. See the latest technologies.
 Sessions, hands-on labs, demos  much more. Register early  save!
 http://p.sf.net/sfu/rim-blackberry-1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos  much more. Register early  save!
http://p.sf.net/sfu/rim-blackberry-1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Howto end a Rexx interpreter instance in the following scenario ?

2011-08-06 Thread Jean-Louis Faucher
Could it be what you need ?

context-Halt
Raise a HALT condition on all threads associated with the interpreter
instance

Jean-Louis

2011/8/3 Rony G. Flatscher rony.flatsc...@wu-wien.ac.at

 **
 The aforementioned Rexx server use case can be changed to be ended: if one
 ends the main thread (by not issuing a SysSleep() or doing a parse pull) and
 the message loop thread is running, then once the message loop thread ends
 (e.g. because of a Rexx condition, but also for other reasons) the program
 ends altogether.

 ---rony




 On 03.08.2011 20:53, Rony G. Flatscher wrote:

 The following scenario (a Rexx object running in the role of a server):

- a Rexx program gets started, serving as a server, dispatching
messages from clients
 - creates a message loop on a separate thread, dispatching messages
   from client
- either calls SysSleep(someTime) or does parse pull x to keep
the Rexx program alive

 Now, whenever a syntax error occurs while a Rexx message gets dispatched on
 the message loop thread (maybe even on another thread), it is not noticed by
 the main thread, it seems.

 In the message loop thread the Rexx condition causes it to be stopped and
 the message-loop thread goes away.

 However the main Rexx thread (either in SysSleep() or parse pull x)
 keeps on running, it seems.

 As reported in a previous message, RexxSetHalt(processId,0) returns 1
 and does not work for ending all Rexx threads from the message loop thread,
 which knows that the state of the Rexx server application has become
 unstable, because of the syntax error that occurred on one of its
 dispatches.

 ---

 How is one able to end the threads of a Rexx interpreter instance?

 ---rony




 --
 BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
 The must-attend event for mobile developers. Connect with experts.
 Get tools for creating Super Apps. See the latest technologies.
 Sessions, hands-on labs, demos  much more. Register early  save!
 http://p.sf.net/sfu/rim-blackberry-1
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos  much more. Register early  save!
http://p.sf.net/sfu/rim-blackberry-1___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Scope of a security manager ?

2011-07-11 Thread Jean-Louis Faucher
I implement a (toy) profiler using a security manager to intercept messages
sent to methods.
Currently, I assign the security manager to the method I want to profile
(i.e. monitor the call stack, the call count and the duration)

A security manager can be assigned to a package, a method, a routine
What is the difference between the three ? Not clear to me how/when the
security manager is called, depending on the object it's assigned to...

Jean-Louis
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Scope of a security manager ?

2011-07-11 Thread Jean-Louis Faucher
Thanks Rick

2011/7/11 Rick McGuire object.r...@gmail.com

 Setting the security manager on a method or routine sets the manager
 for the entire package.  This is the way it worked before the concept
 of a package was exposed in 4.0, so it works a little awkwardly.  Had
 the package concept been there from the beginning, that would have
 been the only method exposed for doing this.

 That's clear.
But I still don't understand how a security manager is selected during
program execution...
Using my profiler, I see cross-package calls of methods, which is good.
But the profiler (a security manager which defines the METHOD checkpoint) is
assigned to one package only (pipe.rex) :

pipe_test.rex requires pipe_extension.cls
pipe_extensions.cls requires pipe.rex
pipe.rex (has security manager)

so, if the scope was limited to the package pipe.rex, only the messages sent
to methods defined in pipe.rex should be intercepted, but this is not the
case...

Jean-Louis
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Scope of a security manager ?

2011-07-11 Thread Jean-Louis Faucher
ok, now it's clear...
All the calls start from pipeStage~go, and this method is defined in
pipe.rex.

Thanks !

Jean-Louis
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] How to portably convert between 8-bit and UTF-8 and vice versa

2011-07-04 Thread Jean-Louis Faucher
Hi Rony


2011/7/4 Rony G. Flatscher rony.flatsc...@wu-wien.ac.at

 Hi there,

 in the process of creating an external ooRexx function library, I have
 sometimes to transport strings as UTF-8, even if non-7-Bit-ASCII
 characters are part of it (for non-English characters).


If you need only to transport utf-8 strings, then  strcpy and strlen should
do the work. You will work on bytes, not on characters.
If you need to work on characters, and search for a lightweight library,
then http://utfcpp.sourceforge.net/ may help. But your request was not on
that :-)


 Ist there a simple/easy way in C++ how one could create UTF-8 strings
 from 8-Bit-Strings and convert UTF-8 to 8-Bit-Strings, such that that
 code compiles for Windows as well as for gcc on the other platforms ?

 That's more complicated... ICU supports plenty of character sets, but it's
big.
See also the library Glib used by GTK :
http://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html.
If your 8-bit string is always encoded in the current locale encoding (C
runtime), then functions like
g_locale_to_utf8 ()
g_locale_from_utf8 ()
from Glib are what you need.

Jean-Louis
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Intermittent failure

2011-06-12 Thread Jean-Louis Faucher
Hi Mike

2011/6/12 Mike Cowlishaw m...@speleotrove.com

 Unfortunately the Windows C++ I have doesn't seem to have the 'start
 debugger on
 exception' feature that previous versions had :-(.  But it might help
 having the
 symbols etc.


That reminds me a similar problem I had with Visual C++ 2010 Express : no
attach to process...
In fact, it was available only if
Tools/Settings/Expert Settings
was selected.

Don't know if you use this tool, but I forward the info, just in case...

Jean-Louis
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Intermittent failure

2011-06-12 Thread Jean-Louis Faucher


  Interesting .. I have Express 2008 and it doesn't seem to have that.  Time
 to upgrade   thanks!

 Mike

 I remember that Express 2008 had the attach to process...
So don't upgrade only for that :-)

Jean-Louis
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Intermittent failure

2011-06-12 Thread Jean-Louis Faucher


  Not sure what you mean by 'attach to process'?


 With the menu Debug/Attach to process
you can select a running process from a list, and when a breakpoint is
reached, the process is stopped on this breakpoint.
In your case, when the exception is triggered, you should have the call
stack in the debugger. And if you are running the debug version of ooRexx,
then you should see the symbolic names.

Jean-Louis
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Reply in routines, possible ? (Re: Reply in native method ?

2011-06-05 Thread Jean-Louis Faucher
Hi Rony

2011/6/5 Rony G. Flatscher rony.flatsc...@wu-wien.ac.at

 would it be possible to have the REPLY keyword statement for routines?

 If I remove the test context-inMethod() then reply *seems* to work from a
::routine (tested with a tiny script).
But this is not a proof that it would work all the times.
It crashes when called from an internal routine.


 There are quite a few cases, where using routines and multithreading
 would seem to be easier to comprehend and to apply, if REPLY was
 available for routines.

 A good old class method is almost as simple as a ::routine. I don't see any
gain of functionality if we allow to reply from a ::routine, unless we allow
also to expose some variables from a ::routine.

[digression]

Instructions that can be called only from methods :

expose : I still don't understand why it's not possible to expose variables
from a ::routine...
If we do a relation with
- anonymous inline functions (often called lambda or block),
- outer environment (the variables used by the lambda, which are not
parameters),
- and closure (which is the outer environment which remains associated to
the lambda, even when the lambda is called outside the definer's scope),
then the exposed variables would be the variables to retain in the closure.
Most of the languages don't require to declare the variables to capture, but
C++ lets *optionally* declare them, and that remind me the functionality of
our expose :
- c++
std::vectorint some_list;
int total = 0;
std::for_each(some_list.begin(), some_list.end(), [total](int x) { total +=
x; });
- oorexx (with extensions)
some_list = .array~of..
total = 0
some_list~each([expose total; total += arg(1)])
-
C++ lets capture a variable by value or by reference. In ooRexx, expose is
always by reference, right ? Currently, only internal procedures allow to
expose variables, but internal procedures can't be manipulated like
routines...
In the example above, there is a need of closure, because the lambda is
called in the context of the 'each' method, which is not the context of the
definer (i.e. 'each' does not - and could not - expose the 'total'
variable).


forward : nothing to say


guard : in relation with the object variables dictionary (ovd). I don't know
if the routines have a similar concept like caller variables dictionary (cvd
?). And I don't know if that would make sense to manage synchronisation on
this cvd. Probably yes, synchronisation would be necessary if we allow
- reply and expose in ::routine
- expose and closure (even if no reply in ::routine, because thanks to the
closure, a routine can be passed as argument to methods which reply, and
then call the routine which will access to the exposed variable of the
closure).

reply : already discussed

Jean-Louis
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 ___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] About SockGetHostByAddr question for AIX 6.1

2011-03-14 Thread Jean-Louis Faucher
Hi Rainer

2011/3/14 Rainer Tammer tam...@tammer.net

  Hello,
 I changed the extension a bit:

 I think that this version should be better.
 Comments??


Looks good to me.  I see a similar code in PHP sources,so...
Let's hope that will solve the problem :-)

Regards
Jean-Louis
--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] deadlock... why ?

2011-03-14 Thread Jean-Louis Faucher
Hi

Still learning about concurrency in ooRexx...
Why do I have a deadlock in the green line if I remove the yellow line ?

Before the green line, I do guard off. So the yellow line should not have an
impact on the green line...
It seems that the lock is reacquired by guard on, even if the condition is
not true...

--
c1 = .c~new
call syssleep 1
c1~m2 -- wake-up m1
say done

::class C
::method init
expose s
s = 0
reply
guard off -- yellow line
self~m1

::method m1
expose s
guard on
s = 1
guard off
say before guard -- here, no lock
guard on when s  1 -- but here, seems locked while waiting... green
line
say after guard

::method m2
expose s
s = 2
--

Jean-Louis
--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


  1   2   3   >