From: Eric Armstrong on
Matt Lawrence wrote:
> On Sat, 29 Jul 2006, Sam Smoot wrote:
>
>> I can appreciate the general Ruby community attitude that OS-Threading
>> isn't absolutely vital when you're on Linux and have _fork_ at the
>> ready, but under Windows it's very painful and really limits the types
>> of applications you can build with Ruby (with a reasonable amount of
>> effort) IME.
>
> This has been brought up at previous Ruby Conferences. It is my
> understanding that it is being worked on. So, relax and watch the
> blinking lights.
>
Yay! Thanks for the news.
I don't get to enough conferences...
:_)


From: Eric Armstrong on
Jan Svitok wrote:
>
> kbhit returns whether there are any keystrokes in the buffer
> getc returns them.
>
Nice! Didn't know about that kbhit.
That has promise. I wonder if there is a
multi-platform version of that API?

With that capability, I can dispense with
threads altogether, sleep for 1 second
intervals, and look for keyboard input
every time I wake up.

A brain-dead implementation is good enough
for this particular beast...
:_)




From: Eric Armstrong on
Francis Cianfrocca wrote:
> On 7/29/06, Eric Armstrong <Eric.Armstrong(a)sun.com> wrote:
>>
>> Nice! Didn't know about that kbhit.
>> That has promise. I wonder if there is a
>> multi-platform version of that API?
>
>
> What happens if you just use select to read the file descriptor associated
> with stdin? On Windows iirc, this descriptor is already raw. For Solaris
> etc
> you can just make it raw with termio calls.
>
Sounds promising. Do you have a bit of code
to go with the suggestion, perchance?
(I'm having a bit of trouble filling in the blanks.)