[#14715] HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...>

高橋征義です。

32 messages 1999/06/01
[#14834] Re: HTTP Client with Ruby — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/06/05

なひです.

[#14836] Re: HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...> 1999/06/05

高橋征義です。

[#14858] Re: HTTP Client with Ruby — gotoken@... (GOTO Kentaro) 1999/06/07

ごとけんです

[#14896] Re: HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...> 1999/06/07

高橋です。みなさまどうもありがとうございます。

[#14907] Re: HTTP Client with Ruby — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/06/08

なひです.

[#14766] ruby 1.3.4 on BSD/OS 3.1 — Yasunari Momoi <momo@...>

BSD/OS 3.1 (with kame) で ruby-1.3.4 を作ろうとしているんで

18 messages 1999/06/03
[#14770] Re: ruby 1.3.4 on BSD/OS 3.1 — matz@... (Yukihiro Matsumoto) 1999/06/03

まつもと ゆきひろです

[#15012] ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...>

22 messages 1999/06/16
[#15013] Re: ext ML の過去ログはいずこ? — Shin-ichiro Hara <sinara@...> 1999/06/16

原です。

[#15014] Re: ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...> 1999/06/16

[#15015] Re: ext ML の過去ログはいずこ? — Kazunori Akaishi <akaishi@...> 1999/06/16

akaishi です。

[#15016] Re: ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...> 1999/06/16

[#15045] mail library — Minero Aoki <aamine@...>

あおきです。

96 messages 1999/06/20
[#15075] Re: mail library — Minero Aoki <aamine@...> 1999/06/22

あおきです。

[#15122] Re: mail library — Minero Aoki <aamine@...> 1999/06/28

あおきです。

[#15123] Re: mail library — matz@... (Yukihiro Matsumoto) 1999/06/28

まつもと ゆきひろです

[#15125] Re: mail library — WATANABE Hirofumi <watanabe@...> 1999/06/28

わたなべです.

[#15126] Re: mail library — matz@... (Yukihiro Matsumoto) 1999/06/28

まつもと ゆきひろです

[#15146] Re: mail library — Minero Aoki <aamine@...> 1999/06/29

あおきです。

[#15148] Re: mail library — matz@... (Yukihiro Matsumoto) 1999/06/29

まつもと ゆきひろです

[#15161] Re: mail library — Minero Aoki <aamine@...> 1999/06/30

あおきです。

[#15165] Re: mail library — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/06/30

なひです.

[#15167] Re: mail library — Minero Aoki <aamine@...> 1999/06/30

あおきです。

[#15219] Re: mail library — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/03

なひです.

[#15228] Re: mail library — hisanori@... 1999/07/05

松尾です。

[#15279] Re: mail library — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/07

なひです.

[#15172] Re:mail library — Takeo Iwama <iwamat@...> 1999/07/01

はじめまして、岩間です。

[#15218] JUS workshop ( was Re:mail library ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/03

なひです.mod_rubyと格闘中です.

[#15220] Mod_ruby server does not respond when POST request. — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/03

なひです.mod_rubyネタはruby-listでよいでしょうか?

[#15226] Re: Mod_ruby server does not respond when POST request. — Shugo Maeda <shugo@...> 1999/07/05

前田です。

[#15240] mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 ( was Re: Mod_ruby server does not respond when POST request. ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/07/05

なひです.

[#15242] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 ( was Re: Mod_ruby server does not respond when POST request. ) — Shugo Maeda <shugo@...> 1999/07/05

前田です。

[#15308] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 — Katsuyuki Komatsu <komatsu@...> 1999/07/08

小松です。

[#15310] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 — Shugo Maeda <shugo@...> 1999/07/08

前田です。

[#15313] Re: mod_ruby/0.1.2 with Apache/1.3.6 on Solaris/2.5.1 — Katsuyuki Komatsu <komatsu@...> 1999/07/08

小松です。

[#15057] 複雑?な構造体の定義方法 — Koichi Shigematsu <shige@...>

しげまつ と申します。  とっても久しぶりの投稿です。

18 messages 1999/06/21
[#15058] Re: 複雑?な構造体の定義方法 — matz@... (Yukihiro Matsumoto) 1999/06/21

まつもと ゆきひろです

[#15059] Re: 複雑?な構造体の定義方法 — Koichi Shigematsu <shige@...> 1999/06/21

しげまつ です。

[#15061] Re: 複雑?な構造体の定義方法 — matz@... (Yukihiro Matsumoto) 1999/06/21

まつもと ゆきひろです

[#15065] pattern (Re: 複雑?な構造体の定義方法) — gotoken@... (GOTO Kentaro) 1999/06/21

ごとけんです

[#15076] Re: pattern (Re: 複雑?な構造体の定義方法) — matz@... (Yukihiro Matsumoto) 1999/06/22

まつもと ゆきひろです

[#15077] Re: pattern (Re: 複雑?な構造体の定義方法) — gotoken@... (GOTO Kentaro) 1999/06/22

ごとけんです

[ruby-list:14982] Re: thread with curses

From: Yoshinori Toki <toki@...>
Date: 1999-06-10 09:47:37 UTC
List: ruby-list #14982
土岐です。

From: HATTORI Masashi <hattori@ppp.upload.or.jp>
Subject: [ruby-list:14970] thread with curses
Date: Thu, 10 Jun 1999 13:12:36 +0900

> 画面を二つにわけて片方をキーボードからの入力用、片方をサーバーから送られ
> て来たデータの表示用、というようなのを作ろうと思ったのですが、入力用の方
> でgetstrすると、そこで止まってしまいます。
> 
> こういうときはどのように書いたらいいのでしょうか。

curses の IO は ruby 本体の IO と違ってスレッドのことは考慮してくれな
いので、止まってしまうのはどうしようもないと思います。IO::select で入
力の有無をチェックしてから getch で一文字ずつ読み出してみたらどうでしょ
う。

require "curses"
include Curses

module Curses
  class Window
    def get_str
      str = ""
      max = str.length
      line = cury
      col = curx
      catch(:CURSES_WINDOW_GET_STR) do
	loop do
	  setpos(line, col)
	  addstr(" " * max)
	  setpos(line, col)
	  addstr(str)
	  refresh
	  sleep(0.1) if (IO::select([ STDIN ]))
	  case (c = getch)
	  when ?\C-h
	    str.chop!
	  when ?\C-u
	    str = ""
	  when ?\n
	    throw(:CURSES_WINDOW_GET_STR,
		  unless (str.empty?) then str end)
	  when ?\C-g
	    throw(:CURSES_WINDOW_GET_STR, nil)
	  else
	    str << c.chr
	  end
	  max = [ max, str.length ].max
	end
      end
    end
  end
end

init_screen

# これも追加
cbreak
noecho

max = lines - 3

output = Window.new( max, cols, 0, 0)
output.setpos( 0, 0)
input = Window.new( 2, cols, max + 1, 0)

Thread.start do
  i = 0
  while i < 100
    output.addstr( i.to_s + "\n")
    output.refresh
    sleep 1
    i += 1
  end
end

while TRUE
  input.setpos( 1, 0)
  input.addstr( "input > ")
  input.refresh
  # sleep 2
  tmp = input.get_str
  if tmp == "q"
    break
  end
  output.addstr( tmp + "\n")
  output.refresh
  input.clear
end

input.close
output.close

close_screen

----------------------------------------------------------------------------
土岐 仁謙	神戸大学物理高エネ研 M2
URL: http://www3.phys.sci.kobe-u.ac.jp/~toki/index.html
PGP fingerprint = D0 A8 90 AB 73 F8 34 FE  CE CA DB BF 01 30 C0 35

In This Thread