Ruby (programming language): Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
No edit summary
imported>Pat Palmer
No edit summary
Line 1: Line 1:
{{subpages9}}
{{subpages9}}
'''Ruby''' is a general-purpose [[computer]] [[programming language]] created beginning in 1993 by [[Yukihiro Matsumoto]], a Japanese computer professional working in an open-source software company.  Ruby, named for the gemstone, was first released to the public in 1995, and it immediately began to be supported and adopted by many in the open-source community.  Its popularity increased even more since [[Ruby on Rails|Rails]], an open-source [[web application framework]] based on Ruby, was released on 2004.  According to the TIOBE Programming Community Index for October 2007, Ruby had risen to be tenth in usage among all programming languages, and its use is still growing<ref name="GermanLanguageInEncarta">
'''Ruby''' is a general-purpose [[computer]] [[programming language]] first released to the public in 1995 by [[Yukihiro Matsumoto]], a Japanese computer professional working in an open-source software company.  Ruby, named for the gemstone, was , and it immediately began to be supported and adopted by many in the open-source community.  Its popularity increased even more when [[Ruby on Rails|Rails]], an open-source [[web application framework]] based on Ruby, was released on 2004.  According to the TIOBE Programming Community Index for October 2007, Ruby had risen to be tenth in usage among all programming languages, and its use is still growing<ref name="GermanLanguageInEncarta">
{{cite web|
{{cite web|
url=http://www.tiobe.com/tpci.htm|
url=http://www.tiobe.com/tpci.htm|
Line 7: Line 7:
year=2007|
year=2007|
accessdate=2007-10-10}}
accessdate=2007-10-10}}
</ref>.
</ref>.


Ruby combines syntax inspired by [[Perl]] with [[Smalltalk programming language|Smalltalk]]-like object-oriented features, and also shares some features with [[Python programming language|Python]], [[Lisp programming language|Lisp]], [[Dylan programming language|Dylan]] and [[CLU programming language|CLU]]. Ruby is a single-pass, high-level [[interpreted language]]. It is focused on simplicity and productivity and has an easy to read and write [[syntax]]. Its main implementation is [[free software]].
Like most [[programming language|programming languages]] created since 1990, Ruby is fully [[object-oriented]] and requires a [[runtime environment]], or [[virtual machine]], in which to execute.  The Ruby runtime has been implemented for all major [[operating systems]] so that, like Java, Ruby can be used to create platform-independent programs. Ruby's popularity may be based on several other factors as well, such as its relatively permissive syntax, its loose typing, its [[closure|closures]] feature, a set of extensive libraries for networking and web services, and its support for making calls out to the native [[operating system]] when needful.  


As of March 2007, the latest stable version is 1.8.5. Ruby 1.9, which includes some major changes, is in development. Performance differences between the current Ruby implementation and other more entrenched programming languages has lead to the development of several virtual machines for Ruby. These include [[JRuby]], an attempt to port Ruby to the [[Java (programming language)|Java]] platform, and [[Rubinius]], an interpreter modeled after self-hosting [[Smalltalk]] virtual machines. The main developers have mainly focused on the virtual machine provided by the [[YARV]] project, which was merged into the Ruby source tree on December 31th, 2006, and will be released as a part of Ruby 2.0.
As of March 2007, the latest stable version is 1.8.5. Ruby 1.9, which includes some major changes, is in development.   Performance differences between the current Ruby implementation and other more entrenched programming languages has lead to the development of several virtual machines for Ruby. These include [[JRuby]], an attempt to port Ruby to the [[Java (programming language)|Java]] platform, and [[Rubinius]], an interpreter modeled after self-hosting [[Smalltalk]] virtual machines. The main developers have mainly focused on the virtual machine provided by the [[YARV]] project, which was merged into the Ruby source tree on December 31th, 2006, and will be released as a part of Ruby 2.0.


==Syntax==
==Syntax==
Line 22: Line 22:


  puts 'Hello, world!'
  puts 'Hello, world!'
====Analysis of the example====


Because Ruby is a high-level programming language, the [[Hello World]] program results in an extremely simple program, only having to include the <code>puts</code> expression followed by <code>Hello, world!</code> in quotation marks.
Because Ruby is a high-level programming language, the [[Hello World]] program results in an extremely simple program, only having to include the <code>puts</code> expression followed by <code>Hello, world!</code> in quotation marks.


==References==
==References==
<references />
<references />


[[Category:Computers Workgroup]]
[[Category:Computers Workgroup]]

Revision as of 19:12, 10 October 2007

Main Article
Talk Template:Default button 3
 
Template:Cell style

Ruby is a general-purpose computer programming language first released to the public in 1995 by Yukihiro Matsumoto, a Japanese computer professional working in an open-source software company. Ruby, named for the gemstone, was , and it immediately began to be supported and adopted by many in the open-source community. Its popularity increased even more when Rails, an open-source web application framework based on Ruby, was released on 2004. According to the TIOBE Programming Community Index for October 2007, Ruby had risen to be tenth in usage among all programming languages, and its use is still growing[1].

Like most programming languages created since 1990, Ruby is fully object-oriented and requires a runtime environment, or virtual machine, in which to execute. The Ruby runtime has been implemented for all major operating systems so that, like Java, Ruby can be used to create platform-independent programs. Ruby's popularity may be based on several other factors as well, such as its relatively permissive syntax, its loose typing, its closures feature, a set of extensive libraries for networking and web services, and its support for making calls out to the native operating system when needful.

As of March 2007, the latest stable version is 1.8.5. Ruby 1.9, which includes some major changes, is in development. Performance differences between the current Ruby implementation and other more entrenched programming languages has lead to the development of several virtual machines for Ruby. These include JRuby, an attempt to port Ruby to the Java platform, and Rubinius, an interpreter modeled after self-hosting Smalltalk virtual machines. The main developers have mainly focused on the virtual machine provided by the YARV project, which was merged into the Ruby source tree on December 31th, 2006, and will be released as a part of Ruby 2.0.

Syntax

Hello World

puts "Hello, world!"

or

puts 'Hello, world!'

Because Ruby is a high-level programming language, the Hello World program results in an extremely simple program, only having to include the puts expression followed by Hello, world! in quotation marks.

References

  1. "TIOBE Programming Community Index". TIOBE Software (2007). Retrieved on 2007-10-10.