why's (poignant) guide to ruby

What Is It? — About Ruby

by _why the lucky stiff  ·  CC BY-SA 2.5
Original DomainRuby ProgrammingClassic 2003–2009
The foxes asking: what is Ruby?

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. Yukihiro “Matz” Matsumoto created Ruby in Japan in 1993. He designed it with one explicit goal: programmer happiness.

“I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of the Ruby language.” — Matz

_why’s Description

“My conscience won’t let me call Ruby a computer language. That would imply that the language works primarily on the computer’s terms. But what do you call the language when your brain begins to think in that language? It is ours, we speak it natively!”

Ruby Basics

# Everything is an object
42.class           # => Integer
"hello".class      # => String
nil.class          # => NilClass
true.class         # => TrueClass
[].class           # => Array
{}.class           # => Hash
:symbol.class      # => Symbol

# Methods are messages sent to objects
42.to_s            # => "42"
"hello".reverse    # => "olleh"
[1,2,3].length     # => 3
nil.nil?           # => true

Where Ruby Is Used

Ruby powers Ruby on Rails, the web framework that built GitHub, Shopify, and Basecamp. It is a popular language for scripting, automation, API development, and developer tooling. Despite competition from Python and Node.js, Ruby maintains an active community and strong presence in web development.

The official documentation is at ruby-lang.org. Begin with the Poignant Guide.

Why's (Poignant) Guide to Ruby is released under the Creative Commons Attribution-ShareAlike 2.5 license. Written by _why the lucky stiff, originally published 2003–2009. Preserved at its original domain. Images © _why the lucky stiff, CC BY-SA 2.5.

→ AI Detector Benchmark & Research Hub