Ruby 1.9.0 Released 199
sciurus0 writes "The 1.9.0 development version of the Ruby programming language has been released. This version has many changes, including a new virtual machine that provides great speed improvements."
"I am, therefore I am." -- Akira
Benchmarks mean nothing, specially these ones. (Score:2, Insightful)
Re:Why Ruby? (Score:4, Insightful)
Speaking as a ruby developer, if you're happy with python - not really! Python's also great. It's just a matter of which suits your style. Personally, I couldn't get over Python's syntactically significant whitespace - many people would laugh at that, but for me it's just unthinkable. So Python was just ruled out for me totally because of that.
Python and Ruby are both competing to be the most beautiful next-gen languages
Re:Why Ruby? (Score:2, Insightful)
I think Ruby is really an evolution of Perl. There are a lot of Perlisms in its syntax, and I bet it'd be very easy for a Perl programmer looking for something new to learn Ruby. I resisted learning Perl in the first place and picked up Python instead; I have never regretted this decision, and I don't think I'll regret not learning Ruby either.
I'd like something else. (Score:3, Insightful)
Is parallelization the only niche that isn't supported well? No. There are other areas languages generally do badly in. There are very few languages which handle internationalization efficiently. There are very few languages which handle graphical interfaces efficiently or logically. Languages are typically either good at handling very complicated data structures OR handling structures that are defined just-in-time, typically not both.
My interest in Ruby would be greatly increased if I saw it do something that very few other languages could do, preferably no language that was in mainstream use.
Re:Scalability? (Score:5, Insightful)
I use it heavily as my general scripting language; where I would have used Perl for small utilities, file munging or what have you before, I now use Ruby. Not because Perl is bad - it isn't - but Ruby really is in many respects Perl done right, with many of the benefits and without the syntactic quirkiness. Scaling just isn't a factor for most uses of a script language.
Re:Scalability? (Score:2, Insightful)
Excuse me but http://www.ruby-lang.org/ [ruby-lang.org] runs on Radiant CMS [radiantcms.org], which is written in ruby, not on php.
Re:Scalability? (Score:3, Insightful)
Different style of programming (Score:3, Insightful)
If you look at it from a features and libraries perspective, then you really won't find much different. But you shouldn't look at it that way.
There's a significant programming style difference between the Python and Ruby communities. Python programmers, as a general rule, tend to be more inclined toward imperative programming, while Ruby has much more of the feel of a multi-paradigm language. To understand a lot of Ruby code out there, you need to wrap your head around concepts like functional programming, metaprogramming, and domain-specific languages. Ruby code tends favor higher-order functional combinators over primitive looping syntax (an influence from functional programming), extending the system base classes extensively (an influence from Smalltalk), and a lot of it has the flavor of trying to extend the language to look more like the problem space itself (domain-specific languages; look at something like rake [martinfowler.com], for example).
Python aims to be "clean" in a very contentious sense of "clean." To put it in a way that will be taken very partisanly: Python is the language that you get when "clean and easy to understand" is taken to mean "only promotes the concepts that are easy to understand to a mediocre imperative programmer." For example, Guido is on the record that higher-order functions like reduce are supposedly hard to understand [artima.com].
To be fair, yeah, Python is a reasonably clean imperative/OOP dynamic language, which is no mean feat, but many of us folks really would rather have a language that supports a broader range of programming paradigms. (Though I'm not as great of a fan of Ruby as I used to be before I got going on Scheme, I must say...)
Re:Why Ruby? (Score:4, Insightful)
Ouch. Try this one:
It scales easily (add "+ c.items()" to mix in another dict) and doesn't have any restriction's on the keys' datatypes.
Re:Why Ruby? (Score:3, Insightful)
You've got me there. Ruby could stand to clean up its act and be more consistent here. It still has quite an advantage, though.
As a Rubyist, I find the important question to be "is there a method to do this". In Ruby, if something can be made into an array, you use the to_a method. In Python, you won't be using a method. Ruby's Kernel.Array is an interesting bit of syntactic sugar (granted, Ruby has a bit much of that), but it isn't particularly relevant here.
The question, however, is why? Why do you need to learn more syntax to enter multiline strings?
I've focused on my pet peeves: arbitrary syntax and broken paradigms. These things require a programmer to work harder. A language shouldn't do that. I believe that the power of open classes is important too, but I can't write everything.