[#13273] Ruby anywhere — "NAKAMURA, Hiroshi" <nakahiro@...>

なひです.rubyistモード.

262 messages 1999/04/01
[#13305] Re: Ruby anywhere — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/04/05

なひです.

[#13308] Re: Ruby anywhere — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/04/05

なひです.まったく何書いてんだか... > 自分 ^^;

[#13309] Re: Ruby anywhere — 中村暁史 <anakamur@...> 1999/04/05

[#13310] iterator for Dummies( was Re: Ruby anywhere ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/04/05

なひです.もちろん「Dummy」なのは私です.^^;

[#13313] Re: iterator for Dummies( was Re: Ruby anywhere ) — Shugo Maeda <shugo@...> 1999/04/05

前田です。

[#13314] Re: iterator for Dummies( was Re: Ruby anywhere ) — hisanori@... 1999/04/06

松尾です。

[#13317] Re: iterator for Dummies( was Re: Ruby anywhere ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/04/06

なひです.

[#13330] Re: iterator for Dummies( was Re: Ruby anywhere ) — Wakou Aoyama <wakou@...> 1999/04/06

青山です。

[#13363] Re: iterator for Dummies( was Re: Ruby anywhere ) — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/04/06

なひです.

[#13367] Re: iterator for Dummies( was Re: Ruby anywhere ) — Wakou Aoyama <wakou@...> 1999/04/06

青山です。

[#13312] Re: Ruby anywhere — Inaba Hiroto <inaba@...> 1999/04/05

稲葉です。

[#13371] Re: Ruby and LISP ( was Re: Ruby anywhere ) — takagi@... (TAKAGI, Hiromitsu) 1999/04/06

> > > 「call-by-referenceで」もちょっと言葉が違うような。

[#13377] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Shin-ichiro Hara <sinara@...> 1999/04/07

原です。

[#13378] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Shugo Maeda <shugo@...> 1999/04/07

前田です。

[#13380] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Shin-ichiro Hara <sinara@...> 1999/04/07

原です。

[#13390] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Wakou Aoyama <wakou@...> 1999/04/07

青山です。

[#13398] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Shin-ichiro Hara <sinara@...> 1999/04/07

原です。

[#13399] constant/immutable(Re: Ruby and LISP) — Shugo Maeda <shugo@...> 1999/04/07

前田です。

[#13400] Re: constant/immutable(Re: Ruby and LISP) — 中村暁史 <anakamur@...> 1999/04/07

[#13474] Re: Ruby and LISP ( was Re: Ruby anywhere ) — takagi@... (TAKAGI, Hiromitsu) 1999/04/08

Shugo Maeda <shugo@netlab.co.jp> writes:

[#13490] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Shugo Maeda <shugo@...> 1999/04/08

前田です。

[#13496] What is Object in Ruby? (Re: Ruby and LISP) — Shin-ichiro Hara <sinara@...> 1999/04/08

原です。

[#13800] Re: What is Object in Ruby? (Re: Ruby and LISP) — Shin-ichiro Hara <sinara@...> 1999/04/16

原です。

[#13805] Re: What is Object in Ruby? (Re: Ruby and LISP) — gotoken@... (GOTO Kentaro) 1999/04/16

ごとけんです

[#13808] Re: What is Object in Ruby? (Re: Ruby and LISP) — Shin-ichiro Hara <sinara@...> 1999/04/16

原です。

[#13816] Re: What is Object in Ruby? (Re: Ruby and LISP) — Wakou Aoyama <wakou@...> 1999/04/16

青山です。

[#13824] Re: What is Object in Ruby? (Re: Ruby and LISP) — Shin-ichiro Hara <sinara@...> 1999/04/16

原です。

[#13830] Re: What is Object in Ruby? (Re: Ruby and LISP) — Wakou Aoyama <wakou@...> 1999/04/16

青山です。

[#13839] Re: What is Object in Ruby? (Re: Ruby and LISP) — Wakou Aoyama <wakou@...> 1999/04/17

青山です。

[#13842] Re: What is Object in Ruby? (Re: Ruby and LISP) — Shin-ichiro Hara <sinara@...> 1999/04/17

原です。

[#13856] Re: What is Object in Ruby? (Re: Ruby and LISP) — gotoken@... (GOTO Kentaro) 1999/04/18

ごとけんです

[#13872] Re: What is Object in Ruby? (Re: Ruby and LISP) — Shin-ichiro Hara <sinara@...> 1999/04/19

原です。

[#13880] Re: What is Object in Ruby? (Re: Ruby and LISP) — gotoken@... (GOTO Kentaro) 1999/04/19

ごとけんです

[#13883] destructive methods (Re: Re: What is Object in Ruby?) — matz@... (Yukihiro Matsumoto) 1999/04/19

[#13621] Integer[num] (Re: Ruby and LISP) — gotoken@... (GOTO Kentaro) 1999/04/12

ごとけんです

[#13622] Re: Integer[num] (Re: Ruby and LISP) — Shugo Maeda <shugo@...> 1999/04/12

前田です。

[#13624] Re: Integer[num] (Re: Ruby and LISP) — gotoken@... (GOTO Kentaro) 1999/04/12

ごとけんです

[#13630] Re: Integer[num] (Re: Ruby and LISP) — Shugo Maeda <shugo@...> 1999/04/12

前田です。

[#13675] Re: Integer[num] (Re: Ruby and LISP) — gotoken@... (GOTO Kentaro) 1999/04/13

ごとけんです

[#13677] Re: Integer[num] (Re: Ruby and LISP) — 中村暁史 <anakamur@...> 1999/04/13

[#13690] Flyweight (Re: Integer[num]) — gotoken@... (GOTO Kentaro) 1999/04/13

ごとけんです

[#23715] Re: Flyweight (Re: Integer[num]) — Masatoshi SEKI <m_seki@...> 2000/07/05

[#23718] context switch during finalizer(Re: Re: Flyweight) — matz@... (Yukihiro Matsumoto) 2000/07/06

まつもと ゆきひろです

[#23727] Re: context switch during finalizer(Re: Re: Flyweight) — Masatoshi SEKI <m_seki@...> 2000/07/06

[#13516] Re: Ruby and LISP ( was Re: Ruby anywhere ) — takagi@... (TAKAGI, Hiromitsu) 1999/04/08

Shugo Maeda <shugo@netlab.co.jp> writes:

[#13526] Re: Ruby and LISP ( was Re: Ruby anywhere ) — Shugo Maeda <shugo@...> 1999/04/09

前田です。

[#13568] Re: Ruby and LISP ( was Re: Ruby anywhere ) — takagi@... (TAKAGI, Hiromitsu) 1999/04/09

Shugo Maeda <shugo@netlab.co.jp> writes:

[#13383] — Inaba Hiroto <inaba@...>

稲葉です.

18 messages 1999/04/07
[#13422] Re: — kjana@... (YANAGAWA Kazuhisa) 1999/04/07

In message <9904070229.AA11857@tux0017.sdd.tokyo-sc.toshiba.co.jp>

[#13435] What is `binding' (was Re: Ruby and LISP) — Inaba Hiroto <inaba@...> 1999/04/08

稲葉です。これも出しなおしです.

[#13502] Re: Ruby and LISP ( was Re: Ruby anywhere ) — "豊福" <toyofuku@...>

豊福@パパイヤです。

16 messages 1999/04/08

[#13644] bbs — kikutani@...

rubyで書かれたWebの掲示板てありましたっけ?

31 messages 1999/04/12
[#13656] Re: bbs — TADA Tadashi <sho@...> 1999/04/13

初めて投稿します。多田@S.P.C.です。

[#13657] Re: bbs — kikutani@... 1999/04/13

On Tue, 13 Apr 1999 11:16:47 +0900,

[#13663] Re: bbs — hisanori@... 1999/04/13

松尾です。

[#13867] Re: What is Object in Ruby? (Re: Ruby and LISP) — toyofuku@...

豊福@パパイヤです。

15 messages 1999/04/19
[#13876] Re: What is Object in Ruby? (Re: Ruby and LISP) — Wakou Aoyama <wakou@...> 1999/04/19

青山です。

[#13903] timer — hisanori@...

松尾です。

24 messages 1999/04/20
[#13905] Re: timer — matz@... (Yukihiro Matsumoto) 1999/04/20

まつもと ゆきひろです

[#13910] Re: timer — hisanori@... 1999/04/20

松尾です.

[#13911] Thread GC (Re: Re: timer) — matz@... (Yukihiro Matsumoto) 1999/04/20

まつもと ゆきひろです

[#13920] Re: Thread GC (Re: Re: timer) — hisanori@... 1999/04/20

松尾です.

[#13924] Re: Thread GC (Re: Re: timer) — matz@... (Yukihiro Matsumoto) 1999/04/20

まつもと ゆきひろです

[#14037] TMail について — 民斗 <tommy@...>

民斗です。

38 messages 1999/04/24
[#14082] Re: TMail について — Minero Aoki <aamine@...> 1999/04/27

あおきです。報告ありがとうございます。

[#14088] Re: TMail について — 民斗 <tommy@...> 1999/04/28

民斗です。

[#14090] Re: TMail について — WATANABE Hirofumi <watanabe@...> 1999/04/28

わたなべです.

[#14092] Re: TMail について — Minero Aoki <aamine@...> 1999/04/28

あおきです。

[#14095] Re: TMail について — WATANABE Hirofumi <eban@...> 1999/04/29

わたなべです.

[#14096] Re: TMail について — kikutani@... 1999/04/30

In ruby-list, you wrote:

[#14099] Re: TMail について — matz@... (Yukihiro Matsumoto) 1999/04/30

まつもと ゆきひろです

[ruby-list:13577] Re: What is `binding' (was Re: Ruby and LISP)

From: Inaba Hiroto <inaba@...>
Date: 1999-04-10 09:54:36 UTC
List: ruby-list #13577
稲葉です。

rubyには「binding」という関数があるのですね。忘れていました。
これは、その時点での変数とその保持する値との対応関係を表すデータ構造を
返すのですね。

主張を整理します。議題は「rubyやlispですべての代入は束縛であるか」です。

・束縛とは、広い意味で「変数に値を結び付けること」である事に異論はない。
その意味では全ての計算機言語において代入は束縛である。

・束縛を、2つの変数が同じオブジェクトを参照していることを意味する場合が
あることは自分は気がついていなかったが、そういう用法があることにも異論は
ない。この意味でrubyやlispではすべての代入が束縛であるといってもその可能
性からいってさほどおかしくない。

・束縛を、狭い意味で「新たに変数を導入してそれに値を結び付けること」と
いう意味に使用することが特にLisp方面では多い。この意味ではrubyもlispも
代入=束縛ではない。

YANAGAWA Kazuhisa wrote:
> 
> In message <9904080032.AA17943@tux0017.sdd.tokyo-sc.toshiba.co.jp>
> inaba@sdd.tokyo-sc.toshiba.co.jp writes:
> 
> > 「プログラミング言語ML」by Jefeerey D. Ullman 訳書p.43

MLはほとんど使ってないので、これに基づく議論はやめます。
 
> > 「初めての人のためのLISP」 竹内郁雄=著 p.64
> >         ... 実効的には代入と同じことですが、この場合、“新たに”変数
> >         (つまり新しいメモ用紙)を用意し、同時に代入も行うので、雰囲気
> >         が少し違います。Lispの世界では歴史的な理由からこれを代入と呼ばず
> >         に、束縛(binding)と呼びます。...束縛という言葉は“一時的”という
> >         ニュアンスを含んでいます。...
> 
> setq の説明かなにかでしょうか.たぶん.

いいえ、関数の実行時に、関数本体を評価する前に仮引数に値が結び付けられる
ときの説明です。これは第4講なのですが、第3講でsetqによる代入が説明されて
います。

>                                        その意味で「新たにシンボルを導
> 入」する事を「含んでいる」という説明だったりしないでしょうか.後半は
> 「定義」ではなく「束縛」と呼ぶ理由を示しているに過ぎませんね.しかも
> 「一時的」という言葉からは「将来シンボルと値の結び付きが変わり得る」と
> いう意味あいを感じます.

ここで「一時的」というのは「変わりうる」ではなくて、「元に戻りうる」こ
とを意味しています。上の引用に続く部分を追加します。

	...引数を表す変数名は、その関数本体の中でしか意味を持ちません。
	だから、その変数名を関数本体の中で一時的にちょっと束縛しておこ
	ういうわけです。

> ある関数があって,これが複数のシンボルを含んでいるとします.それぞれが
> 「自由変数」とか「束縛変数」とか呼ばれるわけですが,「束縛変数」は単に
> それが関数の計算を行うのにあらかじめ値を定められているだけですし,関数
> をある値の組に適用する場合,「自由変数」に「値を束縛」して計算を行うわ
> けですが,この場合でも「シンボルに値が結びつけられた」だけであり,「計
> 算環境中に新たなシンボルが導入される事を必要としていません」.

「シンボル」と「変数」の混同があるように思います。

シンボルは変数名であって変数ではありません。狭い意味の「束縛」の定義は
「新たに変数を導入して値を結び付ける事」で、新たにシンボルを導入する
とは限りません。

環境に変数xがあって値1が結び付けられている場合に「xに2を束縛する」とは
同じ変数名だが別の変数x'を導入して2という値を結び付け、以後xという変数
名のアクセスはx'のアクセスとすることです。このx'を環境から除けばもとの
変数xは残っているのでxという変数名にアクセスすれば元の値1が得られます。

よって束縛は「元に戻りうる」のです。

...うーむ、これを書きながら、変数と変数名(シンボル)を別のものとする
見方が誤解のもとなのかなと思い付きました。変数と変数名の区別をつけない
とすれば、束縛の定義は、「その時点の変数の状態・値を保持しつつ変数に新
たな値を結び付けること」のようにかえる事になります。

すると上の例は、以下のようにかわりますね。

環境に変数xがあって値1が結び付けられている場合に「xに2を束縛する」とは
時点の変数値1をどこかに待避し、変数xには新しい値2を結び付けることです。
この束縛が解除されれば、もとの変数値1がふたたびxに結び付けられます。

> # (lambda.x(fx))(1) なんて場合「x に 1 を束縛して計算する」って言った
> # ような気がする....という事を小難しく言ってるだけです.

まさにこういうlambda束縛が自分のいいたい狭い意味の「束縛」です。

  (lambda.x (f (lambda.x (g x))(2), x))(1)

内側のlambdaでxが2に束縛される事は、そのlambda内でのみ有効で、それ
を抜ければ外側のlambdaでxが1に束縛された状態に戻らなければいけません。

> ....こんな事をいっしょうけんめい主張したからってどうなるもんでもないで
> すけど (^^;

いえ、少なくとも自分にとっては自分の考えていることを言葉にすることで、
自分の思考を明確にできるのは意味ある事だと感じています。
--
			稲葉 浩人  <inaba@st.rim.or.jp>

In This Thread