# Curses vs. ncurses?

**URL:** <https://rubytalk.org/t/curses-vs-ncurses/73922>\
**Category:** ruby-talk\
**Created:** [24 November 2016 03:11 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922 "2016-11-24T03:11:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Micky\_Scandal](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Micky\_Scandal](https://rubytalk.org/u/Micky_Scandal)\
**Post date:** [24 November 2016 03:11 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/1 "2016-11-24T03:11:04Z")

</div>

hey, everyone. need a little clarification. what exactly is the difference  
between curses library and ncurses? i know the n stand for new so I know  
it's a newer version or replacement, but I guess what I really want to know  
is are they interchangeable? if I know curses, do I already know ncurses or  
is it a whole different beast? I just started working with curses but I was  
just looking for some documentation but everything is on ncurses. I  
originally went with curses since it's part of the stdlib (or used to be)  
but after a lot of googling I'm thinking I may be using something obsolete?  
is it worth learning or should I try to forget what I already learned and  
switch to ncurses?

---

<div class="post-metadata">

**Author:** ![Ken\_D\_Ambrosio](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@Ken\_D\_Ambrosio](https://rubytalk.org/u/Ken_D_Ambrosio)\
**Post date:** [24 November 2016 03:27 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/2 "2016-11-24T03:27:45Z")

</div>

I don't claim to know the definitive answer, but I believe that one is  
just an updated version of the other. I've worked with both (not in  
Ruby, but over the years), and I honestly couldn't tell you the  
difference. That being said... I'm tempted to think that the curses  
implementation may well have been ncurses, anyway, as I'm pretty sure  
ncurses predates Ruby, itself.

-Ken

> **···**
>
> On 2016-11-23 22:11, Micky Scandal wrote:
> 
> > hey, everyone. need a little clarification. what exactly is the difference between curses library and ncurses? i know the n stand for new so I know it's a newer version or replacement, but I guess what I really want to know is are they interchangeable? if I know curses, do I already know ncurses or is it a whole different beast? I just started working with curses but I was just looking for some documentation but everything is on ncurses. I originally went with curses since it's part of the stdlib (or used to be) but after a lot of googling I'm thinking I may be using something obsolete? is it worth learning or should I try to forget what I already learned and switch to ncurses?
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk) [1]\>
> 
> Links:  
> ------  
> [1] [http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk)

---

<div class="post-metadata">

**Author:** ![Michael\_Lutsiuk](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Michael\_Lutsiuk](https://rubytalk.org/u/Michael_Lutsiuk)\
**Post date:** [24 November 2016 07:50 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/3 "2016-11-24T07:50:51Z")

</div>

You can just run 'man ncurses', it has much useful information

Here is a quote from there:

The ncurses library emulates the curses library of System V Release 4 UNIX, and  
XPG4 (X/Open Portability Guide) curses (also known as XSI curses). XSI stands  
for X/Open System Interfaces Extension. The ncurses library is freely  
redistributable in source form. Differences from the SVr4 curses are  
summarized under the EXTENSIONS and PORTABILITY sections below and described in  
detail in the respective EXTENSIONS, PORTABILITY and BUGS sections of individual  
man pages.

> **···**
>
> On Wed, Nov 23, 2016 at 07:11:04PM -0800, Micky Scandal wrote:
> 
> > hey, everyone. need a little clarification. what exactly is the difference  
> > between curses library and ncurses? i know the n stand for new so I know  
> > it's a newer version or replacement, but I guess what I really want to know  
> > is are they interchangeable? if I know curses, do I already know ncurses or  
> > is it a whole different beast? I just started working with curses but I was  
> > just looking for some documentation but everything is on ncurses. I  
> > originally went with curses since it's part of the stdlib (or used to be)  
> > but after a lot of googling I'm thinking I may be using something obsolete?  
> > is it worth learning or should I try to forget what I already learned and  
> > switch to ncurses?
> 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);

---

<div class="post-metadata">

**Author:** ![Micky\_Scandal](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Micky\_Scandal](https://rubytalk.org/u/Micky_Scandal)\
**Post date:** [24 November 2016 18:28 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/4 "2016-11-24T18:28:17Z")

</div>

You can just run 'man ncurses', it has much useful information

That actually brings up a different issue. As far as I can tell, nothing on  
my system relating to ruby except for IRB and Ruby itself have man pages  
(running backbox 4.6. Essentially ubuntu)

---

<div class="post-metadata">

**Author:** ![Michael\_Lutsiuk](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Michael\_Lutsiuk](https://rubytalk.org/u/Michael_Lutsiuk)\
**Post date:** [24 November 2016 19:32 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/5 "2016-11-24T19:32:25Z")

</div>

You can read it on the web [https://linux.die.net/man/3/ncurses](https://linux.die.net/man/3/ncurses)

It is unlikely that you have used "curses", because it is something ancient  
and abandoned. Ncurses is the only library used to manipulate terminal screen  
today. Even my router has libncurses 5.9

Also, ncurses is a superset of curses, so if you learned curses somewhere, api  
should work for ncurses.

> **···**
>
> On Thu, Nov 24, 2016 at 10:28:17AM -0800, Micky Scandal wrote:
> 
> > You can just run 'man ncurses', it has much useful information
> > 
> > That actually brings up a different issue. As far as I can tell, nothing on  
> > my system relating to ruby except for IRB and Ruby itself have man pages  
> > (running backbox 4.6. Essentially ubuntu)
> 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);

---

<div class="post-metadata">

**Author:** ![Micky\_Scandal](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Micky\_Scandal](https://rubytalk.org/u/Micky_Scandal)\
**Post date:** [24 November 2016 22:19 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/6 "2016-11-24T22:19:15Z")

</div>

> It is unlikely that you have used "curses", because it is something ancient  
> and abandoned.

Oh, maybe that is the case. I just went back to look, and this is the  
original gem I used that I was thinking was curses:  
&nbsp;&nbsp;[curses | RubyGems.org | your community gem host](https://rubygems.org/gems/curses)  
but it does mention ncurses in the description. but the thing that still  
has me confused is, what's actually labelled as ncurses(ncursesw or  
ffi-ncurses) has different methods than the first one. there's definitely a  
lot more in ncurses but even basic stuff like Curses.init\_scrren is  
different. That's why I thought I was using the old one. so if the first  
one is actually ncurses why do they have different methods? don't get me  
wrong, the differences are minor. like curses uses init\_screen and ncursesw  
uses initscr. are they just different peoples own versions based off the  
original or something? if that's the case then is there a specific version  
people would recommend? I'm using ncursesw now since it has the most  
downloads by more than 100,000

---

<div class="post-metadata">

**Author:** ![Eric\_Christopherson](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/eric_christopherson/32/1849_2.png) [@Eric\_Christopherson](https://rubytalk.org/u/Eric_Christopherson)\
**Post date:** [25 November 2016 03:58 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/7 "2016-11-25T03:58:03Z")

</div>

> \> It is unlikely that you have used "curses", because it is something ancient  
> \> and abandoned.  
> \>
> 
> Oh, maybe that is the case. I just went back to look, and this is the  
> original gem I used that I was thinking was curses:  
> &nbsp;&nbsp;[curses | RubyGems.org | your community gem host](https://rubygems.org/gems/curses)  
> but it does mention ncurses in the description. but the thing that still  
> has me confused is, what's actually labelled as ncurses(ncursesw or  
> ffi-ncurses) has different methods than the first one. there's definitely a  
> lot more in ncurses but even basic stuff like Curses.init\_scrren is  
> different.

I think an important point that has been overlooked in this conversation  
is that, like many gems, the (n)curses gems are bindings to established  
C-based libraries. That's what curses and ncurses were before anyone  
wrote code to work with them in Ruby. Sometimes the Ruby ecosystem ends  
up with multiple interfaces to the same C library.

> **···**
>
> On Thu, Nov 24, 2016, Micky Scandal wrote:
> 
> > That's why I thought I was using the old one. so if the first  
> > one is actually ncurses why do they have different methods? don't get me  
> > wrong, the differences are minor. like curses uses init\_screen and ncursesw  
> > uses initscr. are they just different peoples own versions based off the  
> > original or something? if that's the case then is there a specific version  
> > people would recommend? I'm using ncursesw now since it has the most  
> > downloads by more than 100,000
> 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> 
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Eric Christopherson

---

<div class="post-metadata">

**Author:** ![Micky\_Scandal](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Micky\_Scandal](https://rubytalk.org/u/Micky_Scandal)\
**Post date:** [25 November 2016 20:36 UTC](https://rubytalk.org/t/curses-vs-ncurses/73922/8 "2016-11-25T20:36:48Z")

</div>

That's pretty much what I was thinking. and based on that thought I figured  
it doesnt really matter too much which version I use. So I decided to go  
with ncursesw. it's the one that has the most downloads (180,000+) and as  
far as I could tell has the most features and best documentation, although  
ffi-ncurss also looks like it has some decent meritts like being compatible  
with jruby. I guess it just boils down to "what are you using it for"

thanks again for all the help and to all of you in the U.S of A, happy  
(belated) thanksgiving!

> **···**
>
> On Thu, Nov 24, 2016 at 7:58 PM, Eric Christopherson \< echristopherson@gmail.com\> wrote:
> 
> > Sometimes the Ruby ecosystem ends  
> > up with multiple interfaces to the same C library.
