[#1263] Draft of the updated Ruby FAQ — Dave Thomas <Dave@...>

33 messages 2000/02/08

[#1376] Re: Scripting versus programming — Andrew Hunt <andy@...>

Conrad writes:

13 messages 2000/02/15

[#1508] Ruby/GTK and the mainloop — Ian Main <imain@...>

17 messages 2000/02/19
[#1544] Re: Ruby/GTK and the mainloop — Yasushi Shoji <yashi@...> 2000/02/23

Hello Ian,

[#1550] Re: Ruby/GTK and the mainloop — Ian Main <imain@...> 2000/02/23

On Wed, Feb 23, 2000 at 02:56:10AM -0500, Yasushi Shoji wrote:

[#1516] Ruby: PLEASE use comp.lang.misc for all Ruby programming/technical questions/discussions!!!! — "Conrad Schneiker" <schneiker@...>

((FYI: This was sent to the Ruby mail list.))

10 messages 2000/02/19

[#1569] Re: Ruby: constructors, new and initialise — Yukihiro Matsumoto <matz@...>

The following message is a courtesy copy of an article

12 messages 2000/02/25

[ruby-talk:01221] Re: Trivial FAQ bug

From: matz@... (Yukihiro Matsumoto)
Date: 2000-02-02 09:06:19 UTC
List: ruby-talk #1221
In message "[ruby-talk:01219] Re: Trivial FAQ bug"
    on 00/02/01, "Conrad Schneiker" <schneiker@jump.net> writes:

|For instance, besides noting that Ruby doesn't treat "" as false like Perl
|does, is there a good language design or programming practice reason for
|this? Being new to Ruby and not being familiar with the reasons for such
|things, it seems to me that Perl's treatment of "" in conditions is somewhat
|less error-prone and somewhat better follows the principle of least
|surprise.

Mostly for performance reason, currently false test is done by one
bitwise operation.  If "" etc. made false, false test would be far
more complex.

|Since I am still learning Ruby, I thought it would be useful learning
|exercise to do a "Ruby Cookbook" FAQ for Perl programmers (an idea I got
|from a recent suggestion in the Python newsgroup to in effect translate the
|Perl Cookbook into Python). Any interest in this?

I'd like to see a Ruby Cookbook.  Of cource, I'll help to make one.

| One of the first things I
|would like to include would be examples of Ruby equivalents for Perl's map
|and grep functions, which I make heavy use of.

Enumerable's collect and select replace Perl's map/grep.

e.g.

  [1,2,3,4].collect{|x| x*2}            #=> [2,4,6,8]
  [1,2,3,4].select{|x| x % 2 == 0}      #=> [2,4]

							matz.

In This Thread