Hello, I have been watching this thread. My impression is that it is not my code but a bug in GNU APL. If it is my code, I am very happy to fix it. I will take a look.
Thanks. Blake On Sun, Feb 9, 2025 at 9:08 AM Dr. Jürgen Sauermann < mail@jürgen-sauermann.de> wrote: > Hi Paul, > > maybe Blake has an idea. For me it is very difficult to fix > workspaces that were contributed by other users. For the > author of the workspace fixing problems is far more easy. > > Best Regards, > Jürgen > > > On 2/8/25 19:48, Paul Rockwell wrote: > > Unfortunately, I haven't been able to get this reproduced with anything > simpler. I can reliably reproduce this using Blake's APL Editor found > here: https://github.com/blakemcbride/APLEditor > > I don't believe it to be an error in the functions themselves. I can )LOAD > the original workspace and "fix up" problematic functions that I know have > thrown the syntax error in the past by simply opening and immediately > closing the funcion (no other changes) with the ∇ editor. Things work fine > after that. > > II )SAVE the workspace, and then )LOAD the saved copy, and the error > re-appears. > > I've validated the variables in the offending statement each time the > error appears. All appears normal - there's no syntax error apparent in the > expression, so I have no idea why the interpreter is throwing an error. If > the function/workspace had problems, to me it seems as a result of the > )save,)load,)copy mechanisms. Only the ∇ editor gets me around the issue - > ⎕FX ⎕CR 'function-name' does not. > > Any ideas on how I can help track this down? > > - Paul > > > On Feb 8, 2025, at 11:34 AM, Dr. Jürgen Sauermann > <mail@jürgen-sauermann.de> <mail@jürgen-sauermann.de> wrote: > > Hi Paul, > > that very much looks like an error in the Editor workspace, doesn't it? > Can you reproduce the fault in plain APL? > > Best Regards, > Jürgen > > > On 2/6/25 19:14, Paul Rockwell wrote: > > I've been seeing syntax errors being thrown on functions copied from > another workspace. I've imported Blake McBride's APL editor from his GitHub > site (linked to by the GNU APL Community pages). It seems to be reasonably > up to date. > > Once I have the workspace created containing the editor application, I > )SAVE it. I then create a new workspace and )COPY the functions in the > editor workspace into my current workspace. Then I attempt to use it to > edit a function (an alternative to the ∇ editor). > > What I see is that the copied editor function will fail with a syntax > error on branch statements within the function: > > )copy Editor > SAVED 2025-01-19 15:03:52 (GMT-5) > E∆Edit 'asd' > > > At all prompts you can type 'end' to exit or backup to the previous > question. > You can often type 'help' to get help. > > > Enter the line numbers you wish to change, or [a,b,r]? 2 > SYNTAX ERROR > E∆Piv[18] →(0=⍴t)/0 > ^^ > > However, if you look at the variables involved, there should be nothing > that should cause this syntax error > > t > 2 > ⍴t > 1 > 0=⍴t > 0 > 0/0 > > ⍴0/0 > 0 > > The strange thing about this is that if I open the offending function in > the ∇ editor and save it (making no changes), the error goes away... at > least for that function: > > )si > ∇E∆Piv > [51] ∇ > E∆Edit 'asd' > > > At all prompts you can type 'end' to exit or backup to the previous > question. > You can often type 'help' to get help. > > > Enter your edit command? edit > Enter the line numbers you wish to change, or [a,b,r]? 2 > 24 > > Enter your edit command? end > SYNTAX ERROR > E∆Edit[31] →(2↑bv←qq E∆Pim 'Enter your edit command')/31 34 > ^^ > > > > As you can see, another function is exhibiting the same error. Like the > E∆Piv function, opening the E∆Edit function seems to "fix"the issue. > What doesn't seem fix the issue is using ⎕CR and ⎕FX as an alternative to > the ∇ editor. > > )reset > ⎕FX ⎕CR 'E∆Edit' > E∆Edit > E∆Edit 'asd' > > > At all prompts you can type 'end' to exit or backup to the previous > question. > You can often type 'help' to get help. > > > Enter your edit command? edit > Enter the line numbers you wish to change, or [a,b,r]? 2 > 24 > > Enter your edit command? end > SYNTAX ERROR > E∆Edit[31] →(2↑bv←qq E∆Pim 'Enter your edit command')/31 34 > ^^ > > As you can see, that didn't fix the problem. Now open E∆Edit with the ∇ > editor and see what happens: > > )reset > ∇E∆Edit > [41] ∇ > E∆Edit 'asd' > > > At all prompts you can type 'end' to exit or backup to the previous > question. > You can often type 'help' to get help. > > > Enter your edit command? edit > Enter the line numbers you wish to change, or [a,b,r]? 2 > 24 > > Enter your edit command? end > > > As I said, this is very strange behavior. I can work around it, but quite > honestly it's a pain because I have no idea when the issue is going to crop > up again. > > - Paul Rockwell > > > > >