Ncurses like library?

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

On Wed, Jan 14, 2009 at 5:31 PM, Tim M. [email protected] wrote:

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

Hi, this might help:

Jesus.

Hi, this might help:

LMGTFY - Let Me Google That For You

Jesus.

Why is it that site never gets old?
Especially when it comes to the 2-3 Ncurses questions a day.

Andy C. wrote:

Hi, this might help:

LMGTFY - Let Me Google That For You

Jesus.

Why is it that site never gets old?
Especially when it comes to the 2-3 Ncurses questions a day.

Yeah, that ruby-ncurses binding isn’t the best, lots of methods are
missing and other little things (like ‘include Ncurses’ not working
correctly). Any OTHER TUI libraries?

2009/1/14 Tim M. [email protected]:

Yeah, that ruby-ncurses binding isn’t the best, lots of methods are
missing and other little things (like ‘include Ncurses’ not working
correctly). Any OTHER TUI libraries?

If you look through the forum somebody suggested curses FFI bindings I
think but I don’t know how far that got.

If you find the ruby curses bindings insufficient, post about its
deficiencies so that they can be worked out.

I personally do not use them because they cannot do multibyte
characters but that’s not limitation of these bindings but of the
version 1.8 of the Ruby interpreter - it cannot use locales correctly.

Thanks

Michal

Michal S. wrote:

2009/1/14 Tim M. [email protected]:

Yeah, that ruby-ncurses binding isn’t the best, lots of methods are
missing and other little things (like ‘include Ncurses’ not working
correctly). Any OTHER TUI libraries?

If you look through the forum somebody suggested curses FFI bindings I
think but I don’t know how far that got.
I’ll look into that, thanks.

If you find the ruby curses bindings insufficient, post about its
deficiencies so that they can be worked out.
I thought Ruby-Ncurses development was dead?

I personally do not use them because they cannot do multibyte
characters but that’s not limitation of these bindings but of the
version 1.8 of the Ruby interpreter - it cannot use locales correctly.

Thanks

Michal

On Wed, Jan 14, 2009 at 5:49 PM, Tim M. [email protected] wrote:

Yeah, that ruby-ncurses binding isn’t the best, lots of methods are
missing and other little things (like ‘include Ncurses’ not working
correctly). Any OTHER TUI libraries?

Sorry, from the way you worded your question I assumed you wanted to
know if there were any ruby ncurses bindings and I wanted to point out
that some googling might help (admiteddly, I should have clicked the
search, and not the “I’m feeling lucky” button, to show there were
many results). You didn’t show that you had already evaluated some
ncurses binding, so I assumed you didn’t. My bad.

From the questions in this list it seems there are other people using
the ncurses gem. For example Nit K. posted many questions related
to ncurses, maybe you can take a look at his questions. Also Sean
O’Halpin was working in a FFI wrapper for ncurses which might be
interesting.

Jesus.

Jesús Gabriel y Galán wrote:

On Wed, Jan 14, 2009 at 5:49 PM, Tim M. [email protected] wrote:

Yeah, that ruby-ncurses binding isn’t the best, lots of methods are
missing and other little things (like ‘include Ncurses’ not working
correctly). Any OTHER TUI libraries?

Sorry, from the way you worded your question I assumed you wanted to
know if there were any ruby ncurses bindings and I wanted to point out
that some googling might help (admiteddly, I should have clicked the
search, and not the “I’m feeling lucky” button, to show there were
many results). You didn’t show that you had already evaluated some
ncurses binding, so I assumed you didn’t. My bad.

From the questions in this list it seems there are other people using
the ncurses gem. For example Nit K. posted many questions related
to ncurses, maybe you can take a look at his questions. Also Sean
O’Halpin was working in a FFI wrapper for ncurses which might be
interesting.

Jesus.

Looks absolutely perfect. I can’t find anything related to getting it to
work with Ruby, save for a post asking how to do it here on this list.
No one replied to it. Anyone ever get it to work?

Tim M. wrote:

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

I am surprised to hear that ncurses-ruby is not working or the include
Ncurses is not working.

All my work uses ruby-ncurses as a base. Yes, there are a couple of
things I have come across that were buggy - which I have pointed out on
this forum.
Sadly there seems to be no maintainer for it – have posted bugs but no
response. But these are very minor and probably no one uses those
things.

Please install the gem and then try the samples. Feel free to ask me
anything - I just might be able to help and save you time, and am glad
to answer.

oh, btw, just wondering – is the basic curses that comes with ruby
working on your system.

Also, I believe I have done extensive and thorough searching on ncurses
and ruby (2 months ago) and whatever libraries or wrappers I could find
were long abandoned or had not released code.

Cheers,
Sent.

Ruby R. wrote:

All my work uses ruby-ncurses as a base.

Can you use it in an existing console, such as to simply color text,
without
pretending it’s a window and taking over all of it?

2009/1/14 Tim M. [email protected]:

If you find the ruby curses bindings insufficient, post about its
deficiencies so that they can be worked out.
I thought Ruby-Ncurses development was dead?

I meant the ruby curses extension that is included in stdlib.

It is probably not developed very actively but if you find some
limitations that can be resolved without introducing incompatibilities
(or in any reasonable way for 1.9) there is a good chance that such
change will be included.

Thanks

Michal

2009/1/15 Phlip [email protected]:

Ruby R. wrote:

All my work uses ruby-ncurses as a base.

Can you use it in an existing console, such as to simply color text, without
pretending it’s a window and taking over all of it?

I guess that’s not what curses are meant for in general.

You can look up the terminal capabilities and use them to change
colors but curses functions all operate on windows. Curses is a TUI
library, not an output coloring library.

The situation is further complicated on Windows where the ‘console’ is
very fishy and normally you cannot change the colors with writing
terminal strings, only with Win32API calls.

Thanks

Michal

Phlip wrote:

Ruby R. wrote:

All my work uses ruby-ncurses as a base.

Can you use it in an existing console, such as to simply color text,
without
pretending it’s a window and taking over all of it?

I am not exactly certain of what you mean, but have you tried Highline.

It does great coloring, I have run its demos but not really used it. A
lot of people here have used it.

Also, iirc Facets has some module for ANSI-coloring. If i am not
mistaken you can do something like a colored ls output (directory
listing).

So do a give a look at Highline and Facets.

Tim M. wrote:

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

this might help you as well

Tj Holowaychuk wrote:

Tim M. wrote:

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

this might help you as well

GitHub - tj/commander: The complete solution for Ruby command-line executables

Looks really good!

RK Sentinel wrote:

Tj Holowaychuk wrote:

Tim M. wrote:

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

this might help you as well

GitHub - tj/commander: The complete solution for Ruby command-line executables

Looks really good!

Thanks! that was my first Ruby library every actually haha, its still a
work in progress but all the major tasks seem pretty solid now, just not
alot of people know about it.

Tj Holowaychuk wrote:

Tim M. wrote:

Excuse me, but does anyone know of an Ncurses-like library for Ruby? For
putting graphics made with static text onto a terminal/DOS window?

this might help you as well

GitHub - tj/commander: The complete solution for Ruby command-line executables

Isn’t quite what I was looking for, but man does it look neat! =D

Sean O’halpin wrote:

On Wed, Jan 14, 2009 at 5:05 PM, Jes�s Gabriel y
Gal�n[email protected] wrote:

Also Sean O’Halpin was working in a FFI wrapper for ncurses which might be
interesting.

You can get the work-in-progress here:

GitHub - seanohalpin/ffi-ncurses: Interface to ncurses using Ruby FFI (Foreign Function Interface)

Mostly works (except for macros like getxy on Mac OS/X). See the
./examples directory for usage.

Regards,
Sean

Wow, nice. Makes working with Ncurses that much simpler (no
Ncurses.initscr because the include is busted >_<). Is there a gem for
it?

Tim M. wrote:

Sean O’halpin wrote:

On Wed, Jan 14, 2009 at 5:05 PM, Jes�s Gabriel y
Gal�n[email protected] wrote:

Also Sean O’Halpin was working in a FFI wrapper for ncurses which might be
interesting.

You can get the work-in-progress here:

GitHub - seanohalpin/ffi-ncurses: Interface to ncurses using Ruby FFI (Foreign Function Interface)

Mostly works (except for macros like getxy on Mac OS/X). See the
./examples directory for usage.

Regards,
Sean

Wow, nice. Makes working with Ncurses that much simpler (no
Ncurses.initscr because the include is busted >_<). Is there a gem for
it?

Has anyone tried this “gem”? → http://rbcurse.rubyforge.org/
Is registered in “RubyForge” on February 2, but looks good.

On Wed, Jan 14, 2009 at 5:05 PM, Jesús Gabriel y
Galán[email protected] wrote:

Also Sean O’Halpin was working in a FFI wrapper for ncurses which might be
interesting.

You can get the work-in-progress here:

GitHub - seanohalpin/ffi-ncurses: Interface to ncurses using Ruby FFI (Foreign Function Interface)

Mostly works (except for macros like getxy on Mac OS/X). See the
./examples directory for usage.

Regards,
Sean