[#192] auto-loaded script? — Julian Fondren <julian@...>
Does ruby load any particular scripts upon startup?
13 messages
1999/01/17
[#193] Re: auto-loaded script?
— gotoken@... (GOTO Kentaro)
1999/01/17
In message "[ruby-talk:00192] auto-loaded script?"
[#194] Re: auto-loaded script?
— Julian Fondren <julian@...>
1999/01/18
> >Does ruby load any particular scripts upon startup?
[#195] Re: auto-loaded script?
— matz@... (Yukihiro Matsumoto)
1999/01/18
Hi.
[#197] Re: auto-loaded script?
— Julian Fondren <julian@...>
1999/01/18
> rb_load_file("/home/julian/.rubyrc"); /* this line added */
[#210] Get character with no wait — Gabriel <gabriel@...>
What is the best way to do a getc without waiting; so I can try to grab
8 messages
1999/01/25
[ruby-talk:00212] Re: Get character with no wait
From:
Gabriel <gabriel@...>
Date:
1999-01-25 04:31:11 UTC
List:
ruby-talk #212
That suppressed echo of input, but didn't solve the problem.
Here is my code snippet, where s is a socket object:
system 'stty -echo'
loop do
j = getc()
if j != nil
s.putc(j)
end
m = s.getc
if m != nil
putc(m)
end
end
On Mon, Jan 25, 1999 at 01:17:07PM +0900, Yukihiro Matsumoto wrote:
> Hi.
>
> In message "[ruby-talk:00210] Get character with no wait"
> on 99/01/24, Gabriel <gabriel@devo.com> writes:
>
> |What is the best way to do a getc without waiting; so I can try to grab
> |it in a loop where i am also sending characters (e.g. in an irc program,
> |where I am grabbing input from a socket while sending characters from
> |the console). I'd rather not do it with threads in the interest of
> |portability, but if it's the best solution, I'd like to know.
>
> I think the easiest way is to use stty, if you are on UNIX.
>
> begin
> system 'stty -echo'
> loop do
> c = getc()
> ...
> end
> ensure
> system 'stty echo'
> end
>
> I believe this works also on cygwin32.
>
> matz.
>