external apl editing

Let it all hang out

external apl editing

PostPosted by drab » Tue Oct 10, 2017 10:38 am

A fairly simple first step toward using an external editor might be to implement the )EDITOR command.

I don't know if it's still around anywhere, but I think it was in an early APL2. I also don't recall the precise syntax, but it basically allowed the naming of an editor to invoke when del is used in the SM.

I could be something like

)EDITOR editapl

and then the external script or module named editapl could be called with an argument indicating a temporary file, which would be pre-loaded with the function's representation.

In the simplest scenario, APL could just wait for the script to return, and then it could check to see if the file was saved with a new time stamp. If so, then it would re-fix the function with the new representation.

But it could get more complex than that -- and more useful too.

As with the current internal editing, there might be multiple functions open at the same time, and any/all of them could be re-saved at any time. A full blown mechanism might need to do something similar, and keep a list of all the open function functions, and continuously monitor each of them for new saves.


This is just a first step.
Once we have a coupling mechanism in place and working, we can look further into which external editors might be best to use for APL.
drab
 
Posts: 315
Joined: Thu Oct 09, 2014 6:23 am

Re: external apl editing

PostPosted by drab » Tue Oct 10, 2017 10:59 am

Here's another aspect that might be worth considering ...

Some editors have the concept of editing a "ring" of files together, which might be a little different from editing each of those files separately. There might be some additional useful operations that are only available within a ring.

Throwing a ring of functions to an external editor would be a new thing, which would need a new syntax.

But it doesn't have to be complicated.

For example, there might be a double ∇∇ command, like

∇∇ f1 f2 f3

to edit a ring of 3 functions f1, f2, and f3.
drab
 
Posts: 315
Joined: Thu Oct 09, 2014 6:23 am


Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron