Ruby / About

From WhyNotWiki
Jump to: navigation, search

Information about Ruby, excluding how to use it, libraries for it, etc., which each can be their own pages ...

See also:


Introductions / Analysis of / Quotes about

Yukihiro Matsumoto (Matz) (2004) in Dave Thomas (2006-01-16). “Foreword to the First Edition”, Programming Ruby: The Pragmatic Programmer's Guide [the Pickaxe book], 2nd ed., xxi. 

Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software. Shortly after I was introduced to computers, I became interested in programming languages. I believed that an ideal programming language must be attainable, and I wanted to be the designer of it. Later, after gaining some experience, I realized that this kind of ideal, all-purpose language might be more difficult than I had thought. But I was still hoping to design a language that would work for most of the jobs I did [every day]. [...] Years later I talked with colleagues about scripting languages, their power and possibility. As an object-oriented fan for more than fifteen years, it seemed to me that OO programming was very suitable for scripting too. I did some research on the 'net for a while, but the candidates I found, Perl and Python, were not exactly what I was looking for. I wanted a language more powerful than Perl and more object-oriented than Python. Then, I remembered my old dream and decided to design my own language. At first I was just toying around with it at work. But gradually it grew to be a tool good enough to replace Perl. I named it Ruby—after the precious red stone—and released it to the public in 1995. Since then a lot of people have become interested in Ruby. Believe it or not, Ruby is actually more popular than Python in Japan right now [2000]. I hope that eventually it will be just as well received all over the world. I believe that the purpose of life is, at least in part, to be happy. Based on this belief, Ruby is designed to make programming not only easy but also fun. It allows you to concentrate on the creative side of programming, with less stress. [...] It is my hope that both Ruby and this book will serve to make your programming easy and enjoyable. Have fun!

Yukihiro Matsumoto (Matz) (2004) in Dave Thomas (2006-01-16). “Foreword to the Second Edition”, Programming Ruby: The Pragmatic Programmer's Guide [the Pickaxe book], 2nd ed., xxiii. 

No one in 1993 would have believed that an object-oriented language created by a Japanese amateur language designer would end up being used worldwide and that the language would become almost as popular as Perl. It was insane. I admit that. I didn't believe it either. But it happened, far exceeding my expectations. It was caused—at least in part&}dash;by the first edition of this book. The famous Pragmatic Programmers chose a dynamic language that was virtually unknown to anyone outside of Japan and wrote a good book about it. It was just like a miracle. That's now history. The future starts now. We have the second edition [...], which is better than the first one. It's no longer a miracle. This time, the grown-up Ruby community helped to develop the book. [...]

Dave Thomas (2006-01-16). “Foreword to the Second Edition”, Programming Ruby: The Pragmatic Programmer's Guide [the Pickaxe book], 2nd ed., xxiii. 

When Andy and I wrote the first edition, we had to explain the background and appeal of Ruby. Among other things, we wrote "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." That belief is even stronger today. Four years later, Ruby is still our language of choice: I use it for client applications, I use it to run our publishing business, and I use it for all those little programming jobs I do just to get things running smoothly. In those four years, Ruby has progressed nicely. [...]

"For me, the purpose of life is, at least partly, to have joy. Programmers often feel joy when they can concentrate on the creative side of programming, so Ruby is designed to make programmers happy." (source? differs slightly from my other quote.)

"Ruby inherited the Perl philosophy of having more than one way to do the same thing. [...] I want to make Ruby users free. I want to give them the freedom to choose. People are different. People choose different criteria. But if there is a better way among many alternatives, I want to encourage that way by making it comfortable. So that's what I've tried to do." --Yukihiro Matsumoto

"I always knew one day Smalltalk would replace Java. I just didn’t know it would be called Ruby." -- Kent Beck

Principle: Conciseness

"Writing code in Ruby should involve the minimum amount of commands necessary. Code should be terse but also understandable." ("Rubyisms in Rails" book, page 5)

Example, from "Rubyisms in Rails" book, page 5:

@highlight_title = true if (posting_time < 30.minutes.ago)

Example from Pickaxe book, page 259:

@text.value = @text.value.split.collect {|word| to_pig_latin(word)}.join(" ")

(splits the existing value in the text box (a string) into an array of words, translates each word in the array into pig latin, and then turns the whole array back into a string)

Here's a minor variation:

irb -> 'this sentence has words'.split.collect {|word| word.capitalize}.join(' ')
    => "This Sentence Has Words"

Principle: Consistency

"Ruby coding should follow common conventions that make coding intuitive and unambiguous." ("Rubyisms in Rails" book, page 5)

Principle: Flexibility

"There is no one right way. You should be able to pick the best approach for your needs and be able to even modify the base classes if necessary." ("Rubyisms in Rails" book, page 5)

Principle: Principle of least surprise

Example, from "Rubyisms in Rails" book, page 6: puts "No Comments" unless @comments.any?

Another example (mine):

irb -> (1..100).include? 47
    => true

I didn't have to go consult the documentation to figure that one out (although I could have had I wanted to)... I just guessed that if I asked a Range object (which is what 1..100 is) if if included a FixNum object (47), it would work as expected. I was not disappointed. And that, I think is the principle of least surprise (?).


User groups -- "was written to help rubyists organize and makes it easier for organizers and potential members to find each other."

Development of the language

How to follow the development of the language? "ruby-dev summary index" -- in English!

How to influence the development of the language?

Who knows!

Actually, it looks like Ruby itself hosts their bug tracking (the official list??) on Rubyforge. So you can submit your own bugs that you found or enhancement requests (??) right there.


There is a site called RCRchive (

Welcome to the new RCRchive. This site is for Ruby change requests pertaining to the development of Ruby 1.9 and 2.0 only. [...] As a visitor here, you can browse RCRs and view their comment histories. Discussions are conducted on mailing lists, one for each RCR. To participate, you need to log in. If you don't have an account, you need to sign_up.

looks like it could be used for this, but it looks pretty under-used (abandoned even??). It looks somewhat official and has a voting/commenting mechanism.

However, I only see 9 pending and one accepted RCR??! And it says "RCRchive 2006" so it's a year out of date?!

Ruby  edit   (Category  edit) .

Personal tools