Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-09-10 Thread Juergen Sauermann
Hi, I changed GNU APL to use libncurses for figuring Input and output ESC sequences if configured to do so. This should make GNU APL terminal independent as proposed by David. The input (keyboard → APL) and output (APL → screen) can be co

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-09-08 Thread David B. Lamkins
I wrote an ANSI terminal emulator decades ago. It's not a small task. Even if you take a small subset of the control codes, there are still some tricky architectural issues to consider w.r.t. how a screen-based console would function within the transcript-based model presented by aplwrap. If you'

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-09-08 Thread Chris Moller
There was some discussion about setting the TERM environment variable, which David Lamkins did for aplwrap, setting it to "dumb"--i.e., aplwrap doesn't understand terminal controls. Nothing says it can't be made to do so, but I've no idea at the moment the scope of work involved. FWIW, though, I

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-09-08 Thread Blake McBride
This was fixed before but doesn't work anymore. I use it a lot, and having it work just like GNU APL without APLWRAP is very useful to me. Thanks. Blake On Mon, Aug 18, 2014 at 10:23 AM, Blake McBride wrote: > Greetings, > > Some of my error handling code uses the bell (⎕AV[⎕IO+7]), and my

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread David B. Lamkins
Very good point. TERM=dumb is probably a good choice.

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread David B. Lamkins
I've been shelling out to tput to get terminal-specific escapes. (The tput command queries the terminfo database.) This is easy to do given the pipe access provided by lib_file_io. Please feel free to appropriate code from the package manager. You'll need pkg⍙sh, pkg⍙utf_to_ucs (I believe that you

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread Juergen Sauermann
Hi, it could be a good idea if aplwrap sets the TERM environment variable. Currently it shows xterm (when started from an xterm) which could make GNU APL believe that the ANSI escape sequences would work. /// Jürgen On 08/18/2014 05:27 PM, Blake McBride wrote: I like this! Will it work in

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread Elias Mårtenson
Yes, it would. Basically it allows you to do screen control and the output depends on the TERM environment variable. We either implement a wrapper around pure terminfo which is quite low-level. You have to make calls that create output strings using the building blocks described here: http://pubs.

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread Blake McBride
I like this! Will it work in aplwrap and terminal? Thanks. Blake On Mon, Aug 18, 2014 at 10:25 AM, Elias Mårtenson wrote: > I think it's time to create an APL interface to terminfo. I can build that > if no one else volunteers. > > Regards, > Elias > > > On 18 August 2014 23:23, Blake McBri

Re: [Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread Elias Mårtenson
I think it's time to create an APL interface to terminfo. I can build that if no one else volunteers. Regards, Elias On 18 August 2014 23:23, Blake McBride wrote: > Greetings, > > Some of my error handling code uses the bell (⎕AV[⎕IO+7]), and my editor > uses some ANSI positioning sequences. I

[Bug-apl] aplwrap: bell & ANSI controls

2014-08-18 Thread Blake McBride
Greetings, Some of my error handling code uses the bell (⎕AV[⎕IO+7]), and my editor uses some ANSI positioning sequences. I think all I use is clear and go to top of screen as follows: ∇ [0] E∆Clear [1] ⍞←(⎕UCS 27),'[2J' [2] ⍞←(⎕UCS 27),'[1;1H' ∇ Anyway to get that working? Thanks