Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Blank lines in terminal

0 views
Skip to first unread message

Dylan Lukes

unread,
Nov 22, 2009, 2:07:26 PM11/22/09
to
I have an IRC bot I wrote, and I would like to have it so that in the
console window, the bottom one or two lines are always blank.

In other words, I want puts/print to output to the second line from the
bottom instead of the bottommost line.

I am aware that this could be done with curses/ncurses, but I have been
unable to find any decent documentation for them in Ruby.

If possible I would like to avoid the need to use (n)curses.
--
Posted via http://www.ruby-forum.com/.

Martin DeMello

unread,
Nov 22, 2009, 3:07:59 PM11/22/09
to

May I ask why you want to avoid ncurses? It is, in general, a hard
problem to do this sort of thing portably across platforms and
terminals, and this is the exact problem curses is meant to solve.

martin

Marnen Laibow-Koser

unread,
Nov 23, 2009, 1:31:46 AM11/23/09
to
Dylan Lukes wrote:
> I have an IRC bot I wrote, and I would like to have it so that in the
> console window, the bottom one or two lines are always blank.
>
> In other words, I want puts/print to output to the second line from the
> bottom instead of the bottommost line.
>
> I am aware that this could be done with curses/ncurses, but I have been
> unable to find any decent documentation for them in Ruby.

60 seconds of Google searching, and behold:

http://github.com/eclubb/ncurses-ruby

A quick stop at rdoc.info, and:
http://rdoc.info/projects/eclubb/ncurses-ruby

>
> If possible I would like to avoid the need to use (n)curses.

You probably won't easily be able to.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org

0 new messages