Charming ruby with curses
The other day I did something good. I fished out my Programming Ruby book and skimmed through it. I found many interesting things there, and i was drawn to this sample curses program. I downloaded it – a paddle that moves up and down.
In about 2 hours, I had a snake program up and running. The player (a snake) navigates around an empty screen which has some Sprites — good and bad. He gobbles them up. The time is displayed on top (how very professional!) and the players lives etc. You can download and play it if you like (for absolutely free).
Python seems to provide a lot more with its curses wrapper. Anyway, to get more out of ruby curses you need to install ncurses. (
sudo gem install ncurses). I am on the lookout for more work done with ruby using ncurses, especially libraries/code that could help me create forms with menus — something close to pine or nano, an editing textarea widget like nano would be great.
Would it be of any use to anyone (or the ruby community) if I ported some of python’s ncurses wrapper to ruby ? I assume if i can understand some python (I once ported pythons Medusa, aka asyncore, to Java successfully). Suggestions and some details would be welcome.
Edit: See rbcurse on rubyforge or github.