On Monday 07 July 2008, Kirill A. Shutemov wrote:
> On Mon, Jul 07, 2008 at 10:25:42AM +0200, Marc Haisenko wrote:
> > On Sunday 06 July 2008, Kirill A. Shutemov wrote:
> > > Is it possible to add ncurses-specific functions to curses ruby module?
> > > I'm interested in use_default_colors() and assume_default_colors().
> > > According to man page, these routines are specific to ncurses.
> > >
> > > I have found the patch that add this functionality --
> > > [ruby-core:11843], but nobody has answered to the message.
> >
> > IMHO that's what the "ncurses-ruby" module is for. For example,
> > OpenSolaris has curses, not ncurses, so the Ruby default module should
> > work there as well while it's acceptable that an optional module does not
> > (unless you install ncurses, of course).
>
> It's possible to export ncurses-specific interface conditionally, like
> color or mouse support. Or we can call rb_notimplement(), if the call is
> not available for this system. Or we can localize ncurses-specific
> functions in separate module and include it if needed.
> I think support ncurses out of box is very useful. External module is not
> suitable for a small application distribution.

But then your Ruby code would suddenly be platform-specific because certain 
methods would only be present when you are on the correct platform which is 
kinda counter-productive. People wouldn't realize that their Ruby code might 
mysteriously fail on some systems. I for one wouldn't like to have that, 
especially since there is a viable and working solution TODAY: the 
ncurses-ruby module.
	Marc

-- 
Marc Haisenko

Comdasys AG
R?desheimer Str. 7
80686 M?nchen
Germany

Tel.: +49 (0)89 548 433 321