The Accidental Rubyist

invalid byte sequence in UTF-8

Archive for September 2011

Rbcurse Version 1.3.0 released

leave a comment »

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.

Written by totalrecall

September 28, 2011 at 5:00 pm

Posted in ruby

Tagged with , ,

ruby ffi-ncurses and panels – progress

leave a comment »

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 Window and 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.

Written by totalrecall

September 5, 2011 at 2:03 pm

Migrating rbcurse to ffi-ncurses

with 4 comments

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.

Written by totalrecall

September 4, 2011 at 1:13 pm