--1UWUbFP1cBYEclgG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 07, 2008 at 12:26:02PM +0200, Marc Haisenko wrote:
> 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 mod=
ule?
> > > > 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 n=
ot
> > suitable for a small application distribution.
>=20
> But then your Ruby code would suddenly be platform-specific because certa=
in=20
> methods would only be present when you are on the correct platform which =
is=20
> kinda counter-productive. People wouldn't realize that their Ruby code mi=
ght=20
> mysteriously fail on some systems.

Have you look to source of curses module? Methods related to mouse and
color have been already able to fail on some systems.

--=20
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + ALT Linux Team, http://www.altlinux.com/

--1UWUbFP1cBYEclgG
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkhx9dkACgkQbWYnhzC5v6qJwwCeLd/InTkAa4hGcGjCv84t+q10
lgQAn1g4ECM1uqKuygtz5bAtvnIlWHHr
=UhVi
-----END PGP SIGNATURE-----

--1UWUbFP1cBYEclgG--

On Mon, Jul 07, 2008 at 12:26:02PM +0200, Marc Haisenko wrote:
> 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 mod=
ule?
> > > > 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 n=
ot
> > suitable for a small application distribution.
>=20
> But then your Ruby code would suddenly be platform-specific because certa=
in=20
> methods would only be present when you are on the correct platform which =
is=20
> kinda counter-productive. People wouldn't realize that their Ruby code mi=
ght=20
> mysteriously fail on some systems.

Have you look to source of curses module? Methods related to mouse and
color have been already able to fail on some systems.

--=20
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + ALT Linux Team, http://www.altlinux.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkhx9dkACgkQbWYnhzC5v6qJwwCeLd/InTkAa4hGcGjCv84t+q10
lgQAn1g4ECM1uqKuygtz5bAtvnIlWHHr
=UhVi
-----END PGP SIGNATURE-----