Talk:Ruby (programming language)
POV issues
Some of the text of this article seems non-NPOV. For example "clean syntax" and "obvious syntax" seem rather subjective. It doesn't bother me too much, but someone who is familar with the language (and not biased :-) ) might want to NPOV the text. --Frecklefoot 19:08 16 May 2003 (UTC)
- In fairness, and with considerable experience of using Ruby after unhappy experiences with many other programming languages, I can only concur with those representations. It is syntactically very clear and also extremely obvious to anyone with an understanding of OO concepts. --Sjc 13:12, 25 Nov 2004 (UTC)
Hello World!
- "Hello World" is already in the article, under "Blocks and iterators".
- I disagree about using "Hello World" in every programming language article because it is considered a standard example. It should especially be avoided for a high level language like Ruby in which it consists of a single, straight-forward expression. Any non-trivial example, say a program that (for example) constructs and uses a hash, involving the creation of a string object and printing it to the standard output, provides all information that can be found in a "Hello World" program, and much more.
The question is not whether it can be included in the article, but whether there are not better ways to use the same space. Note also the existence of the Hello world program page, which exists to cover this "standard example". --Fredrik | talk 11:57, 3 May 2005 (UTC)
- I'm confused. What change are you proposing? To remove the existing "Hello World" references in the article (under "Blocks...")? I'm all for it, since the code under that section doesn't run by itself anyways (blocks don't work out of the method calling context) and thus can be confusing. And if you want to change "Hello world" to "This is a block", I'd be happy too. Other than that, there aren't another other "Hello World"s in the article, so what exactly were you disagreeing with?
- There was a second "Hell World" example. See the article history. --Fredrik | talk 23:45, 13 May 2005 (UTC)
- Use the fibonacci numbers. --84.152.107.86 14:23, 20 December 2005 (UTC)
Old talk
Name
Exact copy of entry posted June 12, 2001 8:02 am by Stephen Gilbert.
Copied to change name from "Ruby language" to "Ruby programming language" to match other language names.
- For the record, I had little to do with this article, other then the editing. The original editing history was pruned. --Stephen Gilbert
Swift creation
So this guy created the language in one day? Cool. --AxelBoldt
- Of course not :) --Taw
Section removal proposal
That section dealing with mailing lists should be removed, I think. It is not encyclopedic, and most other languages do not have mailing lists as a section. Plus, what does it really inform the reader about? --Maru 05:19, 6 August 2005 (UTC)
- I was going to do it, but I checked whether this had already been debated before. Done. --Chealer 02:28, 29 September 2005 (UTC)
Compiling
I'm not sure that Ruby has ever been compiled yet. AFAIK JRuby is a port of the interpreter to java byte code, but does not compile the underlying ruby? --User:TomCounsell
- Correct. But even as an interpreted language it is blindingly fast. --Sjc 13:12, 25 Nov 2004 (UTC)
- So there's agreement that no Ruby compilers exist? I plan to remove the misleading claim: "It was originally designed as an interpreted language, though in its JRuby implementation it may be compiled." --Ds13 07:31, 19 Feb 2005 (UTC)
- Yes, I've done some checking and it should probably be removed. There are a number of projects working on compiler type entities for ruby, but none that are beyond beta yet. --TomCounsell
Implementations
Ruby has three main implementations: the official Ruby interpreter, which is the most widely used, JRuby, a Java-based implementation, and RPG Maker XP, a Windows XP program used to create role-playing games.
RPG Maker XP is not a Ruby implementation, although it includes one (RGSS). My understanding of the main Ruby implementation's license is that commercial products like RPG Maker can include the interpreter, provided that they include either the source code or a pointer to ruby-lang.org. Does anyone have this game, and if so, can you tell me whether RGSS is a new implementation? - Beinsane 05:44, 6 October 2005 (UTC)
- And to answer my own question...the RPG Maker website [1] has a copyright notice crediting Matsumoto for Ruby. The article will be edited. - Beinsane 05:47, 6 October 2005 (UTC)
- also the help-file of the program carries a link to ruby-lang.org on the first (root) page about RGSS in the About This Document section.
Criticisms and Possible surprises
An anonymous user has come and turned 'Possible surprises' into 'Criticisms and Possible surprises'. If you read the section as it is now, the new items in the list do not really correspond to the list description "some features differ from languages such as C or Perl:". Jogloran 22:25, 8 February 2006 (UTC)
Ruby suffers from unconventional and below-average release management. First, Ruby version numbers are used differently from most other projects. Version 1.8.2 is not compatible with version 1.8.4. With Ruby, point releases are roughly equivalent to major releases of other projects. And since there is only 3 digits in the version number, there are no bugfix releases such as 1.8.2.1--instead, users must rely on snapshots of the repository for which there is no guarantee of backward compatibility. Another example is the release of Ruby 1.8.3 which broke Ruby's most well-known and popular application: Ruby on Rails.
"Omission of parentheses around method arguments may lead to unexpected results." -- like what? First I've heard of it. The fact that get/set methods are indistinguishable from fields is a feature, not a bug. Metamatic 20:46, 8 May 2006 (UTC)
- I got some clarification from Matz. The issue is with methods that take multiple arguments, and that's what may be disallowed in the future. I've reworded accordingly. Also, I've never seen a book recommend omitting brackets for multi-argument methods, so I've tightened that wording too. Metamatic 20:49, 16 May 2006 (UTC)
- In an expression like "puts Array.new 5, nil" the receiver of nil is ambiguous. In future versions such an expression will cause a syntax error. With "Array.new 5, nil" the receiver is not ambiguous so parentheses are not necessary. --drbrain 11:54, 18 June 2006 (UTC)
Logo
I can't find an official Ruby logo at this point. What do you all think?
- I should think that the closest thing Ruby has is the cartoon foxes. But they're more mascots than a logo. :) Quamaretto 20:47, 23 February 2006 (UTC)
- Ruby doesn't have an official logo. --drbrain 10:09, 18 June 2006 (UTC)
Ruby Strongly typed?
Anybody cares to join in and explain: Template_talk:Type_system_cross_reference_list#Ruby_Strongly_typed.3F?
--Krischik T 07:29, 24 February 2006 (UTC)
- Ruby is strongly and dynamically typed, it does not have implicit type conversions like C, which is weakly typed. --drbrain 10:14, 18 June 2006 (UTC)
POV Issue
The article states:
- The phrase did not originate with Matz and, generally speaking, Ruby may more closely follow a paradigm best termed as "Matz's Least Surprise", though many programmers have found it to be close to their own mental model as well.
In other words, Ruby doesn't follow the principle of least surprise; it's just Matz's idea of least surprise. That sounds seriously like a jab at Matz and POLS. DavidDouthitt (Talk) 23:25, 2 March 2006 (UTC)
- Matz repeatedly said he designs Ruby in a way that makes him surprise least; for example, see [2] and [3] --Kusunose 05:44, 3 March 2006 (UTC)
Unicode and UTF8 issue
In the article there is the statement
Ruby currently lacks full support for Unicode, though it has partial support for UTF-8.
I wonder what this means for Ruby 1.8.4 (the current stable) and 1.9 (the current development release)? An example where a file in UTF8 is read, processed and written out again would be helpful. Hannes Hirzel, 3 June 2006
- Ruby 1.8's regular expression engine handles multibyte characters correctly depending on what you set $KCODE to. By default it is in ASCII mode. The string library generally treats characters as raw bytes and ignores character encodings (its been a while since I've looked, I seem to recall one or two methods that check for multibyte characters). Ruby 2.0 will contain more multibyte and unicode string features, but the exact nature of those features have not been decided. --drbrain 11:51, 18 June 2006 (UTC)
Bytecode or not
I have read on the bytecode page that Ruby does not use bytecode in the current implementation. Is is true? I believe it is no longer the case. Acaciz 18:04, 3 June 2006 (UTC)
- Ruby 1.8 walks an AST. --drbrain 10:17, 18 June 2006 (UTC)
POV issue with "surprises" section
The section "Gotchas and possible surprises" section is POV, starting with its section name. It would be more accurately titled "Possible surprises for C and Perl programmers", but then that's still POV and getting away from what an objective, non-tutorial encyclopedic article should be. I think removal of this section should be considered. It's certainly useful information (as are reviews and tutorials), but that doesn't mean it belongs in an encyclopedia. Anyone else agree? --Ds13 21:32, 15 June 2006 (UTC)
- The first four bullet points could be moved into the examples section. I believe the method parentheses problem refers to an expression like "puts Array.new 5, nil", where the method that should receive nil is ambiguous. "puts 5, nil" is never ambiguous. --drbrain 10:41, 18 June 2006 (UTC)
Citing The Computer Language Shootout Benchmarks
This article links to the The Computer Language Shootout Benchmarks, which is not a quality reference for Ruby's performance problems.
The Alioth benchmarks exercise features that are seldom used in real-world Ruby like heavy recursion or enforcing use of a pure-ruby random number generator in the fasta benchmark instead of the built-in random number generator, overly penalizing Ruby's performance. Also, some benchmarks do not contain properly optimized Ruby.
In some areas Ruby is slightly slower than Perl or Python, but in other areas it is faster. The Alioth benchmarks are overly pessimistic due to the artificial restrictions they impose.
I believe this citation should be removed until a proper reference can be found.