|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] APL and text editors- some initial thoughts |
Date: | Mon, 28 Apr 2014 18:41:43 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi Peter,
the current line editor of GNU APL is in Nabla.cc. It is pretty simple. The editor gets its line input from Input::get_user_line_nabla(). My concern with [a⎕b] is this: currently we print a prompt and then get a user line from either readline or from the operating system (in cooked mode). The editing facilities within the line (delete char, insert char, etc.) are either provided by readline or by the OS (or shell?). In order to do [a⎕b] we could: 1. ignore the column but recall the line and make it editable, or 2. full [a⎕b] with cursor positioned at column b (or was it a? The description in the IBM manual is pretty thin]. For readline this is kind of do-able (not trivial) because readline has functions for stuffing characters (the recalled line) back into it. For the OS (fgets() based) this could be entirely different and may need knowledge of the terminal (backspace vs. erase etc, or cursor positioning? The OS variant is probably much harder to get right and portable. I guess most user are fine with 1. alone because that is currently missing. Long term my plan is have an )EDITOR command that lets you specify an APL function (typically a native one) that is called with a character array like ⎕CR 'foo' and returns a new array with the new function header and body. So if you want to give it a try then please go ahead! I'll be happy to answer all questions that you may have. /// Jürgen On 04/28/2014 06:17 PM, Peter Teeson wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |