NetRexx scripting for jEdit beta release available!

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NetRexx scripting for jEdit beta release available!

Kermit Kiser
The NetRexxScript plugin for jEdit is now feature complete and ready for
beta testing.

Here are the main features:

    * Efficient execution of NetRexx scripts and macros in jEdit
    * Optional caching of parsed scripts to improve performance
    * Option to "preparse" all available scripts as a unit for
      performance (aka "greased lightning mode") and cross-script access
      support
    * Option to suppress or allow trace output
    * Options to execute a currently open NetRexx file including unsaved
      changes
    * Optional dockable console window with command line to run scripts
      with parms and view say output or respond to ask input
    * View say output with or without trace from the console window to
      aid debugging
    * Option to "prefix" scripts automatically adds access to jEdit
      functions and variables
    * Script parse errors are automatically highlighted in script source
      files and listed in the "Error List" as well as displayed in a
      console window
    * User defined "classpath" option for making classes available to
      NetRexx scripts
    * User defined "scriptpath" option for access to scripts outside of
      jEdit macro libraries
    * Support for executing compiled NetRexx scripts or any "main" type
      Java class file as a macro or console command
    * Includes an updated version of the "NetRexx at Once" cross
      reference guide to Java and NetRexx

Here are the distributions:

Binaries -

http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0-bin.zip
http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0-bin.tgz

Binary plus source -

http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.zip
http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.tgz

Help document:

http://kermitkiser.com/NetRexx/Script/NetRexxScript.html

To install, download and unzip a distribution file, copy
NetRexxScript.jar and NetRexxC.jar to your jEdit profile "jars"
directory, then restart jEdit. The jars directory is probably
"C:\Documents and Settings\username\.jedit\jars" on Windows or
"/home/username/.jedit/jars" on Linux.

To verify the install, select Plugins => NetRexxScript => NetRexxScript
to open the console window, dock it at top or bottom, then select Macros
=> NetRexx to run the included sample scripts or just type some NetRexx
in a new edit window and click the "Run current" button in the console.

Please let me know if there are any problems.

-- Kermit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20091031/ff834ece/attachment.html
Reply | Threaded
Open this post in threaded view
|

NetRexx scripting for jEdit beta release available!

Patric Bechtel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kermit Kiser schrieb am 01.11.2009 04:55:
> The NetRexxScript plugin for jEdit is now feature complete and ready for
> beta testing.

[...]

> Binary plus source -
>
> http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.zip
> http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.tgz

Hi Kermit,

thanks for your efforts... it's nice to see some more activities on the
NetRexx community.

One thing, though: the source of the plugin contains a file
"NetRexxScriptPlugin.nrx" which seems to be a binary.
I checked both the tgz and the zip.

Do you have a public repository for the plugin?

Any idea when the NetRexx source will be available from RexxLA.org? I
was discussing that topic with MFC since 2002 already, and still looking
forward to see it happen. We have an impressive source base written in
it, and I would like to fix quite some "quirks" of the language (nothing
serious, though).
We have patched the NetRexxC ant task a bit (again), so together with
jedit, ant and an open sourced NetRexx, that could be a winning team...

tia,

Patric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: GnuPT 2.5.2

iEYEARECAAYFAkr0DFMACgkQfGgGu8y7ypDH0ACdEAi1zM2OsKEeOy2yDBz4zsIK
5BgAoMicedm650C1z2CUKhd7BflE3f4g
=nKDF
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

NetRexx scripting for jEdit beta release available!

rvjansen
Hi Patrick,

it is going to happen. We are clearing that last hurdles.
Please tell me what 'quirks' need fixing, so we can make a list of  
activities to discuss and implement.

best regards,

Ren? Jansen.

On 6 nov 2009, at 07:45, Patric Bechtel wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kermit Kiser schrieb am 01.11.2009 04:55:
>> The NetRexxScript plugin for jEdit is now feature complete and  
>> ready for
>> beta testing.
>
> [...]
>
>> Binary plus source -
>>
>> http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.zip
>> http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.tgz
>
> Hi Kermit,
>
> thanks for your efforts... it's nice to see some more activities on  
> the
> NetRexx community.
>
> One thing, though: the source of the plugin contains a file
> "NetRexxScriptPlugin.nrx" which seems to be a binary.
> I checked both the tgz and the zip.
>
> Do you have a public repository for the plugin?
>
> Any idea when the NetRexx source will be available from RexxLA.org? I
> was discussing that topic with MFC since 2002 already, and still  
> looking
> forward to see it happen. We have an impressive source base written in
> it, and I would like to fix quite some "quirks" of the language  
> (nothing
> serious, though).
> We have patched the NetRexxC ant task a bit (again), so together with
> jedit, ant and an open sourced NetRexx, that could be a winning  
> team...
>
> tia,
>
> Patric
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: GnuPT 2.5.2
>
> iEYEARECAAYFAkr0DFMACgkQfGgGu8y7ypDH0ACdEAi1zM2OsKEeOy2yDBz4zsIK
> 5BgAoMicedm650C1z2CUKhd7BflE3f4g
> =nKDF
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>


Reply | Threaded
Open this post in threaded view
|

NetRexx scripting for jEdit beta release available!

Patric Bechtel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ren? Jansen schrieb am 06.11.2009 13:02:
> Hi Patrick,
>
> it is going to happen. We are clearing that last hurdles.
> Please tell me what 'quirks' need fixing, so we can make a list of
> activities to discuss and implement.

Hi Ren?,

some of the quirks

- - there's a variable declaration in every generated java file like
 private static final java.lang.String $0="<sourcefile.nrx>";
which seems to have no function anymore. Might be that I get it wrong,
but it looks like older javac implementations picked it up as the source
file name, but current ones don't do that anymore.

- - if using optional parameters in methods which have javadocs, the
wrapper methods which supply the default values are inserted between the
javadoc and the "full parameter method", so that javadoc complains about
the javadoc mentioning parameters which are not there. Would be nice if,
aside fixing this, the wrapper methods could have some javadoc about the
supplied default values, too.

- - take this sample:
class foo
   method app(a=char) static
      say 'chose char version' a
   method app(a=String) static
      say 'chose String version' a
   method main(a=String[]) static public
      app("x")
      app("xx")

works, and gives, like expected the messages:
chose char version x
chose String version xx

after commenting out the char version, program still compiles, and gives
messages:
chose String version x
chose String version xx

then (char version still commented out), after changing app(a=String) to
app(a=Object), it will refuse to compile, because:
Error: The method 'app(char)' cannot be found in class 'foo' or a superclass

So, after promoting the single character String/Rexx to a char, it
cannot use the object signature anymore, seemingly. But that's only one
of the problems in there.

- - try to compile this:
options strictcase binary strictsignal strictargs

class MethodResolutionBug
   properties constant
      EBR=Rexx " of the emergency broadcast system in "
      NR=Long(2007)

   method main(args=String[]) public static signals IOException,-
      FileNotFoundException,UnsupportedEncodingException

      sb=StringBuilder('test')
      sb.insert(0,'This is a ')
      sb.append(EBR)
      sb.append(NR)
      say sb.toString()

      sb=StringBuilder()
      buf=char[4096]
      fr=InputStreamReader(-
         FileInputStream('MethodResolutionBug.nrx'),'ISO-8859-1')
      loop forever
         read=fr.read(buf)
         if read=-1 then leave
         sb.append(buf,0,read)
      finally
         fr.close()
         end

      ow=OutputStreamWriter(-
         FileOutputStream('t1.nrx'),'UTF-8')
      do
         ow.write('test')
      finally
         ow.close()
         end

a similar class in java works perfectly. It demonstrated quite some
problems in the method resolution of NetRexx.
I will explain in detail:
  sb=StringBuilder()

  buf=char[4096]
  sb.append(buf,0,4096)
  -- Error: More than one method matches the name and signature
  -- 'java.lang.StringBuilder.append(char[],byte,short)'

  sb.insert(0,'bla')
  -- Error: More than one method matches the name and signature
  -- 'java.lang.StringBuilder.insert(byte,java.lang.String)'
  -- no workaround yet for that one.

  sb.append('bla'.strip())
  -- Error: More than one method matches the name and signature
  -- 'java.lang.StringBuilder.append(netrexx.lang.Rexx)'
  sb.append(String 'bla'.strip())
  -- that one works.

- - loop o over hashtableOfOs
I think the shortcomings of that one are well known - hashtableOfOs has
to be a dictionary, it doesn't know anything about collections and such.
This is actually three things to do:
  - make "loop over" aware of collections and iterators
  - provide a syntax to avoid the casting, like
      loop Type o over Collection
  - put some information about the collection element types,
    like generics or such (though I know that complete generics support
    might be a long term goal).

- - Handling of BigDecimals in binary mode as native BigDecimals
Rexx does not support the full functionality of BigDecimals, and
interfacing with java libraries using BigDecimals is a pain. Anyways,
MFC worked with in the implementation of BigDecimals in Java, why not
have NetRexx use them directly?

- - a no-dependency-complain mode for NetRexx, or a stub generator mode.
Just try to mix Java, Groovy and NetRexx (Scala anyone?) into one
package and have them mutually depend on each other.
Groovy and Scala have methods to generate stub java files which makes
the following possible:
- - generate stub Groovy, Scala and NetRexx files as .java
- - call javac
- - call Groovy, Scala and NetRexx compilers to generate the 'real' code.
We have customers, which need to extend classes we generate
automatically in NetRexx, and some want to use Scala, Groovy or plain
Java to extend it. Which doesn't work, currently.

- - the current source code of an indirect property "bla" is a follows:
  public java.lang.String getBla(){return bla;}
  public void setBla(java.lang.String $61){bla=$61;return;}
which looks ugly in the docs, too, because the $61 shows up as parameter
name. In Java, we could easily do
  public void setBla(java.lang.String bla){this.bla=bla;}

- - NetRexxC adds a static private $0 variable into interfaces, too, which
is not accessible by anyone. No code ever will execute this... but some
static code analyzers complain about it. And it appears in the docs.

- - try this:
options strictcase binary strictargs

import javax.sound.sampled.AudioSystem
import javax.sound.sampled.Clip
import javax.sound.sampled.DataLine

clipFile=File('test.wav')
audioInputStream=AudioSystem.getAudioInputStream(clipFile)
audioFormat=audioInputStream.getFormat()
info=DataLine.Info(Clip.class, audioFormat)

 10 +++ info=DataLine.Info(Clip.class, audioFormat)
    +++               ^^^^
    +++ Error: The class 'DataLine.Info' is not a dependent class, so it
cannot be constructed in the context of a parent object
Compilation of 'soundtest.nrx' failed [one error]

this error message is nonsense. It's no dependent class, so it *can* be
constructed. I had to write this piece of code in Java, as I couldn't
find a workaround for that.


- - unify the docs into one (no supp et al)


- - make the interpreter work without classpath env variable, but only
through getResource(). Maybe even without that.


- - create an AST API similar to the GroovyAST one to extend the compiler
further (additional annotations et al)

- - annotations?

- - some other things which come to my mind like closures, "and or" in
boolean clauses with shortcut evaluation...


That's it for now... there's probably more, but that's all I can
remember currently.
Most of these things I mailed and discussed with MFC who just didn't
have the time to implement it, which is a pity, because he made a great
start on that language. Anyway, I'm using it for the last 13 years
already, so it's usable ;-)
There's a lot of work, still, so let's get the source to start :-)

- --
Patric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: GnuPT 2.5.2

iEYEARECAAYFAkr0L18ACgkQfGgGu8y7ypDRXgCg/dXYIkwJ8QtgVs9VtAZOmT2E
sxcAoJvVBSU2D/OyG8A7trMZwGIbYTM1
=KMvy
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

NetRexx scripting for jEdit beta release available!

Kermit Kiser
In reply to this post by Patric Bechtel
Hi Patric;

I can't find any problem in any of the copies that I have. Could you
have a bad download or archiver compatibility issue?

I am currently working with the jEdit developers to get sourceforge
upload access to publish the source on the Plugin Central repository.
When that happens, you should be able to get it from there.

-- Kermit

On 11/6/2009 3:45 AM, Patric Bechtel wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kermit Kiser schrieb am 01.11.2009 04:55:
>  
>> The NetRexxScript plugin for jEdit is now feature complete and ready for
>> beta testing.
>>    
>
> [...]
>
>  
>> Binary plus source -
>>
>> http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.zip
>> http://kermitkiser.com/NetRexx/Script/NetRexxScript-0.1.0.tgz
>>    
>
> Hi Kermit,
>
> thanks for your efforts... it's nice to see some more activities on the
> NetRexx community.
>
> One thing, though: the source of the plugin contains a file
> "NetRexxScriptPlugin.nrx" which seems to be a binary.
> I checked both the tgz and the zip.
>
> Do you have a public repository for the plugin?
>
> Any idea when the NetRexx source will be available from RexxLA.org? I
> was discussing that topic with MFC since 2002 already, and still looking
> forward to see it happen. We have an impressive source base written in
> it, and I would like to fix quite some "quirks" of the language (nothing
> serious, though).
> We have patched the NetRexxC ant task a bit (again), so together with
> jedit, ant and an open sourced NetRexx, that could be a winning team...
>
> tia,
>
> Patric
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: GnuPT 2.5.2
>
> iEYEARECAAYFAkr0DFMACgkQfGgGu8y7ypDH0ACdEAi1zM2OsKEeOy2yDBz4zsIK
> 5BgAoMicedm650C1z2CUKhd7BflE3f4g
> =nKDF
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>
>
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns.hursley.ibm.com/pipermail/ibm-netrexx/attachments/20091106/4272f51d/attachment.html