From: Reyn Vlietstra Date: 2005-12-04T18:04:22+09:00 Subject: Re: Curses about libcurse ------=_Part_28875_5177766.1133687055541 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Oh, I missed the replies. The biggest issue with ruSH is that obviously we need to run existing console binaries on it. I ran into issues with things like vi etc. I needed to exit curses before entering vi, or vi would moan and/or break. That made me introduce the ^ character for all the things that needed to exit curses. (eg. ^vi) Other commands like say for instance 'ls' needs to be run with popen4 which grabs the output and writes it to the curses screen, so anything that needs input immediately hangs. The other thing is that something like ls --color emits color codes, it's been a while since I worked on this so my minds a bit sketchy. I was having issues with the number of colors I could define and the fact that if I change a color it changes all the colors with that number on the screen ... errrm, so what I basically need is for curses and the console apps to play together nicely, surely it's possible ? Tell me if you cant get ruSH running to look at it, it's quite a mission at the moment :-o We ... I need a next gen shell ! On 12/3/05, zimba-tm wrote: > > Hi Richard, > > in brief, you can do anything with curses. You can write text on the > whole screen, use colors, the mouse. So it's not about technical > missing features. > > However, the library makes it hard to do some things. First of all, > the library is seriously lacking in documentation. Just take a look to > the curses stdlib rdoc[1] to have an idea. I couldn't go really > further without looking at the provided examples. > > Curses integrates a concept of windows. You set a window with top, > left, width and height. Then everything you write inside won't get out > of that box and it can be scrolled. The idea is pretty neat, but it > suffers some limitations. Because you don't have callbacks, you have > to make a loop to track the different changes (like mouse moves and > term resizes). And because it's not well documented, I found it was > hard to have consistent behavior. > > It takes much too long to write a simple GUI. > > [1] http://www.ruby-doc.org/stdlib/libdoc/curses/rdoc/classes/Curses.html > > On 03/12/05, Richard Lyman wrote: > > Is there something specifically that you've been trying to do but > couldn't? > > > > Is it just the quality or speed of development that is annoying you? > > > > I ask only because I'm thinking about writing an Ncurses app, so feel > > free to 'dump'. > > > > -Rich > > -- > Cheers, > zimba > > http://zimba.oree.ch > > -- Reyn Vlietstra ------=_Part_28875_5177766.1133687055541--