[#14206] undef_method :method_missing — Kenichi Komiya <kom@...1.accsnet.ne.jp>

154 messages 2001/08/04
[#14207] Re: undef_method :method_missing — nobu.nakada@... 2001/08/04

なかだです。

[#14208] Re: undef_method :method_missing — nobu.nakada@... 2001/08/05

なかだです。

[#14209] Virtual Machine — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14210] Re: Virtual Machine — Kenta MURATA <muraken2@...> 2001/08/05

むらけんです.

[#14212] Re: Virtual Machine — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14214] Re: Virtual Machine — SHIROYAMA Takayuki <psi@...> 2001/08/05

[#14220] Re: Virtual Machine — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14211] Common GUI framework(Re: Virtual Machine) — nobu.nakada@... 2001/08/05

なかだです。

[#14213] RE: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。どもっ。

[#14215] Re: Common GUI framework(Re: Virtual Machine) — akira yamada / やまだあきら <akira@...> 2001/08/05

[#14221] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14235] Re: Common GUI framework(Re: Virtual Machine) — IWATSUKI Hiroyuki <don@...> 2001/08/05

岩月と申します。

[#14237] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。どもっ。

[#14239] Re: Common GUI framework(Re: Virtual Machine) — ARIMA Yasuhiro <fit0298@...> 2001/08/05

有馬です。

[#14241] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14244] Re: Common GUI framework(Re: Virtual Machine) — ARIMA Yasuhiro <fit0298@...> 2001/08/05

有馬です。

[#14247] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。どもっ。

[#14263] Re: Common GUI framework(Re: Virtual Machine) — とみたまさひろ <tommy@...> 2001/08/05

とみたです。

[#14266] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14269] Re: Common GUI framework(Re: Virtual Machine) — とみたまさひろ <tommy@...> 2001/08/05

とみたです。

[#14275] Re: Common GUI framework(Re: Virtual Machine) — ARIMA Yasuhiro <fit0298@...> 2001/08/05

有馬です。

[#14294] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。

[#14317] Re: Common GUI framework(Re: Virtual Machine) — ARIMA Yasuhiro <fit0298@...> 2001/08/06

有馬です。

[#14321] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/06

金光です。どもっ。

[#14332] Re: Common GUI framework(Re: Virtual Machine) — ARIMA Yasuhiro <fit0298@...> 2001/08/06

有馬です。

[#14335] Re: Common GUI framework(Re: Virtual Machine) — Kenta MURATA <muraken2@...> 2001/08/06

むらけんです.

[#14346] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/06

金光です。どもっ。

[#14356] Re: Common GUI framework(Re: Virtual Machine) — ARIMA Yasuhiro <fit0298@...> 2001/08/06

有馬です。

[#14357] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/06

金光です。どもどもっ。

[#14243] Re: Common GUI framework(Re: Virtual Machine) — IWATSUKI Hiroyuki <don@...> 2001/08/05

岩月と申します。

[#14258] Re: Common GUI framework(Re: Virtual Machine) — akira yamada / やまだあきら <akira@...> 2001/08/05

[#14260] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。FOXとかもあるのかぁ。すげぇなぁ。

[#14277] Re: Common GUI framework(Re: Virtual Machine) — matz@... (Yukihiro Matsumoto) 2001/08/05

まつもと ゆきひろです

[#14295] Re: Common GUI framework(Re: Virtual Machine) — "KANEMITSU Masao" <masao-k@...> 2001/08/05

金光です。御大、待ってましたっ。

[#14390] [Patch] pp.rb and debug.rb — "NAKAMURA, Hiroshi" <nakahiro@...>

なひです。

113 messages 2001/08/09
[#14391] Re: [Patch] pp.rb and debug.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/09

なひです。書き忘れ。

[#14392] Re: [Patch] pp.rb and debug.rb — nobu.nakada@... 2001/08/09

なかだです。

[#14435] Re: [Patch] pp.rb and debug.rb — "K.Kosako" <kosako@...> 2001/08/13

nobu.nakada@nifty.ne.jpさんの

[#14437] Re: [Patch] pp.rb and debug.rb — nobu.nakada@... 2001/08/13

なかだです。

[#14449] Re: [Patch] pp.rb and debug.rb — Tanaka Akira <akr@...17n.org> 2001/08/14

In article <DJEGJLCFNEIMKDNMLFPHMEAHCBAA.nakahiro@sarion.co.jp>,

[#14450] Re: [Patch] pp.rb and debug.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/14

なひです。

[#14452] Re: [Patch] pp.rb and debug.rb — Tanaka Akira <akr@...17n.org> 2001/08/14

In article <DJEGJLCFNEIMKDNMLFPHEEAICBAA.nakahiro@sarion.co.jp>,

[#14453] Re: [Patch] pp.rb and debug.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/14

なひです。

[#14454] Re: [Patch] pp.rb and debug.rb — matz@... (Yukihiro Matsumoto) 2001/08/14

まつもと ゆきひろです

[#14455] Re: [Patch] pp.rb and debug.rb — Tanaka Akira <akr@...17n.org> 2001/08/14

In article <997774251.527258.14423.nullmailer@ev.netlab.jp>,

[#14474] Re: [Patch] pp.rb and debug.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/15

なひです。

[#14498] Re: [Patch] pp.rb and debug.rb — Tanaka Akira <akr@...17n.org> 2001/08/16

In article <DJEGJLCFNEIMKDNMLFPHEEALCBAA.nakahiro@sarion.co.jp>,

[#14499] Re: [Patch] pp.rb and debug.rb — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/16

なひです。

[#14504] Re: [Patch] pp.rb and debug.rb — Tanaka Akira <akr@...17n.org> 2001/08/16

In article <DJEGJLCFNEIMKDNMLFPHEEAPCBAA.nakahiro@sarion.co.jp>,

[#14507] marshal API (was Re: [Patch] pp.rb and debug.rb) — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/16

なひです。

[#14510] Re: marshal API (was Re: [Patch] pp.rb and debug.rb) — Tanaka Akira <akr@...17n.org> 2001/08/16

In article <DJEGJLCFNEIMKDNMLFPHMEBACBAA.nakahiro@sarion.co.jp>,

[#14511] Re: marshal API (was Re: [Patch] pp.rb and debug.rb) — "NAKAMURA, Hiroshi" <nakahiro@...> 2001/08/16

なひです。

[#14519] custom marshal (Re: Re: marshal API (was Re: [Patch] pp.rb and debug.rb)) — Tanaka Akira <akr@...17n.org> 2001/08/17

In article <DJEGJLCFNEIMKDNMLFPHIEBBCBAA.nakahiro@sarion.co.jp>,

[#14520] Re: marshal API (was Re: [Patch] pp.rb and debug.rb) — Tanaka Akira <akr@...17n.org> 2001/08/17

うぅむ。ぼーっとしてたら意味もなく Subject を変えてしまった。

[#14549] Re: custom marshal (Re: Re: marshal API (was Re: [Patch] pp.rb and debug.rb)) — Tanaka Akira <akr@...17n.org> 2001/08/22

In article <hvo66bnxe4b.fsf_-_@flux.etl.go.jp>,

[#14832] Re: custom marshal — GOTO Kentaro <gotoken@...> 2001/09/29

古い話題で恐縮ですが…

[#14833] Re: custom marshal — nobu.nakada@... 2001/09/29

なかだです。

[#14834] Re: custom marshal — Tanaka Akira <akr@...17n.org> 2001/10/01

In article <200109290948.f8T9mbh12942@sharui.nakada.kanuma.tochigi.jp>,

[#14835] Re: custom marshal — nobu.nakada@... 2001/10/01

なかだです。

[#14836] Re: custom marshal — matz@... (Yukihiro Matsumoto) 2001/10/01

まつもと ゆきひろです

[#14837] Re: custom marshal — Tanaka Akira <akr@...17n.org> 2001/10/02

In article <1001945748.240863.24023.nullmailer@ev.netlab.jp>,

[#14838] Re: custom marshal — nobu.nakada@... 2001/10/02

なかだです。

[#14839] Re: custom marshal — Tanaka Akira <akr@...17n.org> 2001/10/02

In article <200110020334.f923YLb08299@sharui.nakada.kanuma.tochigi.jp>,

[#14842] Re: custom marshal — nobu.nakada@... 2001/10/02

なかだです。

[#14843] Re: custom marshal — Tanaka Akira <akr@...17n.org> 2001/10/02

In article <200110021010.f92AAIb13474@sharui.nakada.kanuma.tochigi.jp>,

[#14844] Re: custom marshal — nobu.nakada@... 2001/10/02

なかだです。

[#14845] Re: custom marshal — matz@... (Yukihiro Matsumoto) 2001/10/02

まつもと ゆきひろです

[#14847] Re: custom marshal — matz@... (Yukihiro Matsumoto) 2001/10/02

まつもと ゆきひろです

[#14848] Re: custom marshal — nobu.nakada@... 2001/10/03

なかだです。

[#14852] Re: custom marshal — matz@... (Yukihiro Matsumoto) 2001/10/03

まつもと ゆきひろです

[#14465] Ruby/Bsearch — akira yamada / やまだあきら <akira@...>

16 messages 2001/08/14
[#14472] Re: Ruby/Bsearch — matz@... (Yukihiro Matsumoto) 2001/08/15

まつもと ゆきひろです

[#14595] SEGV at `$0 = "long long string"' — nobu.nakada@...

なかだです。

14 messages 2001/08/28

[ruby-dev:14478] Re: Ruby/Bsearch

From: "Akinori MUSHA" <knu@...>
Date: 2001-08-15 16:47:41 UTC
List: ruby-dev #14478
At Thu, 16 Aug 2001 00:15:05 +0900,
Satoru Takabayashi wrote:
> 作者です。
> 
> APIは、こんな感じでいいでしょうか。
> <http://namazu.org/~satoru/ruby-bsearch/>
> まずいようであれば修正します。

 rough/ 以下のモジュールは標準採用への登竜門ということで、よい
API ときれいな実装のためには互換性など気にせずにバンバンいじって
しまいましょう。


 今一つだけ気付いたのは、 1...5 形式の Range に対応していないと
いう些細な不具合です。あと、 API についていうと、こんな風にする
のはどうかなーと思いました。

	bsearch(v) で従来の bsearch {|x| x <=> v} と等価になる。
	ただし、要素が降順に並んでいる場合は従来の
	bsearch {|x| v <=> x} と等価。

	bsearch(v) {|x| f(x) } で従来の bsearch {|x| f(x) <=> v }
	と等価になる。ただし、要素が降順の場合は従来の
	bsearch {|x| v <=> f(x) } と等価。

	降順かどうかは最初と最後の要素を比較して判断する。
	ブロックを与えた場合はブロックの評価値を比較して判断する。

まあ、言葉で書くだけではあれなので実装してみました。

  def bsearch_first(value, range = 0...length())
    low = range.first() - 1

    if range.exclude_end?
      high = range.last()
    else 
      high = range.last() + 1
    end

    if block_given?
      desc = yield(first()) > yield(last())
    else
      desc = first() > last()
    end

    while low + 1 != high
      mid = (low + high) / 2

      if block_given?
        cmp = yield(self[mid]) <=> value
      else
        cmp = self[mid] <=> value
      end

      if !desc && cmp < 0 || desc && cmp > 0
        low = mid
      else 
        high = mid
      end
    end

    if high >= self.length
      return nil
    end

    if block_given?
      cmp = yield(self[high]) != value
    else
      cmp = self[high] != value
    end

    if cmp
      return nil
    else 
      return high
    end
  end


 単純な走査の場合はブロックの呼び出しがなくなるものの、条件判断が
いろいろ増えてしまっている気も。。

 まあ、使い方が若干直感的になるという方が主眼です。

> CVSアカウントをもらえれば継続的に保守できます。

 pserver 経由のアクセスになるので、希望のアカウント名と crypt
されたパスワードとを私宛に送ってください。すぐに発行します。


(入力した文字列を crypt する one-liner)

ruby -e "a=(0..127).map{|i|'%c'%i}.grep /[\da-z]/i;puts gets.chomp.crypt(a[rand a.size]+a[rand a.size])"

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Freeze this moment a little bit longer, make each impression
  a little bit stronger..  Experience slips away -- Time stand still"

In This Thread