I have libncurses.so.6 on 64-bit arch-linux ________________________________ From: Programming <[email protected]> on behalf of bill lam <[email protected]> Sent: Monday, May 28, 2018 3:45:16 AM To: [email protected] Subject: Re: [Jprogramming] ncurses mvwaddch@newwin unexpected behaviour
I cannot duplicate the problem on my 64-bit debian libncurses.so.5 Сб, 26 мая 2018, james faure написал(а): > Allright, I came back to this today, and the macro theory doesn't hold for > wmove, which is definitely not a macro, but fails with the same symptoms: > > > stdscr_ncurses_ =: initscr'' > w =. newwin 20;60;0;0 > wmove w ; 10 ; 10 > wgetch < w > > > > ________________________________ > From: Programming <[email protected]> on behalf of > bill lam <[email protected]> > Sent: Friday, May 18, 2018 4:16:43 AM > To: [email protected] > Subject: Re: [Jprogramming] ncurses mvwaddch@newwin unexpected behaviour > > I checked the ncurses addon and can find no reference of > mvwaddch there. I can see the addon is outdated and > need update but I'm busy in other projects at the moment. > You are welcome to provide patch for it. > > Чт, 17 мая 2018, james faure написал(а): > > Indeed, almost all of the mv* functions are macros; > > > > The 'api/ncurses' script has redefined some of these for use in J, but > > hasn't done this consistently. > > > > In fact it seems to be a little out of date, I also had to update it to > > read ncurses.so.6 rather than .5 > > > > My ncurses header still went to the trouble of declaring all the macros as > > library functions, which certainly explains the strange results ! > > > > ________________________________ > > From: Programming <[email protected]> on behalf of > > bill lam <[email protected]> > > Sent: Friday, May 18, 2018 1:19:47 AM > > To: Programming forum > > Subject: Re: [Jprogramming] ncurses mvwaddch@newwin unexpected behaviour > > > > some ncurses functions are implemented as macro. C compliers can expand > > them into real function call during compilation but J can't. I'll look if > > this is the reason why window functions failed. > > > > On Fri, May 18, 2018, 6:48 AM james faure <[email protected]> wrote: > > > > > Hello, > > > Just wrote a classic snake game in ncurses, however I came across > > > something inexplicable - The code below hangs for a sec, then exits. > > > The problem is presumably with the mvwaddch function. mvwaddstr also > > > fails. > > > I was able to circumvent this by simply using the default screen returned > > > by initscr, but that isn't ideal! > > > > > > require 'api/ncurses' > > > cocurrent 'ncurses' > > > > > > init =. monad define > > > stdscr_ncurses_ =: initscr'' > > > w =. newwin 20;60;0;0 > > > > > > NB. Works fine: > > > NB. getch'' [ mvaddch 10 ; 10 ; '*' > > > > > > NB. hangs for a second then exits, why ? > > > mvwaddch w ; 10 ; 10 ; '*' > > > wgetch < w > > > ) > > > > > > init'' > > > > > > Thanks for any help, > > > J4 > > > > > > ---------------------------------------------------------------------- > > > 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 > > -- > regards, > ==================================================== > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
