lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Feb 06, 2006 at 05:00:31PM -0700, Mark Edgar wrote:
> At this point you may say "But I don't want a full-screen terminal 
> application, I just want to read from the terminal asynchronously."
.. or nonblocking, which is much different.
One asynchronous option is quite easy and actually used
by some applications like less when following a file:
the asynchronous input is Ctrl-C.  Unlike the nonblocking loop,
this interrupts the work done during each step
(depending on whether and how a signal handler is installed).

> You'll find that most text-based applications are either CLI-based 
> (reading a line at a time from the user, perhaps using something like 
> readline) or curses-based (taking up the full terminal screen for the 
> time that they are running).  You'll want to decide which flavor 
> application you want to build, and then stick with that choice.
I hardly resisted dropping a note on curses world domination
in my previous post ...

> There's really no middle ground here.
... but yes, there is ample ground, and even if it's considered antisocial,
IMHO it's very Lua.


cheers