[Oorexx-devel] Question on New Translate Parameters

2009-05-03 Thread Gil Barmwater
In working on my Symposium presentation on the new stuff in 4.0.0, I 
came across the examples of the new Translate parameters - pos, length. 
  At first, I thought this one - TRANSLATE(abcdef, , , , 2, 3) - 
ABCDEF - must be wrong as I expected the result to be aBCDef but 
then realised that since both tables and pad were omitted, the default 
uppercasing was done and the pos, length parameters were ignored.  OK, 
  a bit surprising but so far, so good.  Then I got to the second 
example of the new parameters - TRANSLATE(4123, abcd, 1234, , 2, 
2) - 1ab4 - and I'm really confused.  Why isn't the result 4ab3, 
i.e. only the second and third characters are translated?
-- 
Gil Barmwater

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Installing from source

2009-05-03 Thread Klaas.
Hi,

  I am trying to get ooRexx 4.0 up on my openSuse
  system.
  Downloaded the source - for all environments.
  Tries to use ./configure as I would expect.
  Nothing.
  After some time and study of older documentation
  (there doesn't seem to be recent doc in the source
   directory) I found the bootstrap file. 
  Apparently all necessary info is generated by
  utilities. During install of autoconf I realised
  that it would probably be much more efficient
  if one of the developers would generate the 
  necessary confihure file and make this available
  for anyone wishing to install from source.

  Is this an option?

greetings,
  Klaas Punt 


--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Some findings on how orxscript works

2009-05-03 Thread Rick McGuire
Ok, I've managed to get a debug 3.2.0 install set up on my system, and
the stuff I'm finding is a bit on the bizarre side.  Essentially all I
did was set break points on all of the methods of orxscript.cpp and
trace all of the calls between the scripting host and the Rexx
scripting engine.  Initially, things look pretty good.  When running
the simpleorexx.wsf sample, the script engine initializes, and is
asked to parse the fragment of ooRexx code in the file that looks like
this:

Say This is GetScriptEngineInfo()
Ver = Accessing the version info from Rexx yields
ScriptEngineMajorVersion().
Ver = Ver||ScriptEngineMinorVersion().ScriptEngineBuildVersion()
Say Ver

WScript~Echo(Done!)


The code for parsing this file is truly strange.  It first calls
RexxStart on a second thread to actually run this code, and uses one
of those private APIs to grab the names of the ::ROUTINES PUBLIC
contained in the file.  These function names are recorded, I believe,
as globally available routines that can be called from other script
contexts.  Then another undocumented API is called to convert this
into a callable script.  This is very strange, but we can accomplish
all of this using the routine/package classes in 4.0.

Then it gets a little strange.  There is a call to the
OrxScript::SetScriptState() method to set the state to UNINITIALIZED.
This has the following comment at the code that is executed.

case SCRIPTSTATE_UNINITIALIZED:
  // IIS (ASP server) sets the engine from STARTED to UNINITIALIZED
  // from what I remember from the documentation, this is ILLEGAL
  // it may be a shortcut way of rerunning a script, but only Microsoft
  // knows exactly what is intended to happen in this scenario
  // returning this error causes the webserver to shut down the engine
  // and create a new instance again...
  hResult = E_UNEXPECTED;
  break;

Well, this does exactly what the comment says it does.  The script
engine instance is shut down, then a second instance is initialized.
This one handles a different sequence of calls.  This time, a number
of calls are made to AddNamedItem() passing in items with names like
WScript.  These are obviously the global objects that the script
host exposes.  Then the ParseScriptText() method is called again to
reparse the same script fragment that was used with the first instance
of the engine.  This time, the fragment is run after being parsed, and
a couple of special (and undocumented exits) come into play.  The
first exit handles NOVALUE events, and will check for items that were
added via AddNamedItem() on references to uninitialized variables.
This is the magic that allows WScript to be a valid variable name when
the script runs.  When the fragment completes, the termination exit is
used to capture all of the variable names and register them as global
names in the environment as well.

I think I need to do some more tracing with a more complicated example
that has multiple fragments so I understand the interactions between
fragments, but this is what I've discovered so far.

Right now, I have some obvious questions:

1)  Is this how the variable model should be handled, or should
imported/exported variables be handled explicitly?  For example,
Rony's suggestion of a .host environment entry might make some sense
rather than using the somewhat strange implicit model.  These variable
names as currently handled appear only visible for the toplevel
fragments, and are not propagated to call ::routines included in the
fragments.  Using the special accessor would allow a single visibility
model.

2) Somewhat related is the question of what variables/routines get
made visible to the outside worldand it would be nice to apply
this to object instances too.  This is really item 1A) really, rather
than a separate item.

Rick

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question on New Translate Parameters

2009-05-03 Thread Rick McGuire
Gil,

This is a category of problem known as a doc bug.  The correct
results for these calls
are aBCDef and 4ab3, as you expected.  Please open a doc tracker for this.

Rick

On Sun, May 3, 2009 at 11:28 AM, Gil Barmwater gbarmwa...@alum.rpi.edu wrote:
 In working on my Symposium presentation on the new stuff in 4.0.0, I
 came across the examples of the new Translate parameters - pos, length.
  At first, I thought this one - TRANSLATE(abcdef, , , , 2, 3) -
 ABCDEF - must be wrong as I expected the result to be aBCDef but
 then realised that since both tables and pad were omitted, the default
 uppercasing was done and the pos, length parameters were ignored.  OK,
  a bit surprising but so far, so good.  Then I got to the second
 example of the new parameters - TRANSLATE(4123, abcd, 1234, , 2,
 2) - 1ab4 - and I'm really confused.  Why isn't the result 4ab3,
 i.e. only the second and third characters are translated?
 --
 Gil Barmwater

 --
 Register Now  Save for Velocity, the Web Performance  Operations
 Conference from O'Reilly Media. Velocity features a full day of
 expert-led, hands-on workshops and two days of sessions from industry
 leaders in dedicated Performance  Operations tracks. Use code vel09scf
 and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Installing from source

2009-05-03 Thread Mark Miesfeld
On Sun, May 3, 2009 at 9:31 AM, Klaas. kpli...@xs4all.nl wrote:

  I am trying to get ooRexx 4.0 up on my openSuse
  system.
  Downloaded the source - for all environments.
  Tries to use ./configure as I would expect.
  Nothing.

Sorry, this is probably my fault.  I've been packaging up the source
tar file for the beta since David has been very busy.  I probably
skipped a step.

I just tarred up the source tree as is, from a fresh checkout.  Now
that I think about it, there is a make target for packaging that I
think also produces a tar file.  That target probably produces what
you want.

I'll fix that later today.

--
Mark Miesfeld

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Installing from source

2009-05-03 Thread Mark Miesfeld
On Sun, May 3, 2009 at 9:31 AM, Klaas. kpli...@xs4all.nl wrote:

  I am trying to get ooRexx 4.0 up on my openSuse
  system.

Until I get the source file package fixed, I'm curious as to why you
don't want to install one of the already built packages for your
openSuse system?

There's nothing wrong with wanting to build yourself, I probably
would.  As I said just curious.

--
Mark Miesfeld

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question on New Translate Parameters

2009-05-03 Thread Gil Barmwater
Will do and thanks for the reassurance that I'm not yet senile!

Rick McGuire wrote:
 Gil,
 
 This is a category of problem known as a doc bug.  The correct
 results for these calls
 are aBCDef and 4ab3, as you expected.  Please open a doc tracker for this.
 
 Rick
 
 On Sun, May 3, 2009 at 11:28 AM, Gil Barmwater gbarmwa...@alum.rpi.edu 
 wrote:
 
In working on my Symposium presentation on the new stuff in 4.0.0, I
came across the examples of the new Translate parameters - pos, length.
 At first, I thought this one - TRANSLATE(abcdef, , , , 2, 3) -
ABCDEF - must be wrong as I expected the result to be aBCDef but
then realised that since both tables and pad were omitted, the default
uppercasing was done and the pos, length parameters were ignored.  OK,
 a bit surprising but so far, so good.  Then I got to the second
example of the new parameters - TRANSLATE(4123, abcd, 1234, , 2,
2) - 1ab4 - and I'm really confused.  Why isn't the result 4ab3,
i.e. only the second and third characters are translated?
--
Gil Barmwater

--
Register Now  Save for Velocity, the Web Performance  Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance  Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

 
 
 --
 Register Now  Save for Velocity, the Web Performance  Operations 
 Conference from O'Reilly Media. Velocity features a full day of 
 expert-led, hands-on workshops and two days of sessions from industry 
 leaders in dedicated Performance  Operations tracks. Use code vel09scf 
 and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel
 

-- 
Gil Barmwater

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Some findings on how orxscript works

2009-05-03 Thread Rony G. Flatscher

 A maybe helpful URL, that contains other interesting links:
 http://en.wikipedia.org/wiki/Windows_Script_Host with a lot of
 interesting downloads
   
Ah, was too quick, here a few more links, which you may know of already:

* http://msdn.microsoft.com/en-us/library/ms950396.aspx: Scripting
  Main Entry point
* http://msdn.microsoft.com/en-us/library/9bbdkx3k(VS.85).aspx
  Windows Script Host Main Entry
* http://msdn.microsoft.com/en-us/library/fdee6589(VS.85).aspx
  Developer's Branch into Windows Script Host (look at all subnodes)

These pointers should give quite a fair overview.

Also, if you download the WSH package (don't have a URL handy) one gets
an installable help-file that not only documents the WSH classes, but
also the COM interfaces defined for Windows script host applications.
(Have a zip-archive someplace.)

---rony

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Installing from source

2009-05-03 Thread Klaas.
Op 03-mei-09 schreef Mark Miesfeld:

On Sun, May 3, 2009 at 9:31 AM, Klaas. kpli...@xs4all.nl wrote:

  I am trying to get ooRexx 4.0 up on my openSuse
  system.

Until I get the source file package fixed, I'm curious as to why you
don't want to install one of the already built packages for your
openSuse system?

Well, my hardware is Mac. I use mostly PPC Macs and one Intel Mac.
On 2 of those I have open Suse installed. On all of those I have
ooRexx 3.2 (both Suse and OS X).

So that's why.

greetings,
  Klaas.  

There's nothing wrong with wanting to build yourself, I probably
would.  As I said just curious.


--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel