Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 2.28 KB

what-even-is-ruby.md

File metadata and controls

20 lines (11 loc) · 2.28 KB

What even is Ruby?

Ruby is a programming language!

Ostensibly, programming languages exists so that humans can give instructions to computers. That's all well and good, but it doesn't answer the question as to why humans give instructions to computers.

All computer programming exists so that humans may interact, on some level, with other humans. Fundamentally, programming is about communication.

Programming languages are similar to human spoken languages. They have dialects, grammars, coloquialisms, idioms, and parts of speech. Each programming language falls into one or more categories. A few categories you might have heard of include imperative, object oriented, or functional. Ruby is different than other programming languages. It was written with human communication in mind, rather than computer optimization. Its creator wanted to create a programming language that was fun for programmers.

Ruby was first written in 1993 by Yukihiro "Matz" Matsumoto, pictured below. Many of the design concepts were taken from other programming languages like Perl and SmallTalk. Here's what Matz has to say about why he made Ruby:

"Ruby is for People. 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 Ruby language." - Matz

Matz with Puppet Matz in 2014

Ok, Ruby is a programming language.
So what is irb?

irb is an abbreviation that stands for interactive Ruby. It's a computer program that allows the user to enter Ruby code and get back the results of that code immediately. It's one of the two primary ways to use Ruby to interact with a computer. The other is to put Ruby code into a file and then ask the computer to read and execute the code in the file. We will do lots of both.

Interactive Ruby is a feature known in the larger world of programming as a read, evaluate, print loop or REPL. These kinds of programs are great for trying out new commands, practicing syntax, and evaluating solutions to small problems. In the next lesson, we will use irb to write and execute our first program!