Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Curses VS. Ncurses
Barry Dmytro
1/30/2005 12:37:00 AM
I wish to write an application in ruby using Curses/Ncurses, but it seems as
though there are 2 different api's to deal with. There is an api with
ruby-1.8 that is titled 'curses', and then there is another called
ncurses-ruby (
http://ncurses-ruby.b...
). At first I though that
perhaps they were the same api just in two different locations, but the
latter seems more robust than the one bundled with ruby. Any suggestions
about which would be the better api. I use GNU/Linux exclusively, but I
test my software in windows as well. I noticed that the curses library
bundled with ruby doesn't work out of the box with the one-click windows
ruby installer. The main reason I bring this up is that I am concerned
about portability. I know that ncurses-ruby is capable of using pdcurses
in windows making it portable across many platforms, but I question the
portability of the ruby standard library 'curses'.
----
Barry Dmytro
badcherry@mailc.net
http://badc...
2 Answers
Alexander Kellett
1/30/2005 12:51:00 AM
0
On Jan 30, 2005, at 1:40 AM, Barry Dmytro wrote:
> I wish to write an application in ruby using Curses/Ncurses, but it
> seems as
> though there are 2 different api's to deal with. There is an api with
> ruby-1.8 that is titled 'curses', and then there is another called
> ncurses-ruby (
http://ncurses-ruby.b...
). At first I though
> that
> perhaps they were the same api just in two different locations, but the
> latter seems more robust than the one bundled with ruby. Any
> suggestions
> about which would be the better api. I use GNU/Linux exclusively, but
> I
> test my software in windows as well. I noticed that the curses library
> bundled with ruby doesn't work out of the box with the one-click
> windows
> ruby installer. The main reason I bring this up is that I am concerned
> about portability. I know that ncurses-ruby is capable of using
> pdcurses
> in windows making it portable across many platforms, but I question the
> portability of the ruby standard library 'curses'.
i got my pure ruby curses editor working a while back on win32.
i didn't use the one click installer however, and instead the
d4win one. alas i'm no longer using win32 again so not sure of
the current urls
summary: sure, curses will work, and i'd suggest using std curses
as its well, standard ;)
good luck,
Alex
Tobias Peters
2/6/2005 12:40:00 AM
0
Barry Dmytro wrote:
> I wish to write an application in ruby using Curses/Ncurses, but it seems as
> though there are 2 different api's to deal with. There is an api with
> ruby-1.8 that is titled 'curses', and then there is another called
> ncurses-ruby (
http://ncurses-ruby.b...
). At first I though that
> perhaps they were the same api just in two different locations, but the
> latter seems more robust than the one bundled with ruby. Any suggestions
> about which would be the better api.
ncurses-ruby aims to be a complete binding to the ncurses library.
Function names are the same as their C equivalents. Std curses binding,
as I understand it, aims to bind to every unix curses library, not only
ncurses, and wraps the basic curses functionality. Sometimes, ruby
functions in the std curses binding have different names than their C
counterparts.
> I use GNU/Linux exclusively, but I
> test my software in windows as well. I noticed that the curses library
> bundled with ruby doesn't work out of the box with the one-click windows
> ruby installer. The main reason I bring this up is that I am concerned
> about portability. I know that ncurses-ruby is capable of using pdcurses
> in windows making it portable across many platforms, but I question the
> portability of the ruby standard library 'curses'.
Std curses binding can also link against pdcurses on windows.
If portability is your concern, please be aware that the ability of
ncurses-ruby to link against pdcurses comes at the cost of losing
several functions, i.e. the wrapper does not provide functionality
present in ncurses but unavailable in pdcurses. This difference may not
as evident when using the standard curses binding, since it does not
provide as many functions as ncurses-ruby.
Tobias
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Curses VS. Ncurses
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password