You can subscribe to this list here.
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2020 |
Jan
|
Feb
|
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(7) |
Jul
(10) |
Aug
(9) |
Sep
(9) |
Oct
(1) |
Nov
(3) |
Dec
(5) |
2021 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(9) |
Nov
(1) |
Dec
(14) |
2022 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(165) |
Jul
(8) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(5) |
2023 |
Jan
(19) |
Feb
(14) |
Mar
(2) |
Apr
(3) |
May
|
Jun
(2) |
Jul
(10) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(10) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: J L. T. <jlt...@ma...> - 2023-07-29 07:40:21
|
Marc, stty is not the same as tty; tty is a device, but stty is a tool to query or change a tty's settings. On 2023-07-28 06:35:18 Marc Remes wrote: > Hi Leslie, > > A redirected pipe is not a tty. That's why the output is empty. > try pipe 'command tty | console' > There are methods to connect a pseudo tty, but I don't think we need to > adapt njpipes to support that. > > ref: https://gamlor.info/posts-output/2021-05-29-tty-in-java/en/ > > Marc > > > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |
From: Marc R. <re...@gm...> - 2023-07-28 11:43:35
|
Hi Leslie, A redirected pipe is not a tty. That's why the output is empty. try pipe 'command tty | console' There are methods to connect a pseudo tty, but I don't think we need to adapt njpipes to support that. ref: https://gamlor.info/posts-output/2021-05-29-tty-in-java/en/ Marc |
From: J L. T. <jlt...@ma...> - 2023-07-27 20:06:29
|
Hi, Can someone with a Linux machine please take a look at this? I want to replace the bash script I'm using to extract terminal dimensions with a nrx pipeline (see attached bash scripts), but I get no output from the command stage when I execute stty. The nrx pipeline is much simpler than the bash one, but there's something strange about stty. Perhaps it writes directly to the terminal instead of to stdout? If so, (how) could the command stage capture it? Do we need a <tty stage instead? Anyway, here are the nrx pipelines: | $ pipe 'command stty --all|take first 1|specs word 5 next|strip trailing string /;/|console' # should return #rows | rc=0 | $ pipe 'command stty --all|take first 1|specs word 7 next|strip trailing string /;/|console' # should return #columns | rc=0 In fact, just | $ pipe 'command stty --all|console' | rc=0 produces no output at all, while running stty --all directly in the terminal produces | $ stty --all | speed 38400 baud; rows 54; columns 120; line = 0; | intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; | stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0; | -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts | -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany -imaxbel iutf8 | opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 | isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc | rc=0 Leslie -- Platform: Linux Distribution: openSUSE Leap 15.4 (x86_64) java version "19.0.1" 2022-10-18 Java(TM) SE Runtime Environment (build 19.0.1+10-21) Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing) NetRexx portable processor 4.05-beta build 62-20230422-0022 |
From: J L. T. <jlt...@ma...> - 2023-06-29 08:26:09
|
I'm having another try at a multistream pipeline, but whatever I try, pipc chokes on one thing or another. I've attached the GenSymLinks.njp source that's bugging me; it has comments about what goes wrong with the three possible versions of the pipeline (Portrait with trailing stageseps, Portrait with leading stageseps, and Single-line). Obviously I'm doing something wrong, but though I've read through the Pipeline Guide and Reference over and over, I can't see what. The Single-line pipeline compiles as a literal presented to pipc, but compiling the GenSymLinks.njp doesn't seem to like any code that follows any of the three pipeline versions. If it works for you, there must be something wrong with my NetRexx installation. (By the way, thank you so much for the enhancements to the specs stage.) Leslie -- Platform: Linux Distribution: openSUSE Leap 15.4 (x86_64) java version "19.0.1" 2022-10-18 Java(TM) SE Runtime Environment (build 19.0.1+10-21) Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing) NetRexx portable processor 4.05-beta build 62-20230422-0022 |
From: J L. T. <jlt...@ma...> - 2023-06-20 15:59:39
|
Hi, Now that I'm looking at the right version of the (PDF) books, I notice a few things: * In the Pipelines Guide and Reference, the description of the specs stage overflows over the definitions of spill, split and sql (see attached). * In the NetRexx Language Reference, the description of the stream() method seems incomplete, with merely an implication that the OPEN operation can have other modes than R/W, though one can use at least OPEN READ; I have not explored whether WRITE, APPEND, SHARE are also allowed. Leslie -- Platform: Linux Distribution: openSUSE Leap 15.4 (x86_64) NetRexx portable processor 4.05-beta build 62-20230422-0022 java version "19.0.1" 2022-10-18 Java(TM) SE Runtime Environment (build 19.0.1+10-21) Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing) |
From: Jeff H. <Je...@Je...> - 2023-04-19 18:21:44
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>I have just released an extension to the NetRexx Pipelines <b>PARSE</b> stage, together with tests and documentation. It should be in the next release.</p> <p>Note: This changes the variable names from "$1" through "$9" to "_1" to "_9" to avoid a NetRexx internal name conflict. $-variables are depreciated, but will, for now, work in existing pipes<br> </p> <p>It extends the current <b>parse</b> stage from just input and output templates to include a optional <b>netrexx</b> (or <b>nr</b>) delimited string of one or more NetRexx statements between the two templates. Also a <b>finally</b> delimited string of statements. This greatly increases the power of this stage. <b>Parse</b> stage is only NetRexx Pipelines, not CMS.<br> </p> <blockquote> /** parse -- Rearrange Contents of Records using Rexx Parse<br> <br> <font face="Cascadia Code">>>--PARSE--parse_template_Dstring--></font><br> <font face="Cascadia Code"> </font><br> <font face="Cascadia Code"> >--+-----------------------------+--></font><br> <font face="Cascadia Code"> +-+-NETREXX-+-NetRexx_Dstring-+</font><br> <font face="Cascadia Code"> +-NR------+</font><br> <font face="Cascadia Code"> </font><br> <font face="Cascadia Code"> >--+-------------------------+--></font><br> <font face="Cascadia Code"> +-output_template_Dstring-+</font><br> <font face="Cascadia Code"> </font><br> <font face="Cascadia Code"> >--+---------------------------------+--><</font><br> <font face="Cascadia Code"> +-FINALLY-finally_NetRexx_Dstring-+</font><br> <br> Records are parsed via the parse_template_delimited_string.<br> Variables are named _n, where n is 1 to 9.<br> The values of the variables are put into the output_template_delimited_string<br> replacing _n.<br> For a literal _n that won't be changed, use __n.<br> The NetRexx_Dstring and finally_NetRexx_Dstring are any valid NetRexx statement<br> or ;-separated statements that may use and set the ""_n"" variables.<br> The string \n will split the string into separate output records.<br> The special indexed variable COUNTER[] is also available in these Dstrings.<br> Note: Now depreciated: "$n" instead of "_n"; no NR or FINALLY.<br> <br> Examples:<br> parse / 2 _1 +1/ /The second letter is \"_1\". __1 won't be changed./<br> <br> parse / _1 2 _2 +1 _3/ NR /_2 = _2.upper/ /_1_2_3/<br> <br> PARSE /_1 2 _2 +1 _3/ ,<br> NR /if _2.datatype('l') then counter['c'] = counter['c'] + 1; _2 = _2.upper/ ,<br> /_1_2_3/ ,<br> FINALLY /return counter['c'] 'changed to upper'/<br> <br> parse /2 _1 +1/ NR /counter[1]=counter[1]+1/ FINALLY /_9="Count:" counter[1]/ /_9/<br> <br> */ </blockquote> <p></p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-04-01 20:12:20
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>I have just pushed a HELP stage (and AHELP) for Pipeline stages.</p> <p>This works to display, via SAY, the diagram and notes (more info for NetRexx-only stages) if it is the last stage in a pipe, or pass those lines on to the next stage.</p> <p>For example:</p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"help literal" </span><span style="color:#D3D7CF;background-color:#012456;">/** literal -- Write the Argument String +-{-object-name-}-+ >>---LITERAL---+--------+--------+---->< +-string-+ Note: njPipes does not preserve trailing spaces on string. CMS does. */</span></div> <p></p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"help literal | reverse | cons" </span><span style="color:#D3D7CF;background-color:#012456;">gnirtS tnemugrA eht etirW -- laretil **/ +-}-eman-tcejbo-{-+ <>----+--------+--------+---LARETIL--->> +-gnirts-+ .seod SMC .gnirts no secaps gniliart evreserp ton seod sepiPjn :etoN /*</span></div> <p></p> <p>The information to be displayed is in the stage's source file as:</p> <blockquote> <p><br> <font face="Cascadia Code">Method givehelp() static<br> return -<br> "/** literal -- Write the Argument String\n" -<br> "\n" -<br> " +-{-object-name-}-+\n" -<br> " >>---LITERAL---+--------+--------+----><\n" -<br> " +-string-+\n" -<br> "\n" -<br> " Note: njPipes does not preserve trailing spaces on string. CMS does.\n" -<br> "*/\n" </font> <br> </p> </blockquote> <p> Jeff Hennick <br> </p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-04-01 14:58:10
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>When doing a mass recompile, this warning appeared<br> </p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">[buildnrc] ---------- [buildnrc] 1. WARNING in \var.java (at line 28) [buildnrc] public class var extends org.netrexx.njpipes.pipes.stage{ [buildnrc] ^^^ [buildnrc] 'var' should not be used as an type name, since it is a reserved wor d from source level 10 on [buildnrc] ----------</span></div> <p></p> <p>I suspect we need to add "var" to the list in compiler.nrx, around line 220, and rename this class and file.</p> <p>I am not competent enough to do this on my own say so.<br> </p> <p>Jeff<br> </p> <p><br> </p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-03-19 16:59:29
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>I have pushed a new NetRexx Pipeline stage and tests: DELAY. It is an upwardly compatible version with CMS.</p> <blockquote> <p>DELAY -- Suspend Stream</p> <font face="monospace">▶▶--DELAY--+-------------------------------------------------------------+---▶◄ </font><br> <div class="p-ddiv"> <div class="p-diag box"><font face="monospace"> | +--<span class="njponly">+</span>--+ +--<span class="njponly">EACH</span>-(2)-+ | (1) <br> </font><font face="monospace"> +--+-----+--+--<span class="njponly"><span class="var">numberHr</span>:<span class="var">numberMin</span>:<span class="var">numberSec</span></span>-+--+-----------+--+ (1) <br> </font><font face="monospace"> +--<span class="njponly"><span class="var">numberMin</span>:<span class="var">numberSec</span></span>----------+ +--<span class="njponly">ONCE</span>-(2)-+ (1) <br> </font><font face="monospace"> +--<span class="njponly"><span class="var">numberSec</span></span>--------------------+ (1) </font></div> </div> <ul> <li>(1) Arguments are NetRexx Pipelines only, not CMS. CMS (and NetRexx when there is no argument) reads delays as the first word of each record. <br> When arguments are present, they follow the CMS conventions for the delay time in records. The + indicates a duration, no + means time of day. The objects do NOT have the delay as the first word. <br> Clock hours are 24h, so 2pm is 14, and are for the next 24 hours if before "now." <br> Seconds can have decimal point and milliseconds. <br> In relative times, the number of seconds and minutes are not limited to 60; so 120 seconds is the same as 2 minutes.</li> <li>(2) Used only for "relative time." EACH, the default, delays before each object; ONCE delays only the first object.</li> <li>Uses Java's Thread.sleep() method and may not be exact in fractional seconds.</li> </ul> </blockquote> <div> <div class="p-note">When in the records, the time must be a single word. As arguments, it is tolerant of spaces.</div> <div class="p-note"><br> </div> <div class="p-note">The submitted tests include only "relative times" not clock times, and do not test for the actual time of delay.<br> </div> </div> <p>This will be used in some stage tests, where NetRexx's multi-streaming can cause race conditions.</p> <p>Jeff Hennick<br> </p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-03-01 14:23:29
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>For testing a pipeline's arg() feature using the {} style, I wish to have a pipe stage like this to be taken, well, literally:</p> <blockquote> <p><font face="monospace">literal {avar} |</font></p> </blockquote> <p>but this gets interpreted.</p> <p>Is there a way I can "escape" the "{" so it is just another character? "\{" does not work, nor does "\\{".</p> <p>Thanks for any help.</p> <p>Jeff <br> </p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-02-26 17:24:36
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>In building a new <b>HELP</b> stage, and wanting to handle all the stage names and their synonyms, I have run into a problem with an argument of just the question mark: "?", which is a synonym for <b>HELP</b> in CMS.</p> <p>Here are the first few lines traced. First with the character <b>></b> which is processed all right. But with the character <b>?</b> , it never gets through.<br> </p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"ahelp >" </span><span style="color:#D3D7CF;background-color:#012456;"> --- ahelp.nrx [Thread-1,njPipes] 25 *=* method run() 26 *=* data = Rexx "" >v> data "" 28 *=* parse arg() stage_to_help >v> stage_to_help ">"</span></div> <p></p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"ahelp ?" </span><span style="color:#D3D7CF;background-color:#012456;"> --- ahelp.nrx [Thread-1,njPipes] 25 *=* method run() 26 *=* data = Rexx "" >v> data "" 28 *=* parse arg() stage_to_help >v> stage_to_help ""</span></div> <p></p> <p>Some exploration with raw NetRexx shows the Shell does not like passing <b>></b>, but all is right with<b>?</b>:</p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">type </span><span style="color:#D3D7CF;background-color:#012456;">toast.nrx /* This wishes you the best of health. */ class toast method main(argwords=String[]) static arg=Rexx(argwords) say 'Cheers!' arg</span></div> <p></p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">java </span><span style="color:#D3D7CF;background-color:#012456;">toast Cheers! PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">java </span><span style="color:#D3D7CF;background-color:#012456;">toast xyz Cheers! xyz PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes</span><span style="color:#EF2929;background-color:#012456;">> </span><span style="color:#FCE94F;background-color:#012456;">java </span><span style="color:#D3D7CF;background-color:#012456;">toast > </span><span style="color:#EF2929;background-color:#012456;">At line:1 char:13 + java toast > + ~ Missing file specification after redirection operator. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx ception + FullyQualifiedErrorId : MissingFileSpecification </span><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">java </span><span style="color:#D3D7CF;background-color:#012456;">toast ? Cheers! ?</span></div> <p></p> <p>So, NetRexx alone is not "eating" the "?" parameter, it must be Pipelines that is.</p> <p>Is this a feature of Pipelines that I have missed, or a bug?</p> <p>Anyone's help would be appreciated.</p> <p>Jeff Hennick<br> </p> <p><br> </p> <p><br> </p> <p><br> </p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-02-16 20:31:11
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>René,</p> <p>I continue to get the error. I even downloaded the version of help.nrx from SourceForge and recompiled with that.</p> <p>What I have done is go ahead with an AHELP stage, and the individual stage methods as givehelp(). That is working fine for me. I have also added in the special terms as methods within in AHELP, so</p> <blockquote> <p><font face="monospace">pipe help delimitedstring</font></p> <p><font face="monospace">pipe help delimited string</font></p> </blockquote> <p>work as well.</p> <p>I have an edit macro that does most of the work to convert the railroad diagrams to text. I am adding a few things in from the manual.</p> <p>I'd still like to get the DISPLAY stage working, but it looks like it is out of my hands.<br> </p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/12/2023 10:45 AM, René Jansen wrote:<br> </div> <blockquote type="cite" cite="mid:629...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> Hi Jeff, <div><br> </div> <div>I checked in a working help stage.<br> <div><br> </div> <div>My conjecture: somehow we confused the compiler by naming both the class 'help' and the method 'help'. The latter returns a type Rexx.</div> <div>My first reflex was to call your class 'helo' and then it works when starting a </div> <div><br> </div> <div>pipe "helo crc | cons"</div> <div><br> </div> <div>but because 'helo' is not a good name for a help stage, I renamed it back, and changed the help() method on class stage and class crc to 'giveHelp'.</div> <div><br> </div> <div>Somehow someone took a shortcut somewhere. Line 50 must be from the generated stage source. Do we accept this or do we open an issue to go to the bottom?</div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.</div> <div><br> </div> <div><br> </div> <div><br> <div><br> <blockquote type="cite"> <div>On 12 Feb 2023, at 14:31, Jeff Hennick <a class="moz-txt-link-rfc2396E" href="mailto:Je...@Je..."><Je...@Je...></a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <div> <p>René,</p> <p>Thank you.</p> <p>At the moment, I am still pursuing the previous way, but running into a problem.</p> <p>Your code worked for me. ONCE. Now it doesn't, in a way I do not understand.</p> <p>First, there were some exceptions that needed attention. These I now CATCH.</p> <p>So here first is my code, then the results.</p> <blockquote> <p><font face="monospace">-- help.nrx NJPipe Stage<br> /*<br> * Copyright (C) 2023 Jeffrey Hennick, Jeff @ Jeff-H . com<br> * Distributed under the ICU 1.8.1 License with NO WARRANTIES of ANY kind.<br> * See LICENSE for the license and information on using, copying, modifying,<br> * and distributing this program.<br> */<br> /*<br> */<br> <br> options nostrictcase nostrictargs nostrictsignal<br> package org.netrexx.njpipes.stages<br> <br> import org.netrexx.njpipes.pipes.<br> <br> class help extends stage binary</font></p> <p><font face="monospace">trace results</font></p> <p><font face="monospace">method run()<br> <br> parse arg() stage_to_help .<br> if stage_to_help = '' then<br> say "Usage: HELP stage_name."<br> else if stage_to_help = 'HELP' then<br> say helphelp()<br> else do<br> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)<br> helpMethod = stageClass.getMethod('help',null)<br> say helpMethod.invoke(stageClass,null)<br> catch java.lang.ClassNotFoundException<br> Emsg(11, "Stage" stage_to_help "was not found.")<br> catch java.lang.NoSuchMethodException<br> Emsg(11, "No Help was found for Stage" stage_to_help".")<br> catch java.lang.IllegalAccessException<br> Emsg(11, "Illegal Access.")<br> catch java.lang.reflect.InvocationTargetException<br> Emsg(11, "Reflection Invocation Target Error.")<br> end<br> <br> loop forever<br> aobj = peekto()<br> output(aobj)<br> readto()<br> catch StageError<br> end<br> <br> rc = mrc()<br> exit(rc*(rc<>12))<br> <br> method helphelp() static<br> return -<br> "/** help\n" -<br> " \n" -<br> " >>--+-HELP--+--------+----------------------->< \n" -<br> " | +-string-+ \n" -<br> " \n" -<br> "*/\n"<br> <br> </font><br> </p> </blockquote> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#D3D7CF;background-color:#012456;">"help find" 50 +++ _s_1 = help() +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t o variable of type 'org.netrexx.njpipes.pipes.stage' NetRexx portable processor 4.05-beta build 1,005-20230212-0754 Copyright (c) RexxLA, 2011,2023. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program pebe3cec === class pebe3cec === constructor pebe3cec(Object) overrides pipe() method reset function get(Object) method setup(Object) 50 +++ _s_1 = help() +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t o variable of type 'org.netrexx.njpipes.pipes.stage' method config method setup2 method run signals ThreadQ overrides stage.run function main(String[]) signals ThreadQ Compilation of 'pebe3cec' failed [one error] Compilation failed. PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes></span></div> <p> I don't know where the line "50" is. My 50 is a blank line, but the error message stays the same when I added blank lines above it.</p> <p>It does not matter what stage name I ask for the help.<br> </p> <p>Trying from the "raw" PowerShell prompt or in NRWS; with and without quote marks, has made no difference.</p> <p>Thanks for any insight.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/11/2023 8:13 AM, René Jansen wrote:<br> </div> <blockquote type="cite" cite="mid:1E0...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> rerouted answer to pipelines list: <div><br> </div> <div>Jeff,</div> <div><br> </div> <div>we have an INSIDE stage, so I would skip all quoting and continuing and pick the right lines out of a file with INSIDE - then you can use the class-level help() to call super.help(stage) and have that deliver the lines.</div> <div>(In there we can test the terminal for graphic ability and deliver the optimal graphics - more than one terminal can do SVG nowadays).</div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.<br> <div><br> <blockquote type="cite"> <div>On 11 Feb 2023, at 13:34, Jeffrey Hennick <a class="moz-txt-link-rfc2396E" href="mailto:Je...@Je..." moz-do-not-send="true"><Je...@Je...></a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <div> <p>Looks great. I'll explore it more later today. Then get to the stage files. Most of them have the railroad diagram in a comment, so it means moving that to the new help() method. I do wish NetRexx had a multi-line quote for this, but adding quote marks and a continuation character to each line should do the trick. (The <b>help</b> stage will need some special work so this method is not taken as a constructor.)<br> </p> <p>Thanks!</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/10/2023 4:50 PM, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:AEA...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> And you should use getMethod instead of getDeclaredMethod if you want to inherit the help() from stage - the superclass, for stages that don't have helping yet: <div><br> </div> <div> <div><font face="Courier New">parse arg stage_to_help</font></div> <div><font face="Courier New">stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)</font></div> <div><font face="Courier New">helpMethod = stageClass.getMethod('help',null)</font></div> <div><font face="Courier New">say helpMethod.invoke(stageClass,null)</font></div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.<br> <blockquote type="cite"> <div>On 10 Feb 2023, at 22:43, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta charset="UTF-8"> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Hi Jeff,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">I think this is the best solution for the moment: We know that the stages package is available. We can load the stage class with the Java Reflection API, and then call (invoke) the help() method on it:</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ cat loadhelp.nrx</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">parse arg stage_to_help</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">helpMethod = stageClass.getDeclaredMethod('help',null)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">say helpMethod.invoke(stageClass,null)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New"><br> </font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ java loadhelp crc</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">The CRC stage computes a CRC-32 checksum over its input.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">So you pass in the (short) stage name, complete its name in the class.forName method, which leave a Class object in variable stageClass. We ask that Class object to return the help() method in the variable helpMethod. On that, we invoke it with no parameters, it returns the help message from the static help() method.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">best regards,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">René.<br> <div> <div><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 16:14, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">and with that I mean the example below-below. </span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 16:08, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Hi Jeff,</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">I added a static help() method to pipes.stage . I also did override that method on the new crc stage; this just to show.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Now about enumeration of the stages: we have several approaches. We could, at NetRexx build time, enumerate all the built-in stages into a structure. That might be the most efficient and straigtforward way. We could also do that dynamically; if the compiler can do it, we also could. This might be more involved and would take slightly longer.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">The example below does not work because you need to instantiate the stage before you can call methods on it.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: ... [truncated message content] |
From: Jeff H. <Je...@Je...> - 2023-02-12 20:56:02
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>René,</p> <p>Yep,</p> <p>I get it to work with the stage name <b>AHELP</b>, which in CMS is an almost alias for <b>HELP</b>. <br> </p> <p>I tried to make a HELP class that extends AHELP, but it gives the same error. I then removed all "help.*" files from both <b>src</b> and <b>build</b> directories then rebuilt. Only to get the same error. It seems there must be a <b>help</b> class somewhere else in Java/NetRexx.</p> <p>A solution (?) might be to have the <b>AHELP</b> as a standard stage class and in the pipeline scheduler make a stage alias for <b>HELP</b>, like we do for <b>></b>.</p> <p>While I'd like to be able to use a DISPLAY stage for all the fancy HTML stuff, for now I'll go for plain text via SAY. And continue working in that direction.</p> <p>Thanks for all your help.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/12/2023 10:45 AM, René Jansen wrote:<br> </div> <blockquote type="cite" cite="mid:629...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> Hi Jeff, <div><br> </div> <div>I checked in a working help stage.<br> <div><br> </div> <div>My conjecture: somehow we confused the compiler by naming both the class 'help' and the method 'help'. The latter returns a type Rexx.</div> <div>My first reflex was to call your class 'helo' and then it works when starting a </div> <div><br> </div> <div>pipe "helo crc | cons"</div> <div><br> </div> <div>but because 'helo' is not a good name for a help stage, I renamed it back, and changed the help() method on class stage and class crc to 'giveHelp'.</div> <div><br> </div> <div>Somehow someone took a shortcut somewhere. Line 50 must be from the generated stage source. Do we accept this or do we open an issue to go to the bottom?</div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.</div> <div><br> </div> <div><br> </div> <div><br> <div><br> <blockquote type="cite"> <div>On 12 Feb 2023, at 14:31, Jeff Hennick <a class="moz-txt-link-rfc2396E" href="mailto:Je...@Je..."><Je...@Je...></a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <div> <p>René,</p> <p>Thank you.</p> <p>At the moment, I am still pursuing the previous way, but running into a problem.</p> <p>Your code worked for me. ONCE. Now it doesn't, in a way I do not understand.</p> <p>First, there were some exceptions that needed attention. These I now CATCH.</p> <p>So here first is my code, then the results.</p> <blockquote> <p><font face="monospace">-- help.nrx NJPipe Stage<br> /*<br> * Copyright (C) 2023 Jeffrey Hennick, Jeff @ Jeff-H . com<br> * Distributed under the ICU 1.8.1 License with NO WARRANTIES of ANY kind.<br> * See LICENSE for the license and information on using, copying, modifying,<br> * and distributing this program.<br> */<br> /*<br> */<br> <br> options nostrictcase nostrictargs nostrictsignal<br> package org.netrexx.njpipes.stages<br> <br> import org.netrexx.njpipes.pipes.<br> <br> class help extends stage binary</font></p> <p><font face="monospace">trace results</font></p> <p><font face="monospace">method run()<br> <br> parse arg() stage_to_help .<br> if stage_to_help = '' then<br> say "Usage: HELP stage_name."<br> else if stage_to_help = 'HELP' then<br> say helphelp()<br> else do<br> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)<br> helpMethod = stageClass.getMethod('help',null)<br> say helpMethod.invoke(stageClass,null)<br> catch java.lang.ClassNotFoundException<br> Emsg(11, "Stage" stage_to_help "was not found.")<br> catch java.lang.NoSuchMethodException<br> Emsg(11, "No Help was found for Stage" stage_to_help".")<br> catch java.lang.IllegalAccessException<br> Emsg(11, "Illegal Access.")<br> catch java.lang.reflect.InvocationTargetException<br> Emsg(11, "Reflection Invocation Target Error.")<br> end<br> <br> loop forever<br> aobj = peekto()<br> output(aobj)<br> readto()<br> catch StageError<br> end<br> <br> rc = mrc()<br> exit(rc*(rc<>12))<br> <br> method helphelp() static<br> return -<br> "/** help\n" -<br> " \n" -<br> " >>--+-HELP--+--------+----------------------->< \n" -<br> " | +-string-+ \n" -<br> " \n" -<br> "*/\n"<br> <br> </font><br> </p> </blockquote> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#D3D7CF;background-color:#012456;">"help find" 50 +++ _s_1 = help() +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t o variable of type 'org.netrexx.njpipes.pipes.stage' NetRexx portable processor 4.05-beta build 1,005-20230212-0754 Copyright (c) RexxLA, 2011,2023. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program pebe3cec === class pebe3cec === constructor pebe3cec(Object) overrides pipe() method reset function get(Object) method setup(Object) 50 +++ _s_1 = help() +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t o variable of type 'org.netrexx.njpipes.pipes.stage' method config method setup2 method run signals ThreadQ overrides stage.run function main(String[]) signals ThreadQ Compilation of 'pebe3cec' failed [one error] Compilation failed. PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes></span></div> <p> I don't know where the line "50" is. My 50 is a blank line, but the error message stays the same when I added blank lines above it.</p> <p>It does not matter what stage name I ask for the help.<br> </p> <p>Trying from the "raw" PowerShell prompt or in NRWS; with and without quote marks, has made no difference.</p> <p>Thanks for any insight.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/11/2023 8:13 AM, René Jansen wrote:<br> </div> <blockquote type="cite" cite="mid:1E0...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> rerouted answer to pipelines list: <div><br> </div> <div>Jeff,</div> <div><br> </div> <div>we have an INSIDE stage, so I would skip all quoting and continuing and pick the right lines out of a file with INSIDE - then you can use the class-level help() to call super.help(stage) and have that deliver the lines.</div> <div>(In there we can test the terminal for graphic ability and deliver the optimal graphics - more than one terminal can do SVG nowadays).</div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.<br> <div><br> <blockquote type="cite"> <div>On 11 Feb 2023, at 13:34, Jeffrey Hennick <a class="moz-txt-link-rfc2396E" href="mailto:Je...@Je..." moz-do-not-send="true"><Je...@Je...></a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <div> <p>Looks great. I'll explore it more later today. Then get to the stage files. Most of them have the railroad diagram in a comment, so it means moving that to the new help() method. I do wish NetRexx had a multi-line quote for this, but adding quote marks and a continuation character to each line should do the trick. (The <b>help</b> stage will need some special work so this method is not taken as a constructor.)<br> </p> <p>Thanks!</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/10/2023 4:50 PM, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:AEA...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> And you should use getMethod instead of getDeclaredMethod if you want to inherit the help() from stage - the superclass, for stages that don't have helping yet: <div><br> </div> <div> <div><font face="Courier New">parse arg stage_to_help</font></div> <div><font face="Courier New">stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)</font></div> <div><font face="Courier New">helpMethod = stageClass.getMethod('help',null)</font></div> <div><font face="Courier New">say helpMethod.invoke(stageClass,null)</font></div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.<br> <blockquote type="cite"> <div>On 10 Feb 2023, at 22:43, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta charset="UTF-8"> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Hi Jeff,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">I think this is the best solution for the moment: We know that the stages package is available. We can load the stage class with the Java Reflection API, and then call (invoke) the help() method on it:</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ cat loadhelp.nrx</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">parse arg stage_to_help</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">helpMethod = stageClass.getDeclaredMethod('help',null)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">say helpMethod.invoke(stageClass,null)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New"><br> </font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ java loadhelp crc</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">The CRC stage computes a CRC-32 checksum over its input.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">So you pass in the (short) stage name, complete its name in the class.forName method, which leave a Class object in variable stageClass. We ask that Class object to return the help() method in the variable helpMethod. On that, we invoke it with no parameters, it returns the help message from the static help() method.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">best regards,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">René.<br> <div> <div><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 16:14, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">and with that I mean the example below-below. </span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 16:08, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Hi Jeff,</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">I added a static help() method to pipes.stage . I also did override that method on the new crc stage; this just to show.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Now about enumeration of the stages: we have several approaches. We could, at NetRexx build time, enumerate all the built-in stages into a structure. That might be the most efficient and straigtforward way. We could also do that dynamically; if the compiler can do it, we also could. This might be more involved and would take slightly longer.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">The example below does not work because you need to instantiate the stage before you can call methods on it.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-inden... [truncated message content] |
From: René J. <rvj...@xs...> - 2023-02-12 15:45:44
|
Hi Jeff, I checked in a working help stage. My conjecture: somehow we confused the compiler by naming both the class 'help' and the method 'help'. The latter returns a type Rexx. My first reflex was to call your class 'helo' and then it works when starting a pipe "helo crc | cons" but because 'helo' is not a good name for a help stage, I renamed it back, and changed the help() method on class stage and class crc to 'giveHelp'. Somehow someone took a shortcut somewhere. Line 50 must be from the generated stage source. Do we accept this or do we open an issue to go to the bottom? best regards, René. > On 12 Feb 2023, at 14:31, Jeff Hennick <Je...@Je...> wrote: > > René, > > Thank you. > > At the moment, I am still pursuing the previous way, but running into a problem. > > Your code worked for me. ONCE. Now it doesn't, in a way I do not understand. > > First, there were some exceptions that needed attention. These I now CATCH. > > So here first is my code, then the results. > > -- help.nrx NJPipe Stage > /* > * Copyright (C) 2023 Jeffrey Hennick, Jeff @ Jeff-H . com > * Distributed under the ICU 1.8.1 License with NO WARRANTIES of ANY kind. > * See LICENSE for the license and information on using, copying, modifying, > * and distributing this program. > */ > /* > */ > > options nostrictcase nostrictargs nostrictsignal > package org.netrexx.njpipes.stages > > import org.netrexx.njpipes.pipes. > > class help extends stage binary > > trace results > > method run() > > parse arg() stage_to_help . > if stage_to_help = '' then > say "Usage: HELP stage_name." > else if stage_to_help = 'HELP' then > say helphelp() > else do > stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help) > helpMethod = stageClass.getMethod('help',null) > say helpMethod.invoke(stageClass,null) > catch java.lang.ClassNotFoundException > Emsg(11, "Stage" stage_to_help "was not found.") > catch java.lang.NoSuchMethodException > Emsg(11, "No Help was found for Stage" stage_to_help".") > catch java.lang.IllegalAccessException > Emsg(11, "Illegal Access.") > catch java.lang.reflect.InvocationTargetException > Emsg(11, "Reflection Invocation Target Error.") > end > > loop forever > aobj = peekto() > output(aobj) > readto() > catch StageError > end > > rc = mrc() > exit(rc*(rc<>12)) > > method helphelp() static > return - > "/** help\n" - > " \n" - > " >>--+-HELP--+--------+----------------------->< \n" - > " | +-string-+ \n" - > " \n" - > "*/\n" > > > > PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> pipe "help find" > 50 +++ _s_1 = help() > +++ ^^^^ > +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t > o variable of type 'org.netrexx.njpipes.pipes.stage' > NetRexx portable processor 4.05-beta build 1,005-20230212-0754 > Copyright (c) RexxLA, 2011,2023. All rights reserved. > Parts Copyright (c) IBM Corporation, 1995,2008. > Program pebe3cec > === class pebe3cec === > constructor pebe3cec(Object) > overrides pipe() > method reset > function get(Object) > method setup(Object) > 50 +++ _s_1 = help() > +++ ^^^^ > +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t > o variable of type 'org.netrexx.njpipes.pipes.stage' > method config > method setup2 > method run > signals ThreadQ > overrides stage.run > function main(String[]) > signals ThreadQ > Compilation of 'pebe3cec' failed [one error] > Compilation failed. > PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> > I don't know where the line "50" is. My 50 is a blank line, but the error message stays the same when I added blank lines above it. > > It does not matter what stage name I ask for the help. > > Trying from the "raw" PowerShell prompt or in NRWS; with and without quote marks, has made no difference. > > Thanks for any insight. > > Jeff > > On 2/11/2023 8:13 AM, René Jansen wrote: >> rerouted answer to pipelines list: >> >> Jeff, >> >> we have an INSIDE stage, so I would skip all quoting and continuing and pick the right lines out of a file with INSIDE - then you can use the class-level help() to call super.help(stage) and have that deliver the lines. >> (In there we can test the terminal for graphic ability and deliver the optimal graphics - more than one terminal can do SVG nowadays). >> >> best regards, >> >> René. >> >>> On 11 Feb 2023, at 13:34, Jeffrey Hennick <Je...@Je...> <mailto:Je...@Je...> wrote: >>> >>> Looks great. I'll explore it more later today. Then get to the stage files. Most of them have the railroad diagram in a comment, so it means moving that to the new help() method. I do wish NetRexx had a multi-line quote for this, but adding quote marks and a continuation character to each line should do the trick. (The help stage will need some special work so this method is not taken as a constructor.) >>> >>> Thanks! >>> >>> Jeff >>> >>> On 2/10/2023 4:50 PM, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>> And you should use getMethod instead of getDeclaredMethod if you want to inherit the help() from stage - the superclass, for stages that don't have helping yet: >>>> >>>> parse arg stage_to_help >>>> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help) >>>> helpMethod = stageClass.getMethod('help',null) >>>> say helpMethod.invoke(stageClass,null) >>>> >>>> best regards, >>>> >>>> René. >>>>> On 10 Feb 2023, at 22:43, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>>> >>>>> Hi Jeff, >>>>> >>>>> I think this is the best solution for the moment: We know that the stages package is available. We can load the stage class with the Java Reflection API, and then call (invoke) the help() method on it: >>>>> >>>>> ➜ test git:(master) ✗ cat loadhelp.nrx >>>>> parse arg stage_to_help >>>>> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help) >>>>> helpMethod = stageClass.getDeclaredMethod('help',null) >>>>> say helpMethod.invoke(stageClass,null) >>>>> >>>>> ➜ test git:(master) ✗ java loadhelp crc >>>>> The CRC stage computes a CRC-32 checksum over its input. >>>>> >>>>> So you pass in the (short) stage name, complete its name in the class.forName method, which leave a Class object in variable stageClass. We ask that Class object to return the help() method in the variable helpMethod. On that, we invoke it with no parameters, it returns the help message from the static help() method. >>>>> >>>>> best regards, >>>>> >>>>> René. >>>>> >>>>>> On 10 Feb 2023, at 16:14, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>>>> >>>>>> and with that I mean the example below-below. >>>>>> >>>>>>> On 10 Feb 2023, at 16:08, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>>>>> >>>>>>> Hi Jeff, >>>>>>> >>>>>>> I added a static help() method to pipes.stage . I also did override that method on the new crc stage; this just to show. >>>>>>> >>>>>>> Now about enumeration of the stages: we have several approaches. We could, at NetRexx build time, enumerate all the built-in stages into a structure. That might be the most efficient and straigtforward way. We could also do that dynamically; if the compiler can do it, we also could. This might be more involved and would take slightly longer. >>>>>>> >>>>>>> The example below does not work because you need to instantiate the stage before you can call methods on it. >>>>>>> >>>>>>> ➜ test git:(master) ✗ cat stagehelp.nrx >>>>>>> import org.netrexx.njpipes.stages. >>>>>>> x = find() >>>>>>> say x.help() >>>>>>> y = crc() >>>>>>> say y.help() >>>>>>> ➜ test git:(master) ✗ nrc stagehelp.nrx >>>>>>> NetRexx portable processor 4.05-beta build 372-20230210-1550 >>>>>>> Copyright (c) RexxLA, 2011,2023. All rights reserved. >>>>>>> Parts Copyright (c) IBM Corporation, 1995,2008. >>>>>>> Program stagehelp.nrx >>>>>>> Compilation of 'stagehelp.nrx' successful >>>>>>> ➜ test git:(master) ✗ java stagehelp >>>>>>> for this stage no help is available yet >>>>>>> The CRC stage computes a CRC-32 checksum over its input. >>>>>>> ➜ test git:(master) ✗ >>>>>>> >>>>>>> >>>>>>> best regards, >>>>>>> >>>>>>> René >>>>>>> >>>>>>>> On 10 Feb 2023, at 09:17, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>>>>>> >>>>>>>> Hi Jeff, >>>>>>>> >>>>>>>> if you want each stage to have a help() method, you should add it to the stage class itself. On each subclass of stage (the stages) you can then override the help() method - in stage.help() itself, you can state there is no specific help yet or have some other generic message. >>>>>>>> >>>>>>>> If you want to call these from another class, you should have an instance of a stage and then call its help(). Using reflective loading, you should be able to load these from the jar. >>>>>>>> Java has no easier way to ‘give me all subclasses of a class.’ >>>>>>>> >>>>>>>> I’ll try to make an example as soon as the coffee starts working. >>>>>>>> >>>>>>>> best regards, >>>>>>>> >>>>>>>> René. >>>>>>>> >>>>>>>> >>>>>>>>> On 9 Feb 2023, at 21:20, Jeffrey Hennick <Je...@Je...> <mailto:Je...@Je...> wrote: >>>>>>>>> >>>>>>>>> I am attempting to make a HELP stage for pipelines. This would give info about any given stage. I would like, for ease of maintenance, store this help information in the stage's file, rather than a central "database." >>>>>>>>> >>>>>>>>> My naive approach is to add a help() method that returns a long string with the information to each stage source file. For testing I have such in the find.nrx, and it compiles nicely. >>>>>>>>> >>>>>>>>> I can call that method from within the find stage and it displays the information with, for now, say help(). >>>>>>>>> >>>>>>>>> What I have not been successful at is calling it from another class file, specifically help.nrx. >>>>>>>>> >>>>>>>>> Both stage files have these in the header section >>>>>>>>> >>>>>>>>> options nostrictcase nostrictargs nostrictsignal >>>>>>>>> package org.netrexx.njpipes.stages >>>>>>>>> >>>>>>>>> import org.netrexx.njpipes.pipes. >>>>>>>>> >>>>>>>>> class help [or find] extends stage binary >>>>>>>>> >>>>>>>>> method run() >>>>>>>>> >>>>>>>>> the help continues >>>>>>>>> >>>>>>>>> >>>>>>>>> parse arg() stage . >>>>>>>>> h = stage.help() >>>>>>>>> say h >>>>>>>>> >>>>>>>>> loop forever >>>>>>>>> aobj = peekto() >>>>>>>>> output(aobj) >>>>>>>>> readto() >>>>>>>>> catch StageError >>>>>>>>> end >>>>>>>>> >>>>>>>>> rc = mrc() >>>>>>>>> exit(rc*(rc<>12)) >>>>>>>>> >>>>>>>>> Whit this, when I compile, I get this error message: >>>>>>>>> >>>>>>>>> [buildnrc] Program help.nrx >>>>>>>>> [buildnrc] [C:\Users\Jeff\Documents\nr\netrexx-code\build\classes\org\netrexx\n >>>>>>>>> jpipes\stages\help.nrx 22 11 4] Error: The method 'help()' cannot be found in cl >>>>>>>>> ass 'netrexx.lang.Rexx' or a superclass >>>>>>>>> >>>>>>>>> BUILD FAILED >>>>>>>>> >>>>>>>>> What is the correct wording to call the help() method in the "stage" class, where in my test case stage is "find". I don't know how to make it clear the the "stage" in "stage.help()" is a variable. >>>>>>>>> >>>>>>>>> Thanks for any pointers -- or ideas to get around this. >>>>>>>>> >>>>>>>>> Jeff >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >>> _._,_._,_ >>> Groups.io Links: >>> You receive all messages sent to this group. >>> >>> View/Reply Online (#339) <https://groups.io/g/netrexx/message/339> | Reply To Group <mailto:ne...@gr...?subject=Re:%20Re%3A%20%5Bnetrexx%5D%20Calling%20a%20method%20in%20another%2C%20variable%2C%20class> | Reply To Sender <mailto:Je...@Je...?subject=Private:%20Re:%20Re%3A%20%5Bnetrexx%5D%20Calling%20a%20method%20in%20another%2C%20variable%2C%20class> | Mute This Topic <https://groups.io/mt/96861952/5057901> | New Topic <https://groups.io/g/netrexx/post> >>> Your Subscription <https://groups.io/g/netrexx/editsub/5057901> | Contact Group Owner <mailto:net...@gr...> | Unsubscribe <https://groups.io/g/netrexx/leave/10808172/5057901/1344565786/xyzzy> [pre...@re... <mailto:pre...@re...>] >>> >>> _._,_._,_ >> >> >> >> >> _______________________________________________ >> netrexx-pipelines mailing list >> net...@li... <mailto:net...@li...> >> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |
From: Jeff H. <Je...@Je...> - 2023-02-12 13:31:23
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>René,</p> <p>Thank you.</p> <p>At the moment, I am still pursuing the previous way, but running into a problem.</p> <p>Your code worked for me. ONCE. Now it doesn't, in a way I do not understand.</p> <p>First, there were some exceptions that needed attention. These I now CATCH.</p> <p>So here first is my code, then the results.</p> <blockquote> <p><font face="monospace">-- help.nrx NJPipe Stage<br> /*<br> * Copyright (C) 2023 Jeffrey Hennick, Jeff @ Jeff-H . com<br> * Distributed under the ICU 1.8.1 License with NO WARRANTIES of ANY kind.<br> * See LICENSE for the license and information on using, copying, modifying,<br> * and distributing this program.<br> */<br> /*<br> */<br> <br> options nostrictcase nostrictargs nostrictsignal<br> package org.netrexx.njpipes.stages<br> <br> import org.netrexx.njpipes.pipes.<br> <br> class help extends stage binary</font></p> <p><font face="monospace">trace results</font></p> <p><font face="monospace">method run()<br> <br> parse arg() stage_to_help .<br> if stage_to_help = '' then<br> say "Usage: HELP stage_name."<br> else if stage_to_help = 'HELP' then<br> say helphelp()<br> else do<br> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)<br> helpMethod = stageClass.getMethod('help',null)<br> say helpMethod.invoke(stageClass,null)<br> catch java.lang.ClassNotFoundException<br> Emsg(11, "Stage" stage_to_help "was not found.")<br> catch java.lang.NoSuchMethodException<br> Emsg(11, "No Help was found for Stage" stage_to_help".")<br> catch java.lang.IllegalAccessException<br> Emsg(11, "Illegal Access.")<br> catch java.lang.reflect.InvocationTargetException<br> Emsg(11, "Reflection Invocation Target Error.")<br> end<br> <br> loop forever<br> aobj = peekto()<br> output(aobj)<br> readto()<br> catch StageError<br> end<br> <br> rc = mrc()<br> exit(rc*(rc<>12))<br> <br> method helphelp() static<br> return -<br> "/** help\n" -<br> " \n" -<br> " >>--+-HELP--+--------+----------------------->< \n" -<br> " | +-string-+ \n" -<br> " \n" -<br> "*/\n"<br> <br> </font><br> </p> </blockquote> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#D3D7CF;background-color:#012456;">"help find" 50 +++ _s_1 = help() +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t o variable of type 'org.netrexx.njpipes.pipes.stage' NetRexx portable processor 4.05-beta build 1,005-20230212-0754 Copyright (c) RexxLA, 2011,2023. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program pebe3cec === class pebe3cec === constructor pebe3cec(Object) overrides pipe() method reset function get(Object) method setup(Object) 50 +++ _s_1 = help() +++ ^^^^ +++ Error: Cannot convert value of type 'netrexx.lang.Rexx' for assignment t o variable of type 'org.netrexx.njpipes.pipes.stage' method config method setup2 method run signals ThreadQ overrides stage.run function main(String[]) signals ThreadQ Compilation of 'pebe3cec' failed [one error] Compilation failed. PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes></span></div> <p> I don't know where the line "50" is. My 50 is a blank line, but the error message stays the same when I added blank lines above it.</p> <p>It does not matter what stage name I ask for the help.<br> </p> <p>Trying from the "raw" PowerShell prompt or in NRWS; with and without quote marks, has made no difference.</p> <p>Thanks for any insight.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/11/2023 8:13 AM, René Jansen wrote:<br> </div> <blockquote type="cite" cite="mid:1E0...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> rerouted answer to pipelines list: <div><br> </div> <div>Jeff,</div> <div><br> </div> <div>we have an INSIDE stage, so I would skip all quoting and continuing and pick the right lines out of a file with INSIDE - then you can use the class-level help() to call super.help(stage) and have that deliver the lines.</div> <div>(In there we can test the terminal for graphic ability and deliver the optimal graphics - more than one terminal can do SVG nowadays).</div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.<br> <div><br> <blockquote type="cite"> <div>On 11 Feb 2023, at 13:34, Jeffrey Hennick <a class="moz-txt-link-rfc2396E" href="mailto:Je...@Je..."><Je...@Je...></a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <div> <p>Looks great. I'll explore it more later today. Then get to the stage files. Most of them have the railroad diagram in a comment, so it means moving that to the new help() method. I do wish NetRexx had a multi-line quote for this, but adding quote marks and a continuation character to each line should do the trick. (The <b>help</b> stage will need some special work so this method is not taken as a constructor.)<br> </p> <p>Thanks!</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/10/2023 4:50 PM, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:AEA...@xs..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> And you should use getMethod instead of getDeclaredMethod if you want to inherit the help() from stage - the superclass, for stages that don't have helping yet: <div><br> </div> <div> <div><font face="Courier New">parse arg stage_to_help</font></div> <div><font face="Courier New">stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)</font></div> <div><font face="Courier New">helpMethod = stageClass.getMethod('help',null)</font></div> <div><font face="Courier New">say helpMethod.invoke(stageClass,null)</font></div> <div><br> </div> <div>best regards,</div> <div><br> </div> <div>René.<br> <blockquote type="cite"> <div>On 10 Feb 2023, at 22:43, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div> <meta charset="UTF-8"> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Hi Jeff,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">I think this is the best solution for the moment: We know that the stages package is available. We can load the stage class with the Java Reflection API, and then call (invoke) the help() method on it:</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ cat loadhelp.nrx</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">parse arg stage_to_help</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">helpMethod = stageClass.getDeclaredMethod('help',null)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">say helpMethod.invoke(stageClass,null)</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New"><br> </font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ java loadhelp crc</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">The CRC stage computes a CRC-32 checksum over its input.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">So you pass in the (short) stage name, complete its name in the class.forName method, which leave a Class object in variable stageClass. We ask that Class object to return the help() method in the variable helpMethod. On that, we invoke it with no parameters, it returns the help message from the static help() method.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">best regards,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">René.<br> <div> <div><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 16:14, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">and with that I mean the example below-below. </span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 16:08, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Hi Jeff,</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">I added a static help() method to pipes.stage . I also did override that method on the new crc stage; this just to show.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Now about enumeration of the stages: we have several approaches. We could, at NetRexx build time, enumerate all the built-in stages into a structure. That might be the most efficient and straigtforward way. We could also do that dynamically; if the compiler can do it, we also could. This might be more involved and would take slightly longer.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">The example below does not work because you need to instantiate the stage before you can call methods on it.</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ cat stagehelp.nrx</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">import org.netrexx.njpipes.stages.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">x = find()</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">say x.help()</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">y = crc()</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">say y.help()</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ nrc stagehelp.nrx</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">NetRexx portable processor 4.05-beta build 372-20230210-1550</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">Copyright (c) RexxLA, 2011,2023. All rights reserved.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">Parts Copyright (c) IBM Corporation, 1995,2008.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">Program stagehelp.nrx</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">Compilation of 'stagehelp.nrx' successful</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗ java stagehelp</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">for this stage no help is available yet</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">The CRC stage computes a CRC-32 checksum over its input.</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Courier New">➜ test git:(master) ✗</font></div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">best regards,</div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br> </div> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">René <br> <div><br> <blockquote type="cite"> <div>On 10 Feb 2023, at 09:17, <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:rvj...@xs..." moz-do-not-send="true">rvj...@xs...</a> wrote:</div> <br class="Apple-interchange-newline"> <div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Hi Jeff,</span> <div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: ... [truncated message content] |
From: René J. <rvj...@xs...> - 2023-02-11 13:13:56
|
rerouted answer to pipelines list: Jeff, we have an INSIDE stage, so I would skip all quoting and continuing and pick the right lines out of a file with INSIDE - then you can use the class-level help() to call super.help(stage) and have that deliver the lines. (In there we can test the terminal for graphic ability and deliver the optimal graphics - more than one terminal can do SVG nowadays). best regards, René. > On 11 Feb 2023, at 13:34, Jeffrey Hennick <Je...@Je...> wrote: > > Looks great. I'll explore it more later today. Then get to the stage files. Most of them have the railroad diagram in a comment, so it means moving that to the new help() method. I do wish NetRexx had a multi-line quote for this, but adding quote marks and a continuation character to each line should do the trick. (The help stage will need some special work so this method is not taken as a constructor.) > > Thanks! > > Jeff > > On 2/10/2023 4:50 PM, rvj...@xs... <mailto:rvj...@xs...> wrote: >> And you should use getMethod instead of getDeclaredMethod if you want to inherit the help() from stage - the superclass, for stages that don't have helping yet: >> >> parse arg stage_to_help >> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help) >> helpMethod = stageClass.getMethod('help',null) >> say helpMethod.invoke(stageClass,null) >> >> best regards, >> >> René. >>> On 10 Feb 2023, at 22:43, rvj...@xs... <mailto:rvj...@xs...> wrote: >>> >>> Hi Jeff, >>> >>> I think this is the best solution for the moment: We know that the stages package is available. We can load the stage class with the Java Reflection API, and then call (invoke) the help() method on it: >>> >>> ➜ test git:(master) ✗ cat loadhelp.nrx >>> parse arg stage_to_help >>> stageClass = class.forName('org.netrexx.njpipes.stages.'stage_to_help) >>> helpMethod = stageClass.getDeclaredMethod('help',null) >>> say helpMethod.invoke(stageClass,null) >>> >>> ➜ test git:(master) ✗ java loadhelp crc >>> The CRC stage computes a CRC-32 checksum over its input. >>> >>> So you pass in the (short) stage name, complete its name in the class.forName method, which leave a Class object in variable stageClass. We ask that Class object to return the help() method in the variable helpMethod. On that, we invoke it with no parameters, it returns the help message from the static help() method. >>> >>> best regards, >>> >>> René. >>> >>>> On 10 Feb 2023, at 16:14, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>> >>>> and with that I mean the example below-below. >>>> >>>>> On 10 Feb 2023, at 16:08, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>>> >>>>> Hi Jeff, >>>>> >>>>> I added a static help() method to pipes.stage . I also did override that method on the new crc stage; this just to show. >>>>> >>>>> Now about enumeration of the stages: we have several approaches. We could, at NetRexx build time, enumerate all the built-in stages into a structure. That might be the most efficient and straigtforward way. We could also do that dynamically; if the compiler can do it, we also could. This might be more involved and would take slightly longer. >>>>> >>>>> The example below does not work because you need to instantiate the stage before you can call methods on it. >>>>> >>>>> ➜ test git:(master) ✗ cat stagehelp.nrx >>>>> import org.netrexx.njpipes.stages. >>>>> x = find() >>>>> say x.help() >>>>> y = crc() >>>>> say y.help() >>>>> ➜ test git:(master) ✗ nrc stagehelp.nrx >>>>> NetRexx portable processor 4.05-beta build 372-20230210-1550 >>>>> Copyright (c) RexxLA, 2011,2023. All rights reserved. >>>>> Parts Copyright (c) IBM Corporation, 1995,2008. >>>>> Program stagehelp.nrx >>>>> Compilation of 'stagehelp.nrx' successful >>>>> ➜ test git:(master) ✗ java stagehelp >>>>> for this stage no help is available yet >>>>> The CRC stage computes a CRC-32 checksum over its input. >>>>> ➜ test git:(master) ✗ >>>>> >>>>> >>>>> best regards, >>>>> >>>>> René >>>>> >>>>>> On 10 Feb 2023, at 09:17, rvj...@xs... <mailto:rvj...@xs...> wrote: >>>>>> >>>>>> Hi Jeff, >>>>>> >>>>>> if you want each stage to have a help() method, you should add it to the stage class itself. On each subclass of stage (the stages) you can then override the help() method - in stage.help() itself, you can state there is no specific help yet or have some other generic message. >>>>>> >>>>>> If you want to call these from another class, you should have an instance of a stage and then call its help(). Using reflective loading, you should be able to load these from the jar. >>>>>> Java has no easier way to ‘give me all subclasses of a class.’ >>>>>> >>>>>> I’ll try to make an example as soon as the coffee starts working. >>>>>> >>>>>> best regards, >>>>>> >>>>>> René. >>>>>> >>>>>> >>>>>>> On 9 Feb 2023, at 21:20, Jeffrey Hennick <Je...@Je...> <mailto:Je...@Je...> wrote: >>>>>>> >>>>>>> I am attempting to make a HELP stage for pipelines. This would give info about any given stage. I would like, for ease of maintenance, store this help information in the stage's file, rather than a central "database." >>>>>>> >>>>>>> My naive approach is to add a help() method that returns a long string with the information to each stage source file. For testing I have such in the find.nrx, and it compiles nicely. >>>>>>> >>>>>>> I can call that method from within the find stage and it displays the information with, for now, say help(). >>>>>>> >>>>>>> What I have not been successful at is calling it from another class file, specifically help.nrx. >>>>>>> >>>>>>> Both stage files have these in the header section >>>>>>> >>>>>>> options nostrictcase nostrictargs nostrictsignal >>>>>>> package org.netrexx.njpipes.stages >>>>>>> >>>>>>> import org.netrexx.njpipes.pipes. >>>>>>> >>>>>>> class help [or find] extends stage binary >>>>>>> >>>>>>> method run() >>>>>>> >>>>>>> the help continues >>>>>>> >>>>>>> >>>>>>> parse arg() stage . >>>>>>> h = stage.help() >>>>>>> say h >>>>>>> >>>>>>> loop forever >>>>>>> aobj = peekto() >>>>>>> output(aobj) >>>>>>> readto() >>>>>>> catch StageError >>>>>>> end >>>>>>> >>>>>>> rc = mrc() >>>>>>> exit(rc*(rc<>12)) >>>>>>> >>>>>>> Whit this, when I compile, I get this error message: >>>>>>> >>>>>>> [buildnrc] Program help.nrx >>>>>>> [buildnrc] [C:\Users\Jeff\Documents\nr\netrexx-code\build\classes\org\netrexx\n >>>>>>> jpipes\stages\help.nrx 22 11 4] Error: The method 'help()' cannot be found in cl >>>>>>> ass 'netrexx.lang.Rexx' or a superclass >>>>>>> >>>>>>> BUILD FAILED >>>>>>> >>>>>>> What is the correct wording to call the help() method in the "stage" class, where in my test case stage is "find". I don't know how to make it clear the the "stage" in "stage.help()" is a variable. >>>>>>> >>>>>>> Thanks for any pointers -- or ideas to get around this. >>>>>>> >>>>>>> Jeff >>>>>>> >>>>>> >>>>> >>>> >>> >> > > _._,_._,_ > Groups.io Links: > You receive all messages sent to this group. > > View/Reply Online (#339) <https://groups.io/g/netrexx/message/339> | Reply To Group <mailto:ne...@gr...?subject=Re:%20Re%3A%20%5Bnetrexx%5D%20Calling%20a%20method%20in%20another%2C%20variable%2C%20class> | Reply To Sender <mailto:Je...@Je...?subject=Private:%20Re:%20Re%3A%20%5Bnetrexx%5D%20Calling%20a%20method%20in%20another%2C%20variable%2C%20class> | Mute This Topic <https://groups.io/mt/96861952/5057901> | New Topic <https://groups.io/g/netrexx/post> > Your Subscription <https://groups.io/g/netrexx/editsub/5057901> | Contact Group Owner <mailto:net...@gr...> | Unsubscribe <https://groups.io/g/netrexx/leave/10808172/5057901/1344565786/xyzzy> [pre...@re...] > > _._,_._,_ |
From: Jeff H. <Je...@Je...> - 2023-02-09 20:31:46
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>I have pushed a new <b>CRC</b> stage, with documentation and tests.</p> <p>For now, it supports only CRC-32. It does use both primary and secondary outputs as CMS.<br> </p> <p><font face="monospace"> +------------------------------+ +--CRC-32----------+<br> >>--CRC--v-+--------------------------+-+--+------------------+--><<br> +--APPEND------------------+ +--CRC-16-(1)------+<br> +--Each--+---------------+-+ +--CRC-16I-(1)-----+<br> | +--CRCFIRST-(1)-+ | +--CCITT-16-(1)----+<br> +--ADDLENgth-(1)-----------+ +--CKSUM-(1)-------+<br> +--| Custom (1) |--+<br> <br> Custom: (1)<br> +--------------------------+<br> |--+--16-BIT--+--hexString--v-+----------------------+-+--|<br> +--32-BIT--+ +--ADDLENgth-----------+<br> +--COMPLEMENT----------+<br> +--PRELOAD--hexString--+<br> +--REFLIN--------------+<br> +--REFLOUT-------------+<br> +--XOROUT--hexString---+<br> <br> Notes:<br> (1) CMS Pipelines only; not yet in NetRexx Pipelines.<br> <br> */ <br> </font></p> <p>Jeff<font face="monospace"><br> </font></p> <p><font face="monospace"> </font><br> </p> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-02-06 19:26:52
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <h1 class="gh-header-title mb-2 lh-condensed f1 mr-0 flex-auto wb-break-word"> <bdi class="js-issue-title markdown-title">NetRexx Issue: XLATE bug with WordSeparator input range</bdi> <span class="f1-light color-fg-muted">#32</span> </h1> <p></p> <blockquote> <p>PS C:\Users\Jeff\Documents\PipeTests> pipc m.njp<br> pipe (m ) literal A<del>B</del>C<del>D</del>E<del>F</del>G | xlate ws ~ w3 A-E 1-5 | cons ?<br> PS C:\Users\Jeff\Documents\PipeTests> java m<br> netrexx.lang.BadArgumentException: Bad hexadecimal ~A<br> at netrexx.lang.RexxUtil.x2c(RexxUtil.java:252)<br> at netrexx.lang.Rexx.x2c(Rexx.java:1570)<br> at org.netrexx.njpipes.stages.xlate.processRanges(xlate.java:500)<br> at org.netrexx.njpipes.stages.xlate.run(xlate.java:323)<br> at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76)<br> at java.lang.Thread.run(Unknown Source)<br> Exiting due to uncaught Exception Bad hexadecimal ~A</p> </blockquote> <p>On investigation, the problem has nothing to do with hexadecimals, bad or otherwise.</p> <p>It is actually a <b>Syntax Error</b>. The <b>XLATE</b> stage does not and never was supposed to support a <b>ws</b> option.</p> <p>I have fixed the stage so it reports this, and others, as a Syntax Error:<br> </p> <blockquote> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"literal a#b#c#A #B#C| xlate ws # w3 c @ | cons"</span><span style="color:#D3D7CF;background-color:#012456;"> RC=11 xlate_2 Error -- xlate_2 syntax error rc=11</span></div> </blockquote> <p>I also flagged the CMS Pipeline options not yet in NetRexx Pipelines:<br> </p> <blockquote> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"literal a#b#c#A</span> <span style="color:#06989A;background-color:#012456;">#B#C| xlate input | cons"</span> <span style="color:#06989A;background-color:#012456;"></span><span style="color:#D3D7CF;background-color:#012456;">xlate_2 Error -- xlate_2 INput option is not yet supported. rc=11</span></div> </blockquote> <p>This update has been pushed and should be in the next release.</p> <p>I don't know how to work the GitHub Issue system, so for now the issue stays open.</p> <p>Jeff<br> </p> <p><br> </p> <p><br> </p> <p><br> </p> </body> </html> |
From: Marc R. <re...@gm...> - 2023-02-06 15:34:42
|
Issue #44 closed, as fixed by Jeff. Marc On 2/6/23 12:42, Marc Remes wrote: > As requested, NetRexx Pipelines specs issue #44 opened. > > Marc > > On 2/6/23 12:13, René Jansen wrote: >> Hi Marc, >> >> no, this is no good and needs fixing. On VM Pipelines the output is the same as the 4-10 case: none. >> So we have something to trace and fix. If you could open an issue at https://github.com/RexxLA/NetRexx/issues <https://github.com/RexxLA/NetRexx/issues> then whoever is going to work on it can assign themselves and avoid we are doing duplicate work. If I am going to fix it, I will check the issue first. >> >> best regards, >> >> René. >> >>> On 6 Feb 2023, at 12:03, Marc Remes <re...@gm...> wrote: >>> >>> Is this expected behaviour? (running with latest 4.05 beta updates) >>> >>> $ pipe 'literal 123 | specs 1-10 1 | cons ' >>> 123 >>> $ pipe 'literal 123 | specs 2-10 1 | cons ' >>> 23 >>> $ pipe 'literal 123 | specs 3-10 1 | cons ' >>> 3 >>> $ pipe 'literal 123 | specs 4-10 1 | cons ' >>> >>> $ pipe 'literal 123 | specs 5-10 1 | cons ' >>> netrexx.lang.BadArgumentException: Argument -1 < 0 >>> at netrexx.lang.Rexx.intcheck(Rexx.java:920) >>> at netrexx.lang.Rexx.substr(Rexx.java:1458) >>> at netrexx.lang.Rexx.substr(Rexx.java:1452) >>> at p5e8377b_specs_2.run(p5e8377b.java:173) >>> at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76) >>> at java.base/java.lang.Thread.run(Thread.java:1589) >>> ThreadQ Thread[#27,Thread-1,5,njPipes] >>> ThreadQ Thread[#27,Thread-1,5,njPipes] >>> Exiting due to uncaught Exception Argument -1 < 0 >>> ThreadQ Thread[#27,Thread-1,5,njPipes] >>> Exiting due to uncaught Exception Argument -1 < 0 >>> ThreadQ Thread[#29,Thread-3,5,njPipes] >>> Exiting due to uncaught Exception Argument -1 < 0 >>> ThreadQ Thread[#29,Thread-3,5,njPipes] >>> ThreadQ Thread[#29,Thread-3,5,njPipes] >>> >>> Marc >>> _______________________________________________ >>> netrexx-pipelines mailing list >>> net...@li... >>> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines >> |
From: Jeff H. <Je...@Je...> - 2023-02-06 13:12:12
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>*********************</p> <p>Marc,</p> <p>Gmail refused this the first time. I have contacted my Host, and have made a recommended change to my account.</p> <p>So, trying again.</p> <p>Jeff</p> <p>*********************<br> </p> <p>Marc,</p> <p>Thank you! For reporting the bug you get the week's very first Virtual Doughnut! Any variety you wish.</p> <p>I have fixed it, added two tests: "spec 5-10 1" and "spec 500-1000 1", re-run all the tests, and pushed the fix and tests.</p> <p>Sorry, I have had no experience yet with the Github Issues system, so I have not cleared the issue there.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/6/2023 6:42 AM, Marc Remes wrote:<br> </div> <blockquote type="cite" cite="mid:5cb...@gm...">As requested, NetRexx Pipelines specs issue #44 opened. <br> <br> Marc <br> <br> On 2/6/23 12:13, René Jansen wrote: <br> <blockquote type="cite">Hi Marc, <br> <br> no, this is no good and needs fixing. On VM Pipelines the output is the same as the 4-10 case: none. <br> So we have something to trace and fix. If you could open an issue at <a class="moz-txt-link-freetext" href="https://github.com/RexxLA/NetRexx/issues" moz-do-not-send="true">https://github.com/RexxLA/NetRexx/issues</a> <a class="moz-txt-link-rfc2396E" href="https://github.com/RexxLA/NetRexx/issues" moz-do-not-send="true"><https://github.com/RexxLA/NetRexx/issues></a> then whoever is going to work on it can assign themselves and avoid we are doing duplicate work. If I am going to fix it, I will check the issue first. <br> <br> best regards, <br> <br> René. <br> <br> <blockquote type="cite">On 6 Feb 2023, at 12:03, Marc Remes <a class="moz-txt-link-rfc2396E" href="mailto:re...@gm..." moz-do-not-send="true"><re...@gm...></a> wrote: <br> <br> Is this expected behaviour? (running with latest 4.05 beta updates) <br> <br> $ pipe 'literal 123 | specs 1-10 1 | cons ' <br> 123 <br> $ pipe 'literal 123 | specs 2-10 1 | cons ' <br> 23 <br> $ pipe 'literal 123 | specs 3-10 1 | cons ' <br> 3 <br> $ pipe 'literal 123 | specs 4-10 1 | cons ' <br> <br> $ pipe 'literal 123 | specs 5-10 1 | cons ' <br> netrexx.lang.BadArgumentException: Argument -1 < 0 <br> at netrexx.lang.Rexx.intcheck(Rexx.java:920) <br> at netrexx.lang.Rexx.substr(Rexx.java:1458) <br> at netrexx.lang.Rexx.substr(Rexx.java:1452) <br> at p5e8377b_specs_2.run(p5e8377b.java:173) <br> at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76) <br> at java.base/java.lang.Thread.run(Thread.java:1589) <br> ThreadQ Thread[#27,Thread-1,5,njPipes] <br> ThreadQ Thread[#27,Thread-1,5,njPipes] <br> Exiting due to uncaught Exception Argument -1 < 0 <br> ThreadQ Thread[#27,Thread-1,5,njPipes] <br> Exiting due to uncaught Exception Argument -1 < 0 <br> ThreadQ Thread[#29,Thread-3,5,njPipes] <br> Exiting due to uncaught Exception Argument -1 < 0 <br> ThreadQ Thread[#29,Thread-3,5,njPipes] <br> ThreadQ Thread[#29,Thread-3,5,njPipes] <br> <br> Marc <br> _______________________________________________ <br> netrexx-pipelines mailing list <br> <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:net...@li..." moz-do-not-send="true">net...@li...</a> <br> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines" moz-do-not-send="true">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> <br> </blockquote> <br> </blockquote> <br> <fieldset class="moz-mime-attachment-header"></fieldset> <br> <fieldset class="moz-mime-attachment-header"></fieldset> <pre class="moz-quote-pre" wrap="">_______________________________________________ netrexx-pipelines mailing list <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:net...@li..." moz-do-not-send="true">net...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines" moz-do-not-send="true">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> </pre> </blockquote> </body> </html> |
From: Jeff H. <Je...@Je...> - 2023-02-06 12:57:03
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Marc,</p> <p>Thank you! For reporting the bug you get the week's very first Virtual Doughnut! Any variety you wish.</p> <p>I have fixed it, added two tests: "spec 5-10 1" and "spec 500-1000 1", re-run all the tests, and pushed the fix and tests.</p> <p>Sorry, I have had no experience yet with the Github Issues system, so I have not cleared the issue there.</p> <p>Jeff<br> </p> <div class="moz-cite-prefix">On 2/6/2023 6:42 AM, Marc Remes wrote:<br> </div> <blockquote type="cite" cite="mid:5cb...@gm...">As requested, NetRexx Pipelines specs issue #44 opened. <br> <br> Marc <br> <br> On 2/6/23 12:13, René Jansen wrote: <br> <blockquote type="cite">Hi Marc, <br> <br> no, this is no good and needs fixing. On VM Pipelines the output is the same as the 4-10 case: none. <br> So we have something to trace and fix. If you could open an issue at <a class="moz-txt-link-freetext" href="https://github.com/RexxLA/NetRexx/issues">https://github.com/RexxLA/NetRexx/issues</a> <a class="moz-txt-link-rfc2396E" href="https://github.com/RexxLA/NetRexx/issues"><https://github.com/RexxLA/NetRexx/issues></a> then whoever is going to work on it can assign themselves and avoid we are doing duplicate work. If I am going to fix it, I will check the issue first. <br> <br> best regards, <br> <br> René. <br> <br> <blockquote type="cite">On 6 Feb 2023, at 12:03, Marc Remes <a class="moz-txt-link-rfc2396E" href="mailto:re...@gm..."><re...@gm...></a> wrote: <br> <br> Is this expected behaviour? (running with latest 4.05 beta updates) <br> <br> $ pipe 'literal 123 | specs 1-10 1 | cons ' <br> 123 <br> $ pipe 'literal 123 | specs 2-10 1 | cons ' <br> 23 <br> $ pipe 'literal 123 | specs 3-10 1 | cons ' <br> 3 <br> $ pipe 'literal 123 | specs 4-10 1 | cons ' <br> <br> $ pipe 'literal 123 | specs 5-10 1 | cons ' <br> netrexx.lang.BadArgumentException: Argument -1 < 0 <br> at netrexx.lang.Rexx.intcheck(Rexx.java:920) <br> at netrexx.lang.Rexx.substr(Rexx.java:1458) <br> at netrexx.lang.Rexx.substr(Rexx.java:1452) <br> at p5e8377b_specs_2.run(p5e8377b.java:173) <br> at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76) <br> at java.base/java.lang.Thread.run(Thread.java:1589) <br> ThreadQ Thread[#27,Thread-1,5,njPipes] <br> ThreadQ Thread[#27,Thread-1,5,njPipes] <br> Exiting due to uncaught Exception Argument -1 < 0 <br> ThreadQ Thread[#27,Thread-1,5,njPipes] <br> Exiting due to uncaught Exception Argument -1 < 0 <br> ThreadQ Thread[#29,Thread-3,5,njPipes] <br> Exiting due to uncaught Exception Argument -1 < 0 <br> ThreadQ Thread[#29,Thread-3,5,njPipes] <br> ThreadQ Thread[#29,Thread-3,5,njPipes] <br> <br> Marc <br> _______________________________________________ <br> netrexx-pipelines mailing list <br> <a class="moz-txt-link-abbreviated" href="mailto:net...@li...">net...@li...</a> <br> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> <br> </blockquote> <br> </blockquote> <br> <fieldset class="moz-mime-attachment-header"></fieldset> <br> <fieldset class="moz-mime-attachment-header"></fieldset> <pre class="moz-quote-pre" wrap="">_______________________________________________ netrexx-pipelines mailing list <a class="moz-txt-link-abbreviated" href="mailto:net...@li...">net...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> </pre> </blockquote> </body> </html> |
From: Marc R. <re...@gm...> - 2023-02-06 11:42:33
|
As requested, NetRexx Pipelines specs issue #44 opened. Marc On 2/6/23 12:13, René Jansen wrote: > Hi Marc, > > no, this is no good and needs fixing. On VM Pipelines the output is the same as the 4-10 case: none. > So we have something to trace and fix. If you could open an issue at https://github.com/RexxLA/NetRexx/issues <https://github.com/RexxLA/NetRexx/issues> then whoever is going to work on it can assign themselves and avoid we are doing duplicate work. If I am going to fix it, I will check the issue first. > > best regards, > > René. > >> On 6 Feb 2023, at 12:03, Marc Remes <re...@gm...> wrote: >> >> Is this expected behaviour? (running with latest 4.05 beta updates) >> >> $ pipe 'literal 123 | specs 1-10 1 | cons ' >> 123 >> $ pipe 'literal 123 | specs 2-10 1 | cons ' >> 23 >> $ pipe 'literal 123 | specs 3-10 1 | cons ' >> 3 >> $ pipe 'literal 123 | specs 4-10 1 | cons ' >> >> $ pipe 'literal 123 | specs 5-10 1 | cons ' >> netrexx.lang.BadArgumentException: Argument -1 < 0 >> at netrexx.lang.Rexx.intcheck(Rexx.java:920) >> at netrexx.lang.Rexx.substr(Rexx.java:1458) >> at netrexx.lang.Rexx.substr(Rexx.java:1452) >> at p5e8377b_specs_2.run(p5e8377b.java:173) >> at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76) >> at java.base/java.lang.Thread.run(Thread.java:1589) >> ThreadQ Thread[#27,Thread-1,5,njPipes] >> ThreadQ Thread[#27,Thread-1,5,njPipes] >> Exiting due to uncaught Exception Argument -1 < 0 >> ThreadQ Thread[#27,Thread-1,5,njPipes] >> Exiting due to uncaught Exception Argument -1 < 0 >> ThreadQ Thread[#29,Thread-3,5,njPipes] >> Exiting due to uncaught Exception Argument -1 < 0 >> ThreadQ Thread[#29,Thread-3,5,njPipes] >> ThreadQ Thread[#29,Thread-3,5,njPipes] >> >> Marc >> _______________________________________________ >> netrexx-pipelines mailing list >> net...@li... >> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines > |
From: René J. <rvj...@xs...> - 2023-02-06 11:13:22
|
Hi Marc, no, this is no good and needs fixing. On VM Pipelines the output is the same as the 4-10 case: none. So we have something to trace and fix. If you could open an issue at https://github.com/RexxLA/NetRexx/issues then whoever is going to work on it can assign themselves and avoid we are doing duplicate work. If I am going to fix it, I will check the issue first. best regards, René. > On 6 Feb 2023, at 12:03, Marc Remes <re...@gm...> wrote: > > Is this expected behaviour? (running with latest 4.05 beta updates) > > $ pipe 'literal 123 | specs 1-10 1 | cons ' > 123 > $ pipe 'literal 123 | specs 2-10 1 | cons ' > 23 > $ pipe 'literal 123 | specs 3-10 1 | cons ' > 3 > $ pipe 'literal 123 | specs 4-10 1 | cons ' > > $ pipe 'literal 123 | specs 5-10 1 | cons ' > netrexx.lang.BadArgumentException: Argument -1 < 0 > at netrexx.lang.Rexx.intcheck(Rexx.java:920) > at netrexx.lang.Rexx.substr(Rexx.java:1458) > at netrexx.lang.Rexx.substr(Rexx.java:1452) > at p5e8377b_specs_2.run(p5e8377b.java:173) > at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76) > at java.base/java.lang.Thread.run(Thread.java:1589) > ThreadQ Thread[#27,Thread-1,5,njPipes] > ThreadQ Thread[#27,Thread-1,5,njPipes] > Exiting due to uncaught Exception Argument -1 < 0 > ThreadQ Thread[#27,Thread-1,5,njPipes] > Exiting due to uncaught Exception Argument -1 < 0 > ThreadQ Thread[#29,Thread-3,5,njPipes] > Exiting due to uncaught Exception Argument -1 < 0 > ThreadQ Thread[#29,Thread-3,5,njPipes] > ThreadQ Thread[#29,Thread-3,5,njPipes] > > Marc > _______________________________________________ > netrexx-pipelines mailing list > net...@li... > https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |
From: Marc R. <re...@gm...> - 2023-02-06 11:03:15
|
Is this expected behaviour? (running with latest 4.05 beta updates) $ pipe 'literal 123 | specs 1-10 1 | cons ' 123 $ pipe 'literal 123 | specs 2-10 1 | cons ' 23 $ pipe 'literal 123 | specs 3-10 1 | cons ' 3 $ pipe 'literal 123 | specs 4-10 1 | cons ' $ pipe 'literal 123 | specs 5-10 1 | cons ' netrexx.lang.BadArgumentException: Argument -1 < 0 at netrexx.lang.Rexx.intcheck(Rexx.java:920) at netrexx.lang.Rexx.substr(Rexx.java:1458) at netrexx.lang.Rexx.substr(Rexx.java:1452) at p5e8377b_specs_2.run(p5e8377b.java:173) at org.netrexx.njpipes.pipes.ThreadPool.run(ThreadPool.java:76) at java.base/java.lang.Thread.run(Thread.java:1589) ThreadQ Thread[#27,Thread-1,5,njPipes] ThreadQ Thread[#27,Thread-1,5,njPipes] Exiting due to uncaught Exception Argument -1 < 0 ThreadQ Thread[#27,Thread-1,5,njPipes] Exiting due to uncaught Exception Argument -1 < 0 ThreadQ Thread[#29,Thread-3,5,njPipes] Exiting due to uncaught Exception Argument -1 < 0 ThreadQ Thread[#29,Thread-3,5,njPipes] ThreadQ Thread[#29,Thread-3,5,njPipes] Marc |
From: Marc R. <re...@gm...> - 2023-01-16 12:37:19
|
And diskr.nrx (the diskr stage) has plenty of RC 13 In this case it is catch FileNotFoundException -- say 'File 'Arg()' Not found' Emsg(13,'Error - File "'file'" not found') Still trying to understand this pipelines thing.. Marc On 1/16/23 13:15, Marc Remes wrote: > Hi Leslie, > > method inStream of class Stage has 'Error(13,'inStream no stream selected')'. > That seems relevant in your case. > > FWIW, it's not the compiler that errors, it is a StageError; > > Marc > > > On 1/15/23 22:26, J Leslie Turriff wrote: >> Hi, >> This question is slightly related to "Question about delimited strings". >> >> When I run this pipeline >> >> | ~/bin/NetRexx >> | $ pipe '(getHelp) < getOOrexxDocs.nrx | inside %/* -- Help File Text Start -% %*/ -- >> Help File Text End -% | console' >> | NOTE: Picked up JDK_JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true >> | : >> | @14:27:11,leslie@pinto rc=0 >> >> from the directory where getOOrexx.Docs.nrx resides, it produces the expected output; but >> when I run it from a different directory, e.g. >> >> | ~/bin/NetRexx/Pipelines >> | $ pipe '(getHelp) < /home/leslie/bin/NetRexx/getOOrexxDocs.nrx | inside %/* -- Help File >> Text Start -% %*/ -- Help File Text End -% | console' >> | NOTE: Picked up JDK_JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true >> | RC=13 >> | @15:24:32,leslie@pinto rc=0 >> >> instead of the expected output I get someone's RC=13. Note also that the last line shows >> that the return code that bash sees is 0. >> Where does this RC=13 come from? The only return codes mentioned (In the Progamming >> Guide) are 0, 1 or 2 from the compiler. Might it be from Java? >> >> Leslie >> -- >> Platform: GNU/Linux >> Hardware: x86_64 >> Distribution: openSUSE Leap 15.4 >> NetRexx: 4.03-GA build 260-20220503-1730 >> >> >> _______________________________________________ >> netrexx-pipelines mailing list >> net...@li... >> https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines |