Archive for September 2011
Rbcurse (ruby curses toolkit) has now moved to using ffi-ncurses from v 1.3.0. No more installing the ncurses gem.
The last version that uses ncurses is 1.2.0. The next couple of version will contain some rewritten containers, some code cleanup and some new smallish features.
Thanks a lot to manver’s
Panel class (Linked in previous post). I’ve got some old sample programs using panels functioning with manver’s
Panel code. Also, today, I used the
Window class provided in
examples in the ffi-ncurses program alongside manver’s panel class.
I’d say manver’s window class required fewer modifications from the old ncurses-ruby code. However, there’s some uncleanliness at times when i have to pass the pointer of the window class to methods instead of the window itself. It would have been nice if the classes could have managed this internally. Also, the panel class needs to know the location of libpanelw either in the ENV or coded in class.
Now i can actually start the task of porting the rbcurse work to ffi-ncurses. Most of my ncurses work is in 2-3 classes, so that should not be an issue. However, very often something does not work, but does not give an error. Or printing happens in the wrong place. Or colors are not set. One has to be very careful while testing. These things can get missed unless one has an output to compare with.
Back after a long break. Ruby 1.9.3 is out and it has something called
io/console which I could not figure out. Anyway, I’d like to port rbcurse so it can use ffi-ncurses instead of ncurses-ruby which is so infernally hard for a lot of people to install.
ffi-ncurses does not have panel support. I wasted many hours trying to add it to Window. I found Ver’s panel.rb but that did not work with ffi’s Window class (provided in the examples). I found another Window.rb in the Ver package (github) and I am in quite a mess currently trying to integrate them. Getting segmentation faults.
Will probably some updates on that tumblr page I have somewhere.