Ruby
What is Ruby, and why is it popular?
Who created Ruby and when?
What is mruby, and why was it developed?
What is the difference between Ruby and Python?
Ruby, general-purpose and fully object-oriented computer programming language known for its programmer-friendly design and supportive community. Ruby grew in popularity between 2005 and 2009, largely because of the release of the derivative web framework Ruby on Rails, and it later assumed a role as a moderately popular language primarily employed for web development.
History
Ruby’s origin is generally dated to February 24, 1993, when Japanese programmer Matsumoto (Matz) Yukihiro and his colleague Ishitsuka Keiju began discussing potential names for the language they would develop. Inspired by the existing programming language Perl, they wanted to name the project after a jewel. Matsumoto suggested “Ruby” and Ishitsuka “Coral.” Matsumoto’s choice prevailed because it was shorter by one letter.
Matsumoto presented Ruby 0.95, the first version of the language, to various Japanese newsgroups on December 21, 1995. He followed it up with Ruby 1.0 a year later, on December 25, 1996, and also started a mailing list dedicated to the language. In June 1997 Matsumoto was hired by Japanese software company Network Applied Communication Laboratory (Netlab) to work on projects that used Ruby for development. The time spent in this role allowed Matsumoto to release a stable version, Ruby 1.2, on December 25, 1998.
Ruby gained popularity quickly. Matsumoto and Ishitsuka published the first book about coding in Ruby in Japanese—Obujekuto Shikō Sukuriputo Gengo Ruby (“The Object-Oriented Scripting Language Ruby”)—in October 1999. By the end of 2000 there were some 20 more books about the language on the Japanese market. Ruby became the subject of multiple conferences and was soon a more popular choice for coding among Japanese developers than the versatile language of Python.
Ruby also attracted international interest at this time. In 2001 American publisher Addison-Wesley released Dave Thomas, Chad Fowler, and Andy Hunt’s Programming Ruby, the first English-language book on the subject. It became informally known as “the pickaxe book,” a reference to the picture of a pickaxe on its front cover. As in Japan, Ruby swiftly spread through the international programming community. By 2002 the English-language Ruby mailing list Ruby-Talk received more traffic than the Japanese mailing list.
Design principles
Matsumoto believed that a computer language should prioritize its programmers’ happiness, which led him and his team to make Ruby “natural, not simple.” Ruby’s language is designed in such a way that many users label it under “the principle of least surprise,” an approach to minimize the surprises or frustrations a programmer might encounter while working within the language. This lends itself to Ruby’s nature as a high-level language, a computer language with an intuitive syntax that reads almost like a human language in its formulation and then translates it into binary machine language that a computer can read.
“Programmers often feel joy when they can concentrate on the creative side of programming, so Ruby is designed to make programmers happy.” —Matsumoto Yukihiro (2000)
- Object, in computer programming, is a self-contained unit that allows a user to utilize established classes of data with shared characteristics and change individual properties for custom definition. Since each object manages its own data and behavior and interacts with other objects through well-defined methods, programs can be built by combining many such units, making them easier to organize, modify, and extend.
- Just-in-time compilation is a way to convert program code into machine code as the program is executed. This can make programs run faster by optimizing a computer’s memory resources based on actual usage patterns.
- Garbage collection is a memory-management process in which the program automatically identifies and reclaims memory from objects that a program has stopped using. This frees the programmer from having to manually track and release unused memory.
Ruby’s focus on creativity is borne out by its extensive use of objects: Every element in Ruby is an object, even primitive data types such as numbers and strings. This allows for each element to be made more modular, allowing any bit of information or code to possess its own properties and behaviors. The result is flexible but easily organized code. Matsumoto added several features to this model, including just-in-time compilation and garbage collection, to make the language’s programming system more convenient and quick.
Derivatives and later versions
Ruby on Rails
In 2003 Danish college student David Heinemeier Hansson used Ruby to create Ruby on Rails, an open-source, server-side web application framework used to quickly set up databases, web services, and Web pages. Like Matsumoto, Hansson built Ruby on Rails with the programmer’s satisfaction in mind, guided by what he called “the principle of the bigger smile”—he included whichever features made him happiest.
Rails took the Ruby community by storm, gaining the attention of the multinational technology company Apple. In 2006 Apple announced its decision to include the framework in the next update to its computers’ operating system, macOS. Interest in Ruby consequently surged, such that by January 2007, the TIOBE Programming Community Index, an indicator of programming languages’ popularity over time as judged by search-engine results, listed Ruby as one of the world’s 10 most popular programming languages.
mruby
- Copy-on-write is an optimization technique where a system delays making a separate copy of data until it is actually changed. If multiple parts of a program need the same data, they initially share one copy. Only when one part modifies the data does the system create a new copy for that writer. This saves memory and work when most data is not modified.
- DTrace is short for dynamic tracing, a powerful performance-analysis and debugging framework built into some operating systems (such as Solaris and macOS). It lets developers and system administrators observe what a live system is doing in real time—tracking function calls, resource usage, and other internal behavior—without stopping the system.
- US-ASCII (United States American Standard Code for Information Interchange) is a character-encoding standard that maps 128 characters to numeric values between 0 and 127. It was one of the earliest encoding schemes for text in computers.
- UTF-8 (Unicode Transformation Format 8-bit) is a widely used character-encoding system that represents every character in the Unicode standard using one to four bytes of data. It can represent almost every written language.
On February 9, 2014, Matsumoto and his team released the first public version of mruby, a lightweight implementation of the Ruby language. Ruby’s main interpreters were too heavy for limited-resource software environments, such as Internet of Things devices. By offering modular design, reducing memory usage, and facilitating code-embedding within C and C++ programs, mruby extended Ruby’s use beyond desktops and servers to such varied applications as e-commerce, mobile phone apps, and video games.
Ruby 2.0
After several smaller updates, Ruby 2.0 came out on February 24, 2013, the language’s 20th anniversary. The new version ran faster, required less memory, and offered such features as keyword arguments, copy-on-write (COW) techniques, and DTrace (dynamic tracing) support. The language’s default character encoding for running scripts was also switched from US-ASCII to UTF-8.
Ruby 3.0
In November 2015 Matsumoto announced that development was beginning on Ruby 3.0, or “Ruby 3×3,” so named because his team intended to make the language’s next iteration three times as fast as the last version. The developers reached this ambitious goal five years later, releasing Ruby 3.0 on December 25, 2020. In addition to its greatly increased speed, the new version sported better concurrency, improved tooling for typing, and cleaner, more expressive syntax.
Decline
Ruby’s popularity declined after 2020, but its innovations were adopted by competitors: Modern web frameworks, for example, owe a number of their features to Ruby on Rails. However, a fair number of companies built their electronic businesses’ platforms with Ruby, and the language continues to enjoy the loyalty of a substantial and highly active programming community, keeping the language actively developed.

" height="20" alt="HEW Logo">
