On 26 April 2014 20:52, Kacper Gutowski <mwgam...@gmail.com> wrote:

> On 2014-04-26 12:08:14, Juergen Sauermann wrote:
> > I could make the ∇-editor aware that a )COPY is in progress and that
> > functions shall be deleted automatically by the ∇-editor.
>
> I like a lot that there is now a command that sources another file
> raw, much like "." in shell or "#include" in cpp.  It's all that is
> needed to make more complex programs/libraries in forms of
> UNIX-ish-style scripts without relying on (hardly readable) workspace
> files.
>
> With this mindset I find any changes to behaviour highly unexpected
> and I would probably report them as a bugs (unless properly documented
> as an actual features, of course).  It might not be a problem in case
> of ∇, but for updating already defined function it's an overkill as it
> can be easily done explicitly by programmer like that:
>
> ∇mean[0]
>   R←mean B
>   R←(+/B)÷⍴B
> ∇
>
> This can be )COPY-ied many times without any problems as it enters the
> editor with a name only and then explicitly rewrites header line at [0].
>

I don't like this at all. I want my APL source files to define functions as
such:

      ∇Z←foo X
      Z←X+1
      ∇

I would also like to be able to reload the source files fully after making
major changes (a simple change can be pushed by simply pressing C-c C-c on
it of course). This means that I don't want to have any unexpected
behaviour when doing so.


> As for implementing )EDIT-like routine, in other systems it launches
> editor with a function body only, not ∇-editor commands.
> So I think it might be a good idea to dump function's ⎕CR to a
> temporary file and then launch external editor on it.  When done
> editing, read it back, split by lines, and simply pass it to ⎕FX.
> Maybe also ⎕EX FN when ⎕FX returns success with a different name,
> and)COPY/)DUMP to destination file as appropriate.
>

That is essentially what the Emacs mode does today, internally. Although it
uses some native code to do it.

Regards,
Elias

Reply via email to