bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] emacs and apl


From: Juergen Sauermann
Subject: Re: [Bug-apl] emacs and apl
Date: Sat, 26 Apr 2014 16:37:14 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi,

yes, ]XTERM ON/OFF (which is now called ]COLOR ON/OFF because it now also works for non-xterms/non-VT100 terminals) is an APL (debug-) command that is only available in immediate execution mode. The reason is that commands do not follow the normal APL syntax
and return no results.

I think of scripts as simply an alternative input method, or kind of batch mode as it was called in the past. It is the same as with a shell - you can use it interactively to see results immediately
or with a script file.

I find myself more and more often writing APL scripts instead of running APL interactively. It allows you to bring your workspace quickly into a known state and you can view and edit all functions at the same time rather than opening and closing them per function. And you can
do refactoring (that is :1,$s/xxx/yyy/g) in  no time.

/// Jürgen


On 04/26/2014 02:48 PM, address@hidden wrote:
On Sat, 26 Apr 2014 12:34:06 +0200
Juergen Sauermann <address@hidden> wrote:

Hi,

correct. Since saving an entire workspace is usually fast (unless it
contains huge amounts of data)
that should be ok. Think of a workspace as an analog of a C/C++ source
file where you typically
have several related functions and you edit the entire file when you
change a function. So )DUMP
is just )SAVE with a different output file format.
I've been using the )DUMP file more and more with )COPY now then the )LOAD - 
seems to give real control over the workspace
It could be that our library discussion brings us to a point where you
can specify a prefix
(such as lib∆) of the object names that will be dumped.

The )COPY command allows for selective copying of objects but that works
only for .xml files
and not for scrippt (.apl) files.
yes it exits the apl when tried

question on the scripts
]XTERM OFF works in a script but not in a function - is this correct? I have 
been thinking of scripts as independent functions is this the wrong way to 
think about them then?

This was mainly for compatibility with
IBM APL2 - I have always
considered that as not very handy.

/// Jürgen



On 04/25/2014 08:30 PM, address@hidden wrote:
On Fri, 25 Apr 2014 19:44:21 +0200
Juergen Sauermann <address@hidden> wrote:

Hi,

much simpler: edit a (UTF8 encoded) text file and )COPY it.
vi(m) is perfect for this.

Variables can be assigned like in APL, i.e.

VAR←1 2 3

Functions can be created via ⎕FX (hardly readable) or (may favorite)
using ∇:

∇Z ← AVE B
    Z←(+/B)÷⍴B
∇

The file must start with #! so )COPY knows it is a text file and not an
XML file.
You can also create such files with )DUMP instead of )SAVE.
)copy can copy objects but )dump saves full workspaces?
can )dump save back the fns to the text file

/// Jürgen


On 04/25/2014 04:54 PM, address@hidden wrote:
I did take a look and the horrors of the 12th Emacs Vim Battle at GNU Harbour 
came back in a flash and shut that down ;)
http://en.wikipedia.org/wiki/Editor_war

I wonder if editing the function in the ws.xml file and then reloading might be 
an avenue to explore?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]