Re: [Oorexx-devel] Findings (Re: Question ad native API for creating routine and package objects ...

2019-04-07 Thread Rick McGuire
I was sort of suspecting you might have done that inadvertently, since when
I checked the code, both cases were running the prologs.

Rick

On Sun, Apr 7, 2019 at 8:46 AM Rony G. Flatscher 
wrote:

> On 06.04.2019 22:42, Rick McGuire wrote:
>
>
>
> On Sat, Apr 6, 2019 at 12:00 PM Rony G. Flatscher 
> wrote:
>
>> Findings:
>>
>>- NewRoutine(name,code,sz) and LoadPackageFromData(name,data,sz)
>>behave the same (including not running the prolog code)
>>- both are able to load plain Rexx source code,
>>   - both fail for 'rexxc'-tokenized Rexx code (e.g. loaded from a
>>   file or a database with tokenized Rexx code);
>>   - will therefore file bugs for these two native APIs
>>
>>  - LoadPackage(filename): works for both, source code and
>>tokenized code;
>>- however, unlike LoadPackageFromData() it will run the prolog code
>>   automatically; not sure whether this intentional or a bug
>>
>> LoadPackageFromData() is the bug. The prolog should always be run with
> package loading operations.
>
> While filing a bug, I re-executed the test script once more, just to find
> out today that I would run the LoadPackage() and LoadPackageFromData()
> tests from the same script with the same Rexx program (same names). It
> seems that LoadPackage*() has the requires semantics, such that the prolog
> gets run only the very first time the package gets loaded (and merely
> reused each time a LoadPackage*() gets issued with the same name later).
>
> With other words: LoadPackageFromData() *does* run the prolog code, if the
> Rexx script gets loaded the first time by it! So this works as designed and
> there is no bug there I assume.
>
> ---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] Findings (Re: Question ad native API for creating routine and package objects ...

2019-04-07 Thread Rony G. Flatscher
On 06.04.2019 22:42, Rick McGuire wrote:
>
>
> On Sat, Apr 6, 2019 at 12:00 PM Rony G. Flatscher  > wrote:
>
> Findings:
>
>   * NewRoutine(name,code,sz) and LoadPackageFromData(name,data,sz) behave 
> the same (including
> not running the prolog code)
>   o both are able to load plain Rexx source code,
>   o both fail for 'rexxc'-tokenized Rexx code (e.g. loaded from a 
> file or a database with
> tokenized Rexx code);
>   + will therefore file bugs for these two native APIs
>
>   * LoadPackage(filename): works for both, source code and tokenized code;
>   o however, unlike LoadPackageFromData() it will run the prolog code 
> automatically; not
> sure whether this intentional or a bug
>
> LoadPackageFromData() is the bug. The prolog should always be run with 
> package loading operations.

While filing a bug, I re-executed the test script once more, just to find out 
today that I would run
the LoadPackage() and LoadPackageFromData() tests from the same script with the 
same Rexx program
(same names). It seems that LoadPackage*() has the requires semantics, such 
that the prolog gets run
only the very first time the package gets loaded (and merely reused each time a 
LoadPackage*() gets
issued with the same name later).

With other words: LoadPackageFromData() *does* run the prolog code, if the Rexx 
script gets loaded
the first time by it! So this works as designed and there is no bug there I 
assume.

---rony


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


Re: [Oorexx-devel] Findings (Re: Question ad native API for creating routine and package objects ...

2019-04-06 Thread Rick McGuire
On Sat, Apr 6, 2019 at 12:00 PM Rony G. Flatscher 
wrote:

> Findings:
>
>- NewRoutine(name,code,sz) and LoadPackageFromData(name,data,sz)
>behave the same (including not running the prolog code)
>- both are able to load plain Rexx source code,
>   - both fail for 'rexxc'-tokenized Rexx code (e.g. loaded from a
>   file or a database with tokenized Rexx code);
>   - will therefore file bugs for these two native APIs
>
>  - LoadPackage(filename): works for both, source code and
>tokenized code;
>- however, unlike LoadPackageFromData() it will run the prolog code
>   automatically; not sure whether this intentional or a bug
>
> LoadPackageFromData() is the bug. The prolog should always be run with
package loading operations.

Rick


>
>-
>
> ---rony
>
>
> On 06.04.2019 14:24, Rony G. Flatscher wrote:
>
> On 06.04.2019 14:22, Rick McGuire wrote:
>
> I'd say you should be able to. Whether you can or not is a question for
> some experimentation.
>
> Thank you, will start the experimentations then and report back.
>
> ---rony
>
>
> On Sat, Apr 6, 2019 at 8:13 AM Rony G. Flatscher 
> wrote:
>
>> In the native APIs these methods are available for creating Rexx routine
>> and package objects:
>>
>>1. NewRoutine(name, code, sz), where 'name' and 'code' are of type
>>CSTRING, 'sz' of type size_t
>>   - Question: can 'code' be any representation of a Rexx program,
>>   i.e. can one also supply the tokenized/compiled code?
>>
>>   2. LoadPackage(name), where name is of type CSTRING and denotes
>>the filename
>>
>>
>>- Question: can the file's content be any representation of a Rexx
>>program, i.e. can one also supply the tokenized/compiled code?
>>
>>
>>1. LoadPackageFromData(name,data,sz), where 'name' and 'data' are of
>>type CSTRING, 'sz' of type size_t
>>   - Question: can 'data' be any representation of a Rexx program,
>>   i.e. can one also supply the tokenized/compiled code?
>>
>> ---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


[Oorexx-devel] Findings (Re: Question ad native API for creating routine and package objects ...

2019-04-06 Thread Rony G. Flatscher
Findings:

  * NewRoutine(name,code,sz) and LoadPackageFromData(name,data,sz) behave the 
same (including not
running the prolog code)
  o both are able to load plain Rexx source code,
  o both fail for 'rexxc'-tokenized Rexx code (e.g. loaded from a file or a 
database with
tokenized Rexx code);
  + will therefore file bugs for these two native APIs

  * LoadPackage(filename): works for both, source code and tokenized code;
  o however, unlike LoadPackageFromData() it will run the prolog code 
automatically; not sure
whether this intentional or a bug

---rony


On 06.04.2019 14:24, Rony G. Flatscher wrote:
> On 06.04.2019 14:22, Rick McGuire wrote:
>> I'd say you should be able to. Whether you can or not is a question for some 
>> experimentation.
>
> Thank you, will start the experimentations then and report back.
>
> ---rony
>
>>
>> On Sat, Apr 6, 2019 at 8:13 AM Rony G. Flatscher > > wrote:
>>
>> In the native APIs these methods are available for creating Rexx routine 
>> and package objects:
>>
>>  1. NewRoutine(name, code, sz), where 'name' and 'code' are of type 
>> CSTRING, 'sz' of type size_t
>>   * Question: can 'code' be any representation of a Rexx program, 
>> i.e. can one also
>> supply the tokenized/compiled code?
>>
>>  2. LoadPackage(name), where name is of type CSTRING and denotes the 
>> filename
>>
>>   * Question: can the file's content be any representation of a Rexx 
>> program, i.e. can
>> one also supply the tokenized/compiled code?
>>
>>  1. LoadPackageFromData(name,data,sz), where 'name' and 'data' are of 
>> type CSTRING, 'sz' of
>> type size_t
>>   * Question: can 'data' be any representation of a Rexx program, 
>> i.e. can one also
>> supply the tokenized/compiled code?
>>
>> ---rony
>>

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