bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] A suggestion concerning the readline library


From: Juergen Sauermann
Subject: Re: [Bug-apl] A suggestion concerning the readline library
Date: Sun, 16 Feb 2014 19:49:54 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi Thomas,

welcome to the world of APL!

I did not know rlwrap before, but I just installed it and tried APL with it. Cool!

As you may have seen there were some problems in GNU APL recently that seems
to be readline related. The root cause of these problems is still unknown. After having GNU APL ./configured with --without-readline and then started it from rlwrap, it looks like these problems do not occur (more tests needed, though) and full readline functionality
is still there.

As you may have seen as well, Elias is working on emacs integration with GNU APL. It would be good if there were a common solution for emacs, vim, and other editors. IBM APL2 has
an )EDITOR command while GNU APL has not (yet).

I personally find it strange to open an editor for a single line of input, but it makes sense to do that for larger objects like APL functions or larger variables. For one-liners xterm combined
with middle-mouse-button copy/past is still the fastest way to edit.

I would be interested what is needed to start an editor via libreadline.

Best Regards,
J├╝rgen Sauermann


On 02/13/2014 05:18 PM, Thomas Baruchel wrote:
Hi, first of all, I am a new APL user; I wish to learn APL mostly with GNU APL 
(I installed NGN + nodejs as well as Dyalog APL on my raspberry however).
Since I have been coding in several other languages for many years, I would be 
happy to help if I can.

First of all, I started a new blog: http://apl-adventures.tumblr.com/ with all 
my experiments.

Please, could you have a look at my second "trick" on the following post: 
http://apl-adventures.tumblr.com/post/76529518369/some-tricks-for-using-apl-under-linux

In two words, I tried to launch GNu APL from rlwrap. It can sound weird since 
GNU APL has its own readline support, but I
found something very useful to me. rlwrap uses the readline library with a 
custom function allowing to launch an editor
from the readline library at any time for a one-line shot. (you hit 
Ctrl-something, you get your EDITOR (environment
variable) launched, Vim, emacs or whatever, you finish editing your line, you 
save, you leave, and you have your line
interpreted).

Since an APL line is something more complicated than a line in other languages 
(unicode characters, etc.), I think it could
be useful to do the same in GNU APL: define a special readline function (the 
user can decide to use it or not from his/her
own ~/.inpurtc file) and launch the EDITOR from the REPL.

I had a look at the GNU readline manual and found it should be quite easy to do 
it.

What do you think of the idea?

Regards,





reply via email to

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