ruby curses documentation ?

  • Thread starter MENON Jean-Francois
  • Start date
M

MENON Jean-Francois

hello,
I would like to start to learn using curses with ruby.
I don't know nothing about curses.
Is there existing any documentation about the ruby curses library?
all I found yet is code examples (not all works).
Do I have to search directly in the C source of ruby to get the names
of the functions and constants for example?

thanks,

jf
 
S

Simon Strandgaard

I would like to start to learn using curses with ruby.
I don't know nothing about curses.
Is there existing any documentation about the ruby curses library?
all I found yet is code examples (not all works).
Do I have to search directly in the C source of ruby to get the names
of the functions and constants for example?

If there is examples in the Ruby source which doesn't work, why don't you
submit a bug-report ?


curses is deprecated. Instead use Ncurses.
http://ncurses-ruby.berlios.de/

You can read more about how to use ncurses, via 'man ncurses'
Ncurses for Ruby is very similar to the C-API.
 
T

Tobias Peters

I use the curses version in the ruby distrib (1.8.0-pre7).
Does it contains deprecated libraries ?

I don't think ruby's curses binding is considered deprecated.

ncurses-ruby requires NCurses or PDCurses and will not work with
vendor-specific curses libs that ship with some proprietary unix
systems. Ruby's own curses binding will most likely work with these.

Tobias
 
T

Tobias Peters

Yes, but where is it documented?

I haven't found any documentation for ncurses-ruby or 'curses'...
but for ncurses I have the Linux manpages and the rest was guessing.

A 100 pages tutorial about NCurses programming is here:
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/NCURSES-Programming-HOWTO.pdf

If you prefer reference documentation, go for the various manpages.

The difference between the C API and the ncurses-ruby API is documented in
the README file (~ 4 pages) of the ncurses-ruby distribution.

The API difference of the standard ruby curses binding is AFAIK not
documented, but you will easily figure it out with sufficient NCurses
programming knowledge.

Tobias
 
T

Tobias Peters

MENON said:
do you mean I that I have to learn Ncurses that I will not use to be
able
to use Curses that I didn't learn ? ;->

No, not in this strict sense, sorry. If you learn plain curses
programming, e.g. from your unix vendor's programming manual, you can of
course use that knowledge.

To see if some curses feature is wrapped and under which name, you can
grep for it in <ruby-source-dir>/ext/curses/curses.c .

Tobias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top