Re: [Oorexx-devel] External function file search in Ubuntu

2012-09-21 Thread Rick McGuire
This is working correctly.  The function name uses normal Rexx rules for
name resolution.  If the call name is coded as a symbol, then the name
being called is ALWAYS the uppercase version, since all symbols have as an
eventual value the uppercase value of the symbol.  So calls to foo, Foo,
and FOO are all calls to a function named FOO.  This all happens before
the search for an external function ever begins, so that code is not even
aware of the original case.  The instruction itself has already folded the
name to uppercase by execution time, so the original case is no longer
available.  If a quoted string is used, then the original case is
maintained.

Rick

On Fri, Sep 21, 2012 at 7:03 AM, Jeremy Nicoll - ml sourceforge 
jn.ml.sfrg...@letterboxes.org wrote:

 There's been a long thread in comp.lang.rexx in the last few days from
 someone trying to get external functions to work on an Ubuntu system.

 This was ooREXX 4.1.2

 The user's problem turned out to be due to him making function calls with
 unquoted function names, which were folded to uppercase by oorexx and then
 didn't match the actual file mixed-case leafnames - no surprise there.

 But in the Ref manual section 7.2.1 about file search orders it says

   Unix-based systems have a case sensitive file system, so files
much be exact case matches in order to be located. For these
systems, each time a file name probe is attempted, the name will
be tried in the case specified and also as a lower case name.


 The user did also, he says, try with the external function files named in
 lower case.  You can check that if you want in his news post:

  Date: Thu, 20 Sep 2012 22:08:30 -0400
  From: Cruz, Jaime spamm...@bite.me
  Subject: Re: FINALLY got OOREXX working under Ubuntu!!
  Message-ID: x7wdncqls5acucbnnz2dnuvz_t6dn...@giganews.com

  ...
  Okay, I rebooted, edited out all the SysAddRexxMacro calls,
  then renamed all of the external functions in the directory to
  lower case.  That didn't work.

  Next, I renamed them to all upper case.  BINGO!  That worked!


 I am unable to check this, not having any linux systems.  Can someone-else
 tell if this is a search-order bug, or a documentation error?



 The same user also has been questioning where the .deb-based install he did
 put the oorexx documentation.  Anyone here know?

 --
 Jeremy Nicoll - my opinions are my own


 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] External function file search in Ubuntu

2012-09-21 Thread Jeremy Nicoll - ml sourceforge
Rick McGuire object.r...@gmail.com wrote:

This is working correctly.  The function name uses normal Rexx rules for
name resolution.  If the call name is coded as a symbol, then the name
being called is ALWAYS the uppercase version, since all symbols have as an
eventual value the uppercase value of the symbol.  So calls to foo, Foo,
and FOO are all calls to a function named FOO.  This all happens before
the search for an external function ever begins, so that code is not even
aware of the original case.  The instruction itself has already folded the
name to uppercase by execution time, so the original case is no longer
available.  If a quoted string is used, then the original case is
maintained.

Sure; I wasn't asking that.  Why does the ref manual say that a lower-case
name search will be tried?


-- 
Jeremy Nicoll - my opinions are my own

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] External function file search in Ubuntu

2012-09-21 Thread Rick McGuire
On Fri, Sep 21, 2012 at 7:30 AM, Jeremy Nicoll - ml sourceforge 
jn.ml.sfrg...@letterboxes.org wrote:

 Rick McGuire object.r...@gmail.com wrote:

 This is working correctly.  The function name uses normal Rexx rules for
 name resolution.  If the call name is coded as a symbol, then the name
 being called is ALWAYS the uppercase version, since all symbols have as an
 eventual value the uppercase value of the symbol.  So calls to foo, Foo,
 and FOO are all calls to a function named FOO.  This all happens before
 the search for an external function ever begins, so that code is not even
 aware of the original case.  The instruction itself has already folded the
 name to uppercase by execution time, so the original case is no longer
 available.  If a quoted string is used, then the original case is
 maintained.

 Sure; I wasn't asking that.  Why does the ref manual say that a lower-case
 name search will be tried?


Because it IS part of the search order. But that really only applies to the
searches using file extensions.  This is not done with the raw name
because it resulted in too many false positives with non-rexx programs
(this was actually added at one point, but it had to be backed out).  In
the poster's situation, he's created his files without extensions, so only
the matching case is used.  If he renamed them to have a .rex extension,
then there is much less case insensitivity involved.

Rick


 --
 Jeremy Nicoll - my opinions are my own


 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] External function file search in Ubuntu

2012-09-21 Thread Jeremy Nicoll - ml sourceforge
Rick McGuire object.r...@gmail.com wrote:

 Because it IS part of the search order. But that really only applies to
 the searches using file extensions.  This is not done with the raw name
 because it resulted in too many false positives with non-rexx programs
 (this was actually added at one point, but it had to be backed out).  In
 the poster's situation, he's created his files without extensions, so only
 the matching case is used.  If he renamed them to have a .rex extension,
 then there is much less case insensitivity involved.

Ok, that makes sense.  I've raised a Documentation bug (hopefully correctly,
I don't understand te new ticketing software), so maybe someone can clarify
this in future manuals.


Separately from the doc issue, is there any point in making a feature
request that in some way - maybe a trace option? - one could have oorexx
tell you in succession all the places it looked for a specific-named file?
The whole process strikes me as being mind-bogglingly complicated and
although descriptions go some way to describe what's being taken into
account, actually having a clear understanding of precisely which name of
something is being looked for and in what location is ... hard.  I'd like to
see output something like:

   trace Search
   Call NoSuchFunction()

   3 *-*   Call NoSuchFunction()
   'NOSUCHFUNCTION' not found in REXX_PATH
   'NOSUCHFUNCTION' not found in PATH
   'NOSUCHFUNCTION' not found in ...
   'NOSUCHFUNCTION.XYZ' not found ...

etc with whatever details are appropriate, preferably showing the exact case
and file extensions looked for in the order they are tested in.  For things
like search in REXX_PATH or PATH, if the oorexx code itself identifies the
separate directories involved then I'd rather see those enumerated in the
trace output, but if it just uses some system function to search for file x
on path y then the environment var name would be enough detail.

For a function call where the search is successful I think the trace output
shouls also show the location where the item was found. 




-- 
Jeremy Nicoll - my opinions are my own

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel