elliottcable / nfoiled

The Rubyist's interface to Ncurses

This URL has Read+Write access

name age message
file .gitignore Sat Mar 14 18:21:03 -0700 2009 Ignoring the 'logs' folder. [elliottcable]
file .manifest Thu Mar 05 22:45:21 -0800 2009 Adding a new Window class [elliottcable]
file LICENSE.text Thu Mar 05 06:22:30 -0800 2009 Formatting concern: Every file should end with ... [elliottcable]
file Nfoiled.gemspec Thu Mar 05 23:10:16 -0800 2009 Made task names a bit more sensible [elliottcable]
file README.markdown Mon Mar 09 03:46:31 -0700 2009 Added handling keys to the Goals section of the... [elliottcable]
file Rakefile.rb Thu Mar 05 23:18:59 -0800 2009 Changed VERSION to Version [elliottcable]
directory examples/ Fri Mar 13 18:38:57 -0700 2009 Added a basic input example. Really messy right... [elliottcable]
directory lib/ Fri Jul 31 17:39:33 -0700 2009 No need to explicitly define the acceptor acces... [elliottcable]
directory spec/ Mon Mar 16 18:51:14 -0700 2009 Merge branch 'master' of git@github.com:elliott... [elliottcable]
file thoughts.txt Sun Mar 15 14:17:07 -0700 2009 Revert "Mis-handled the uber-long Unicode" Thi... [elliottcable]
README.markdown

Nfoiled

The Rubyist's interface to Ncurses.

History

As in, "Ncurses, Nfoiled Nagain!". Nfoiled is an object-oriented Ruby wrapper for ncurses-ruby, and therefore, Ncurses. I really got tired of the idiosyncrasies of Ncurses' API (it's written in a C style, not very clean, and definitely not object-oriented)... since ncurses-ruby does nothing more than make the C API available to Ruby as methods, it's no better. While working on rat, I set out to abstract the ncurses-ruby API to a system of objects and classes, in the truly Ruby style I'm used to. Now I've decided to abstract this code out and make it available separately... hence Nfoiled!

Installing

You can install Nfoiled as a pre-built gem, or as a gem generated directly from the source.

The easiest way to install Nfoiled is to use RubyGems to acquire the latest 'release' version from RubyForge, using the gem command line tool:

sudo gem install nfoiled # You'll be asked for your account password.

Alternatively, you can acquire it (possibly slightly more up-to-date, depending on how often I update the gemspec) from GitHub as follows:

# If you've ever done this before, you don't need to do it now - see http://gems.github.com
gem sources -a http://gems.github.com
sudo gem install elliottcable-nfoiled # You'll be asked for your account password.

Finally, you can build a gem from the latest source yourself. You need git, as well as [rake][]:

git clone git://github.com/elliottcable/nfoiled.git
cd nfoiled
rake install # You'll be asked for your account password.

Contributing

You can contribute bug fixes or new features to Nfoiled by forking the project on GitHub (you'll need to register for an account first), and sending me a pull request once you've committed your changes.

Links

  • GitHub is the project's primary repository host, and currently also the project's home page
  • RubyForge is out primary RubyGem host, as well as an alternative repository host
  • integrity is out continuous integration server - if the top build on that page is green, you can assume the latest git HEAD is safe to run/install/utilize.
  • Gitorious is an alternative repository host
  • repo.or.cz is an alternative repository host

Goals & Todo

  1. Manage tiling, to some extent, for the user: a. Automatically align windows to the proper locations b. Automatically resize existing windows to accomodate newly created ones c. Manage the handling window resizing, and allow user to specify how each window should handle resizing
  2. Manage efficient updating as much as possible: a. Maintain an "event loop" of updates, and ensure that quickly-sequential window updates correspond to a single update! call b. Allow users actions' to schedule updates in sequence
  3. Handle keys/input for the user: a. Run a loop that tracks all input, automatically handling key sequences without Ncurses' signature blocking delay bullshit b. Provide default callbacks for common operations, such as navigating in an input area c. Allow user to override callbacks with their own blocks, to be run on the input of specific keys
  4. Never, ever touch Ncurses' horrid GUI-emulation bits (mouse handling, overlapping panels, window borders, widgets). People who want that retarded shit can call directly out to Ncurses, or even just suck it. Seriously, people, stop trying to emulate GUIs in a terminal! Textmode UI is a totally different art. Learn it, take a look at irssi or rat some time.

License

Nfoiled is copyright 2008 by elliott cable.

Nfoiled is released under the GNU General Public License v3.0, which allows you to freely utilize, modify, and distribute all Nfoiled's source code (subject to the terms of the aforementioned license).