Ruby (programming language): Difference between revisions

Content deleted Content added
m "Self"-link... not needed
Removed 6 redlinks via script.
 
(3 intermediate revisions by 3 users not shown)
Line 1:
{{Short description|General-purpose programming language}}
{{distinguish|Ruby on Rails}}
 
{{infobox programming language
| logo = Ruby logo.svg
Line 137 ⟶ 136:
== Features ==
 
* Thoroughly [[Object-oriented programming|object-oriented]] with [[Inheritance (object-oriented programming)|inheritance]], [[mixin]]s and [[metaclass]]es<ref name="stewart" />
* [[Dynamic typing]] and [[duck typing]]
* Everything is an [[Expression (programming)|expression]] (even [[Statement (programming)|statements]]) and everything is executed [[Imperative programming|imperatively]] (even [[Declaration (computer science)|declarations]])
Line 184 ⟶ 183:
 
=== Alternative implementations ===
 
{{Cleanup red links|section|date=April 2025}}
 
{{As of|2018}}, there are a number of alternative implementations of Ruby, including [[JRuby]], [[Rubinius]], and [[mruby]]. Each takes a different approach, with JRuby and Rubinius providing [[just-in-time compilation]] and mruby also providing [[ahead-of-time compilation]].
Line 191 ⟶ 190:
 
* [[JRuby]], a mixed [[Java (programming language)|Java]] and Ruby implementation that runs on the [[Java virtual machine]]. JRuby currently targets Ruby 3.1.x.
* [[TruffleRuby]], a Java implementation using the Truffle language implementation framework with [[GraalVM]]
* [[Rubinius]], a [[C++]] bytecode virtual machine that uses [[LLVM]] to compile to machine code at runtime. The bytecode compiler and most core classes are written in pure Ruby. Rubinius currently{{when|date=April 2025}} targets Ruby 2.3.1.
 
Line 198 ⟶ 197:
* [[MagLev (software)|MagLev]], a [[Smalltalk]] implementation that runs on [[GemTalk Systems]]' [[Gemstone (database)|GemStone/S]] VM
* [[mruby]], an implementation designed to be embedded into C code, in a similar vein to [[Lua (programming language)|Lua]]. It is currently being developed by [[Yukihiro Matsumoto]] and others
* [[RGSS]], or Ruby Game Scripting System, a [[Proprietary software|proprietary]] implementation that is used by the [[RPG Maker]] series of [[role-playing game creation software]] for game design and modification of the RPG Maker [[game engine]]
* [[julializer]], a [[transpiler]] (partial) from Ruby to [[Julia (programming language)|Julia]]. It can be used for a large speedup over e.g. Ruby or JRuby implementations (may only be useful for numerical code).<ref name="virtual-module"/>
* [[Topaz (Ruby)|Topaz]], a Ruby implementation written in [[Python (programming language)|Python]]
* [[Opal (Ruby)|Opal]], a web-based interpreter that compiles Ruby to [[JavaScript]]
 
Other now defunct Ruby implementations were:
Line 216 ⟶ 215:
Matsumoto originally developed Ruby on the [[BSD|4.3BSD]]-based [[Sony NEWS|Sony NEWS-OS]] 3.x, but later migrated his work to [[SunOS]] 4.x, and finally to [[Linux]].<ref name="Stodte"/><ref name="initial-development"/> By 1999, Ruby was known to work across many different [[operating system]]s. Modern Ruby versions and implementations are available on all major desktop, mobile and server-based operating systems. Ruby is also supported across a number of cloud hosting platforms like [[Jelastic]], [[Heroku]], [[Google Cloud Platform]] and others.
 
Tools such as [[Ruby Version Manager|RVM]] and [[RBEnv]], facilitate installation and partitioning of multiple ruby versions, and multiple 'gemsets' on one machine.
 
== Repositories and libraries ==
Line 240 ⟶ 239:
<ref name="Julia">{{cite web | url = https://docs.julialang.org/en/stable/ | title = Julia 1.0 Documentation: Introduction | access-date = 6 October 2018 | archive-date = 16 August 2018 | archive-url = https://web.archive.org/web/20180816025550/https://docs.julialang.org/en/stable/ | url-status = dead }}</ref>
<ref name="Burks">{{cite web | url = http://programming.nu/about | title = About Nu™ | last = Burks | first = Tim | work = Programming Nu™ | publisher = Neon Design Technology, Inc. | access-date = 2011-07-21 | archive-date = 2018-12-25 | archive-url = https://web.archive.org/web/20181225131630/http://programming.nu/about%0A%20 | url-status = live }}</ref>
<ref name="Ring and other languages">{{cite web | url = httphttps://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages | title = Ring and other languages | author = Ring Team | date = 3 December 2017 | work = ring-lang.net | publisher = [[ring-lang]] | access-date = 3 December 2017 | archive-date = 25 December 2018 | archive-url = https://web.archive.org/web/20181225175312/http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages | url-status = live }}</ref>
<ref name="rust">{{Cite web |url=https://doc.rust-lang.org/reference/influences.html |title=Influences - The Rust Reference |website=The Rust Reference |access-date=2023-04-18 |archive-date=2019-01-26 |archive-url=https://web.archive.org/web/20190126051127/https://doc.rust-lang.org/reference/influences.html |url-status=live }}</ref>
<ref name="lattner2014">{{cite web | url = http://nondot.org/sabre/ | title = Chris Lattner's Homepage | last = Lattner | first = Chris | date = 2014-06-03 | access-date = 2014-06-03 | publisher = Chris Lattner | quote = The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. | archive-date = 2018-12-25 | archive-url = https://web.archive.org/web/20181225175312/http://nondot.org/sabre/ | url-status = live }}</ref>