[#13273] Ruby anywhere — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです.rubyistモード.
なひです.
なひです.まったく何書いてんだか... > 自分 ^^;
なひです.もちろん「Dummy」なのは私です.^^;
前田です。
松尾です。
だんのです。
原です。
なひです.
青山です。
なひです.
青山です。
松尾です。
前田です。
なひです.
前田です。
なひです.
稲葉です。
Shugo Maeda <shugo@netlab.co.jp> writes:
前田です。
ごとけんです
前田です。
ごとけんです
前田です。
ごとけんです
ごとけんです
まつもと ゆきひろです
まつもと ゆきひろです
原です。
原です。
ごとけんです
原です。
青山です。
原です。
青山です。
青山です。
原です。
ごとけんです
原です。
ごとけんです
In message "[ruby-list:13884] Re: What is Object in Ruby? (Re: Ruby and LISP)"
ごとけんです
原です。
ごとけんです
原です。
ごとけんです
まつもと ゆきひろです
青山です。
原です。
なひです.眠い...
> > > 「call-by-referenceで」もちょっと言葉が違うような。
原です。
前田です。
原です。
だんのです。
青山です。
原です。
青山です。
青山です。
前田です。
原です。
前田です。
まつもと ゆきひろです
Shugo Maeda <shugo@netlab.co.jp> writes:
前田です。
Shugo Maeda <shugo@netlab.co.jp> writes:
原です。
前田です。
[#13274] Ruby Home Page — WATANABE Tetsuya <tetsu@...>
◎要求推察機能搭載
[#13288] big ruby program — kikutani@...
今までrubyで書かれた、もっとも大きなプログラム
[#13383] — Inaba Hiroto <inaba@...>
稲葉です.
In message <9904070229.AA11857@tux0017.sdd.tokyo-sc.toshiba.co.jp>
稲葉です。これも出しなおしです.
In message <9904080032.AA17943@tux0017.sdd.tokyo-sc.toshiba.co.jp>
稲葉です。
青山です。
[#13427] inline callback — Masatoshi SEKI <m_seki@...>
[#13436] Re: Ruby and LISP ( was Re: Ruby anywhere ) — 助田 雅紀 <masaki.suketa@...>
助田です.
[#13445] Re: constant/immutable(Re: Ruby and LISP) — 助田 雅紀 <masaki.suketa@...>
助田です.全然 Ruby と関係ないですが.
[#13502] Re: Ruby and LISP ( was Re: Ruby anywhere ) — "豊福" <toyofuku@...>
豊福@パパイヤです。
原です。
原です。
[#13506] telnet.rb STDOUT — kikutani@...
昨日書いた、proxy経由でpopするやつですが、
青山です。
青山です。
On Fri, 9 Apr 1999 22:08:09 +0900,
青山です。
青山です。
[#13541] iterator <-> cursor (Re: iterator for Dummies) — Inaba Hiroto <inaba@...>
稲葉です.
[#13582] Dir.foreach — greentea@...2.so-net.ne.jp (Tomoyuki Kosimizu)
こんにちは、越水です。
[#13588] /.*\n$/ — kikutani@...
if "hoge\n" =~ /.*\n$/
[#13607] Re: iterator for Dummies( was Re: Ruby anyw here ) — 助田 雅紀 <masaki.suketa@...>
助田です.
前田です。
[#13644] bbs — kikutani@...
rubyで書かれたWebの掲示板てありましたっけ?
初めて投稿します。多田@S.P.C.です。
On Tue, 13 Apr 1999 11:16:47 +0900,
松尾です。
多田@S.P.C.です。
bbsのスレッドがこんなに盛り上るとは思わなかった...
On Tue, 13 Apr 1999 13:47:42 +0900,
こんばんは。鈴木教郎です。
[#13646] Re: internal/external iterator (was Re: ite rator for Dummies) — 助田 雅紀 <masaki.suketa@...>
助田です.
[#13673] ruby 1.2.5 is released — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
[#13680] FW: ruby-1.2.5 mkconfig.rb — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです.
まつもと ゆきひろです
土岐です。
まつもと ゆきひろです
わたなべです.
まつもと ゆきひろです
小松です。
まつもと ゆきひろです
[#13688] What is callcc? (Re: iterator <-> cursor) — toyofuku@...
豊福@パパイヤです。
[#13697] ruby で MIDI — Keisuke Minami <keisuke@...>
三並です。
[#13710] private singleton method — thitoshi@... (TAKAHASHI Hitoshi)
[#13712] IPv6-ready ruby (Forward: [ruby-talk:00274]) — gotoken@... (GOTO Kentaro)
ごとけんです
まつもと ゆきひろです
ももちゃんです.
まつもと ゆきひろです
ももいちゃんです.
[#13720] Re: What is callcc? (Re: iterator <-> cursor) — toyofuku@...
豊福@パパイヤです。
まつもと ゆきひろです
[#13741] Re: iterator — "豊福" <toyofuku@...>
豊福@パパイヤです。
[#13762] accepting multiple TCPserver — Jun-ichiro itojun Hagino <itojun@...>
[#13810] style — Kikutani Makoto <kikutani@...>
仕事がいまいちやる気にならんので(毎度のことだが)雑談です。
[#13811] ping.rb で false — Yoshiki Wada <wada@...>
和田と言います。
[#13865] cross-reference duplication — Ryunosuke Ohshima <ryu@...>
はじめまして、大島@北陸先端科学技術大学院大学と申します。
[#13867] Re: What is Object in Ruby? (Re: Ruby and LISP) — toyofuku@...
豊福@パパイヤです。
青山です。
まつもと ゆきひろです
青山です。
まつもと ゆきひろです
[#13894] FreeBSD port kit for some extention modules and applications — Yasuhiro Fukuma <yasuf@...>
福間@福岡 です。
[#13903] timer — hisanori@...
松尾です。
まつもと ゆきひろです
松尾です.
まつもと ゆきひろです
松尾です.
まつもと ゆきひろです
matz@netlab.co.jp (Yukihiro Matsumoto) writes:
In message <371F9FC120.AA42.anakamur@exa.i-tech.co.jp>
In message <371FE23633A.D92F.anakamur@exa.i-tech.co.jp>
[#13927] Re: Thread GC (Re: Re: timer) — Inaba Hiroto <inaba@...>
稲葉です.
[#13930] mod_ruby 0.1.0 — Shugo Maeda <shugo@...>
前田です。
[#13948] Re: What is Object in Ruby? (Re: Ruby and LISP) — toyofuku@...
豊福@パパイヤです。
青山です。
[#13951] Message of Today in 1999/04/20. — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです.
まつもと ゆきひろです
[#13967] Proc.new — akendo@...3.rim.or.jp
遠藤です。Ruby/Tkで楽しく遊ばせていただいています。
まつもと ゆきひろです
遠藤です。問題の記述が悪くて申し訳ありません。
[#14014] Re: What is callcc? (Re: iterator <-> cursor) — toyofuku@...
豊福@パパイヤです。
[#14037] TMail について — 民斗 <tommy@...>
民斗です。
あおきです。報告ありがとうございます。
民斗です。
わたなべです.
あおきです。
わたなべです.
In ruby-list, you wrote:
まつもと ゆきひろです
こんにちは。鈴木教郎です。
原です。
あおきです。
[#14038] ttyname(3) — gotoken@... (GOTO Kentaro)
ごとけんです
[#14054] 今日の一言 — WATANABE Tetsuya <tetsu@...>
渡辺哲也です。
[#14070] — Kazunori Akaishi <akaishi@...>
akaishi です。
[ruby-list:13827] Re: iterator <-> cursor (Re: iterator for Dummies)
咳です。
From: Shin-ichiro Hara <sinara@blade.nagaokaut.ac.jp>
> これの callcc 版を考えてみました。まず、Queue 相当のものなんですが、
> バッファがないのでかわいらしく Hole という名前にしました。
いまさら Thread 版を作ってみました。
以前に Thread 間 pipe が欲しくて作ったものに手を加えました。
Pipeクラスは原さんのHoleに相当します。
要素に nil を持てるように番兵 (PipeEOF) を導入しています。
また、複数の Thread が pipe に read/write できます。
## イテレータとは関係ないっすね。最初はLinda みたいの作りたかったんです。
Pipe は次のように使います。
pipe = Pipe.new
Thread.new do
for i in 1..5
pipe.write(i)
end
pipe.close
end
while (v = pipe.read) != pipe.eof
p v
end
以下は、Pipe と 外部イテレータです。
-- pipe.rb --
#!/usr/local/bin/ruby
require 'thread'
class PipeEOF; end
class PipeBrokenError<RuntimeError; end
class Pipe
def initialize(pipelen=1)
@enq = Queue.new
@buffer = Queue.new
for i in 1..pipelen
@enq.push nil
end
@eof = PipeEOF.new # sentinel
@done = false
end
attr :eof
def eof?(e)
@eof == e
end
def write(e)
@enq.pop
if @done
@enq.push nil
raise(PipeBrokenError, 'closed')
end
@buffer.push(e)
end
def read
begin
v = @buffer.pop
ensure
@enq.push nil
@buffer.push(@eof) if (v == @eof)
end
end
def close
@buffer.push(@eof)
@done = true
end
end
#=begin
#
# 外部イテレータにしてみた部分
#
if __FILE__ == $0
class Pipe
def externalIterator(src)
src = src
que = Pipe.new
Thread.new do
for i in src
que.write(i)
end
que.close
end
que
end
module_function :externalIterator
end
def match_items(a, b)
begin
ia = Pipe.externalIterator(a)
ib = Pipe.externalIterator(b)
i = 0
loop do
item_a = ia.read
item_b = ib.read
if ia.eof == item_a and ib.eof != item_b
printf "collections `a' shorter than `b'(size %d)\n", i
return
elsif ia.eof != item_a and ib.eof == item_b
printf "collections `b' shorter than `a'(size %d)\n", i
return
elsif ia.eof == item_a and ib.eof ==item_b
break
elsif item_a != item_b
printf "collections differ on %dth item\n", i
return
end
i+=1
end
printf "collections `a' and `b' are same(size %d)\n", i
ensure
ia.close
ib.close
end
end
match_items([1,2,3,4,5],[1,2,8,9,0])
match_items([1,2,3,4],[1,2])
match_items([1,2],[1,2,8,9,0])
match_items([1,2],[1,2,8,9,0])
match_items([1,2,3,4,5],[1,2,3,4,5])
match_items([1,2,3,4,5],[1,2,3,4,4])
match_items({1,2,3,4},{1,2,3,4})
match_items([1,2,3,nil,5],[1,2,3,nil,5])
end
#=end
=begin
#
# Pipe のテストプログラム部分
#
if __FILE__ == $0
pipe = Pipe.new(3)
writer = []
for i in 1..4
th = Thread.new {
for e in 1..5
pipe.write(e)
end
}
writer.push(th)
end
reader = []
for i in 1..4
th = Thread.new {
begin
while (v = pipe.read) != pipe.eof
p v
end
ensure
print "died\n"
end
}
reader.push(th)
end
begin
writer.each do |th|
Thread.join(th)
end
pipe.close
end
reader.each do |th|
Thread.join(th)
end
end
=end