I am quite busy and not able to investigate. I'll take a look when I have
finished all backlog.

On Sun, Jun 13, 2021, 12:21 AM Raul Miller <[email protected]> wrote:

> J's nl_z_ is based on APL's quadNL (name list).
> https://microapl.com/apl_help/ch_020_070_510.htm
>
> The ncurses nl() routine is an instruction to ncurses to treat the
> carriage return character the same way it treats the newline
> character. Its companion is nonl().
>
> If the move command isn't working, try commenting that out and see if
> any of the rest of it works.
>
> Also, if you're getting a domain error from the move command, you can
> try cder'' and then check the result against
> https://code.jsoftware.com/wiki/Guides/DLLs/Error_Messages to see
> something about what went wrong.
>
> Thanks,
>
> --
> Raul
>
> On Sat, Jun 12, 2021 at 12:09 PM David Lambert <[email protected]>
> wrote:
> >
> > I've found a pervasive problem---I'm obsolete.  I recall having written
> > or modified termcap entries.  And I wrote a character cell/vi-keyboard
> > motion version of WINMINES that automatically played all trivially
> > counted zones.  Following a few visually pleasing update waves, holes to
> > be solved by thought or guess remained.  The macros in dwlmines.c
> > expanded into lines exceeding the maximum line length of the Microsoft
> > compiler at the time. With gcc, no problem of course.  Yes, I test these
> > j sample programs in xterm.  Otherwise, I claim only to have once upon a
> > time known something.
> >
> >
> > TERMCAP(5)              Linux Programmer's Manual TERMCAP(5)
> > NAME         top
> >         termcap - terminal capability database
> > DESCRIPTION         top
> >         The termcap database is an obsolete facility
> >
> >
> > |Date: Sat, 12 Jun 2021 07:15:40 -0400
> > |From: Raul Miller <[email protected]>
> > |To: Programming forum <[email protected]>
> > |Subject: Re: [Jprogramming] ncurses
> > |Message-ID:
> > | <CAD2jOU9TROf9NXa5F2=6ZdStdB=_bvmbqecaxptrcv0dtm1...@mail.gmail.com>
> > |Content-Type: text/plain; charset="UTF-8"
> > |
> > |nl_ncurses_ is a call to the nl routine in the ncurses library. But
> > |names_z_ expects a different definition of nl in the locale where it
> > |is used. You might try this:
> >
> > completely new to me, I haven't a clue why this is so.
> >
> > |   nms_z_=:4!:1
> > |   names_z_ nms_ncurses_ i.4
> > |A_ALTCHARSET       A_ATTRIBUTES       A_BLINK
> > |A_BOLD             A_CHARTEXT         A_COLOR
> > |...
> > |
> > |Also, note that ncurses should only be expected to function usefully
> > |in jconsole, since it expects a terminal window (though it might be
> > |handy to have a jqt or jhs session with ncurses loaded so that you can
> > |inspect its definitions more easily). You presumably would also want
> > |to make sure that the TERM environmental variable is set properly
> > |before starting that jconsole session.
> > |
> > |Note that you should also install ncurses-doc using apt so that you
> > --- used thanks
> > |could, for example, look at the man page for nl. (Use man 3 nl if you
> > |also have a man page for the command line program named nl which
> > |prepends line numbers).
> > |
> > |That said, I was not able to get the ncurses api to work on my system.
> >
> > Other features worked to the extent I needed to recall stty sane command.
> >
> > |
> > |I defined a relatively simple example program:
> > |
> > |load'~addons/api/ncurses/ncurses.ijs'
> > |coinsert'ncurses'
> > |
> > |example=:3 :0
> > |  stdscr=: initscr''
> > |  move 3 10             NB. no luck.
> > |  addch"0 'Hello World!'
> >
> > refresh''   NB. with refresh clear succeeded.
> >
> > |  getch''
> > |  endwin stdscr
> > |)
> > |
> > |But I don't have a system handy with ncurses on it, so I can't test
> > |it. I hope that's close enough to correct that you can find and fix
> > |any bugs...
> > |
> > |Note that I used addch"0 because there's no printw in the current j
> > |ncurses api implementation. I think it should be straightforward to
> > |define a wrapper verb (which analyzed its arguments, built an
> > |appropriate library reference string and called 15!:0 directly). But,
> > |I would want to be able to test what I was building to make sure I had
> > |gotten the details right.
> > |
> > |I hope this helps. (I don't know how much you do or do not already
> > |know about ncurses...)
> > |
> > |--
> > |Raul
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to