Blake, try to open the offending function in the native ∇ editor and immediately exit the editor (no changes are necessary). I think you'll find the function will now work. I agree that nothing in the offending statement that is a syntax error.
I too believe this is aome bug in GNU APL. Otherwise, why would it work when doing something as simple as opening the function with the ∇ editor? - Paul > On Feb 9, 2025, at 2:09 PM, Blake McBride <blake1...@gmail.com> wrote: > > In case I haven't been clear, as far as I can tell, all of the problems are > with GNU APL and none are with the Editor code. At some earlier date, this > exact editor code worked fine under GNU APL. The editor code hasn't changed > but no longer works; as reported. > > If errors in the editor are found, I am happy to correct them. > > Thanks. > > Blake > > > On Sun, Feb 9, 2025 at 12:22 PM Blake McBride <blake1...@gmail.com > <mailto:blake1...@gmail.com>> wrote: >> The help message should be printed by the first line of E∆Pim. I checked it >> and the code is correct. It just doesn't run. >> >> If I cut/paste the code into GNU APL it works fine. But it doesn't run >> inside a function. >> >> Just FYI, this Editor WS was used in a production environment, on a daily >> basis, for years on other APL systems. When moving it to GNU APL I had to >> type it in so typos are possible. Other than typos, however, the code is >> solid. >> >> Thanks. >> >> Blake >> >> >> On Sun, Feb 9, 2025 at 11:51 AM Blake McBride <blake1...@gmail.com >> <mailto:blake1...@gmail.com>> wrote: >>> Greetings, >>> >>> I haven't been using GNU APL for a while - just because I had other things >>> I needed to do. Now, trying to debug this issue I am finding several >>> issues. Here is the first: >>> >>> )load Editor >>> SAVED 2025-02-09 10:13:37 (GMT-6) >>> ⎕IO←0 >>> (⎕CR 'E∆Edit')[31;] >>> EN1:→(2↑bv←qq E∆Pim'Enter your edit command')/END,EN1 >>> >>> >>> E∆Edit 'E∆Edit' >>> >>> 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? help >>> Enter your edit command? end >>> SYNTAX ERROR >>> E∆Edit[31] →(2↑bv←qq E∆Pim 'Enter your edit command')/31 34 >>> ^^ >>> >>> 1. It shouldn't show "31 34". It should show "END,EN1". >>> >>> 2. Syntax error. Really? Where? >>> >>> 3. When I typed 'help' it should have seen a help message. I haven't >>> traced this through because of the syntax error. >>> >>> This code worked fine as-is when it was released. >>> >>> I'll see what I can do with #3. >>> >>> Thanks! >>> >>> Blake >>> >>> >>> On Sun, Feb 9, 2025 at 10:07 AM Blake McBride <blake1...@gmail.com >>> <mailto:blake1...@gmail.com>> wrote: >>>> 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 <mailto:mail@j%C3%BCrgen-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> <mailto:mail@j%C3%BCrgen-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 >>>>>>>> >>>>>>> >>>>>> >>>>>