The Pragmatic Programmer の David Thomas and Andrew Hunt が Rubyの本を出すようです。
Programming Ruby: The Pragmatic Programmer's Guide
David Thomas and Andrew Hunt
Use Ruby and you'll write better code, be more productive, and enjoy programming more.
"I love it. Conceptually it is really clean, and sweet." --Kent Beck, author of Extreme Programming Explained, on the Ruby language
Kent Beck に推薦させるとは、さすが! XP本家でも知名度が上がって来ているんでしょうか。
以下、予告編のキワメツキの部分です。 As Pragmatic Programmers we've tried many, many languages in our search for tools to make our lives easier, for tools to help us do our jobs better. Until now, though, we'd always been frustrated by the languages we were using. 多くの、実に多くの言語を試して見たが、どれにも失望した。
・・・・ When we discovered Ruby, we realized that we'd found what we'd been looking for. More than any other language with which we have worked, Ruby stays out of your way. You can concentrate on solving the problem at hand, instead of struggling with compiler and language issues. That's how it can help you become a better programmer: by giving you the chance to spend your time creating solutions for your users, not for the compiler.
Rubyを発見した時、探していたものを見付けたことに気が付いた。
以下、ruby-list 9/28 の記事より転載です。 --------------------------------------- Dave and Andyの「Programming Ruby」の宣伝、 http://www.ruby-lang.org/ja/ にも載せませんか?
字下げだけだと、わかりにくいという向きには次の案は? function sub(int a, int b) : int | int w | for (w=0;w<10;w++) | | putchar('0'+w); putchar('0'+w) | return w 一応スコープも表現できる。ただ、うちこむのはうざったい。 言語は、関数定義がC と PASCALのあいのこ。 構文は、マルチステートメント以外、セミコロンの無いCと いうことで。
>>259 a = 4; b = a; #=> a = 4, b = 4 b = 2; #=> a = 4, b = 2 b = 2 の時点で b に新しい Fixnum オブジェクトが代入されるので a と b は無関係になります。 さらに、Ruby の実装では Fixnum においては 処理速度向上のために即値を使っています。 そのため同じ数値は同じ ID を持っていて 厳密にはオブジェクトじゃないみたいです。 まあ数値にオブジェクトとしての identify があっても役立たないですし。 オブジェクトと変数の関係に関しては263さんの言うとおりですね。
>>266 ところで、 irb(main):001:0> a = 4 4 irb(main):002:0> p a, a.id 4 9 nil irb(main):003:0> b = a 4 irb(main):004:0> p b, b.id 4 9 nil irb(main):005:0> b = 2 2 irb(main):006:0> p a, a.id, b, b.id 4 9 2 5 nil irb(main):007:0> b = 4 4 irb(main):008:0> p b.id 9 nil だって。
>>270 文字列の場合は、 元の文字列を変更したくない時は ! のつかないメソッドを使い、 変更しても構わない時は ! つきのメソッドを使うという感じです。 a = "Just Another Ruby Hacker" b = a.sub(/Hacker/, 'Chubou') b = "<h1>#{b}</h1>" p a #=> "Just Another Ruby Hacker" p b #=> "<h1>Just Another Ruby Chubou</h1>"