Ruby 2.1.0 Released 65
Today marks the release of Ruby version 2.1.0. A brief list of changes since 2.0.0 has been posted, and file downloads are available. Here are some of the changes:
- Now the default values of keyword arguments can be omitted. Those 'required keyword arguments" need giving explicitly at the call time.
- Added suffixes for integer and float literals: 'r', 'i', and 'ri'.
- def-expr now returns the symbol of its name instead of nil.
- rb_profile_frames() added. Provides low-cost access to the current ruby stack for callstack profiling.
- introduced the generational GC a.k.a RGenGC (PDF).
Red title? (Score:3, Insightful)
Why does Ruby get its own color?
Re: (Score:1)
Only until you commented. Red title means that there's no comments. Green title means the flamewar has started.
Re: (Score:2)
It was a matter of inevitability. [wikipedia.org]
But..but.. (Score:2)
For a dying language Ruby is doing great (Score:5, Funny)
Re: (Score:2)
It was but a flesh wound!
Re:For a dying language Ruby is doing great (Score:4, Funny)
He says he's not dead.
Re: (Score:3)
Isn't there something you can do?
Re: (Score:2)
These things take their time.
ColdFusion is still around as well, even though Adobe is trying its hardest to kill it off for good.
Re: (Score:2, Offtopic)
For a dying language Ruby is doing great ..... What comedic timing: Is Ruby Dying [slashdot.org].
The key thing to understand is that Netcraft didn't confirm it.
I think this submission, Warcraft confirms it - Iranian sanctions are trying [slashdot.org], which turned into this story, Iranian Players Blocked From World of Warcraft Due To Trade Sanctions [slashdot.org], is still one of my favorites for playing with that meme.
Cheers
Re: (Score:1)
So you are going to be more detail-oriented now?
For the past while, you seem to have been more of a broad-strokes diety...
Too bad (Score:4, Insightful)
Re: (Score:1)
Wow, just yesterday it was dying, and today they release a new version! I guess they didn't get the memo
Unless this is one of those unbelievably rare events, it has nothing to do with memos. It's an orchestrated marketing technique, sometimes referred to as salting.
Ruby is a great language (Score:2)
I started programming Ruby a year or two ago. I was using jruby and watir-webdriver to automating firefox. I love the syntax of Ruby.
Re: Ruby is a great language (Score:4, Interesting)
And I accidently sent my comment away. The syntax is great, but I don't like the way Ruby hasn't crystallized yet. Every new version they somehow remove compatibility with the old versions, that's bad. My scripts stop working and I have to fix everything, this is not userfriendly.
Documation is scattered and incomplete. It's something that needs to fixed if they want to get to version 4
Re: (Score:1, Informative)
Are you sure you mean what you say? The last release to appreciably break compatibility was the jump from 1.8 to 1.9, when they replaced the interpreter with a JIT VM (this should have been called 2.0, IMO). That was back in 2007. Every release since then has preserved backwards compatibility.
If you actually meant Rails, well, then I understand that. At least they're improving.
Re: (Score:1)
Ha, I feel your pain.
This kills languages, Python took a hit with 3. Yes there is 2to3 and maybe other tools but Ruby may suffer the same fate if they keep mucking with common libs and grammar.
Re: (Score:2)
In fact, you make it sound like the mere existence of Python 3.0 killed it. I wasn't aware it was dead.
Re: Ruby is a great language (Score:4, Informative)
"My scripts stop working and I have to fix everything, this is not userfriendly."
That's not a problem with Ruby, it's a problem with jruby.
"Documation is scattered and incomplete. It's something that needs to fixed if they want to get to version 4"
No, it isn't. [ruby-lang.org]
And if you want more documentation get your hands on the book "Programming Ruby" (often incorrectly called "the pickaxe book"), like everybody else does. It is frequently updated for the latest ruby versions. Since it's from Pragmatic Programmers, purchase once and get the (pdf) updates whenever they come out.
Re: (Score:2)
I can't speak to upgrading; I've been using ruby 1.9 the entire time. But, you are wrong, IMO, about documentation. First things I looked up in a modern scripting language, the data structures, and os interactions, were awesome. Take a look at these, and then, you can even click on them to see their c header!
http://www.ruby-doc.org/core-2.1.0/String.html [ruby-doc.org]
http://www.ruby-doc.org/core-2.1.0/Hash.html [ruby-doc.org]
http://www.ruby-doc.org/core-2.1.0/Array.html [ruby-doc.org]
http://www.ruby-doc.org/core-2.1.0/Dir.html [ruby-doc.org]
http://www.ruby-doc.org [ruby-doc.org]
Re: (Score:2)
Also, for my linux admin work, this ssh gem (http://net-ssh.rubyforge.org/) is awesome.
Re:But ruby is not WEBSCALE! (Score:1)
Everyone knows only node.js is webscale [youtube.com].
Re: (Score:1)
I can appreciate your love for the Ruby language, but out of curiosity, why do you hate English?
Re: (Score:1)
Ruby adds nothing to the existing languages, which already have the plus of having zillions of libraries and modules developed. Wasted effort.
Screw it, you're right. Why people don't just code in C I don't know? I mean, you can do anything in that language. You can even simulate "classes", make use of those so-called "design patterns". Even Ruby's meta-programming model could be done with a bit of hackery with pointers. Who gives a toss over how readable a language is, or whether the language is optimised for "programmer joy"? What nonsense. I'm with you bro, if people can't learn to code in a real language they should just get off the bus.
Re: (Score:1)
I sense something here... is it possibly sarcasm?
About metaprogramming...
https://www.destroyallsoftware.com/talks/wat [destroyallsoftware.com]
Re: (Score:2)
Re: (Score:1)
You are more likely to "shoot yourself in the foot" so to speak and code can get unmanageable.
In short given too much flexibility you can make the language so different than the norm. 10 people with 10 different styles writing Ruby code on a 2+ year project...come back after a 6 month break take a look and you got a big mess on your hands :) Style guides help there but still.
Bottom line and not just ruby avoid getting "cute" with the language. I got berated by a college prof. because I thought it was a go
Re: (Score:1)
Meta-programming done poorly can drive your co-workers to drink, especially if you've taken to using some clever-clever idiomatic re-use of common methods or operators that's not apparent to anyone outside your own head (possibly what your college prof. was taking issue with). Some legacy code that I've had to dea
Re: (Score:2)
FTFY
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
You mispelled LISP
Gold! Wish I had mod points to give you.
Re: (Score:2)
Re:Trendy no more? (Score:4)
Re: (Score:2)
Re: (Score:1)
Python is a great language aside from the whitespace.
But did you know you can add braces using the future module?
Next major release of Python will include braces, so you can get ready by doing this in your code:
>>> from __future__ import braces
Re: (Score:1)
Python is a great language aside from the whitespace.
But did you know you can add braces using the future module?
Next major release of Python will include braces, so you can get ready by doing this in your code:
>>> from __future__ import braces
Neat. Did not know this. Thanks for the clue.
Re: (Score:3, Insightful)
Re: (Score:1)
I don't know enough about Ruby to say anything positive or negative about it. I was just commenting on Python because that's what I know - it's just funny to hear people moan and whine about similar things, which I've heard re. Python. And the quote "Ruby adds nothing to the existing languages" is harsh, C certainly got slapped around in its early days. Who needs to get slapped around more now and kicked off the bus (or at least charged for taking up two seats) is Java.
Re: (Score:3)
Re: (Score:1)
ooop I need glasses.
Re: (Score:2)
I have yet to discover a programming language that solves problems.
Re: (Score:3, Informative)
Obviously I prefer Ruby and to touch on the meta-programming aspect (whether good or evil), IMHO Ruby does a better job in this area. Mutable classes might give some people the heebie-jeebies, but it's saved my bacon several times. Ruby's Smal
Re:Trendy no more? (Score:5, Informative)
I've used both a fair bit. They are similar in many ways so it's mostly a matter of preference.
I've found Ruby makes it easy to explore objects and see what can be done with them. The consistent OO model makes it easy to perform concise data manipulation. Here's a quick example:
irb(main):001:0> arr = ["1", "2", "3", "4"]
=> ["1", "2", "3", "4"]
irb(main):002:0> arr.methods - Object.methods
=> [:to_a,
irb(main):003:0> arr.pop
=> "4"
irb(main):004:0> arr.join
=> "123"
irb(main):005:0> arr.map { |i| i.to_i }
=> [1, 2, 3]
irb(main):006:0> arr.map(&:to_i).reduce(&:+)
=> 6
Here's the same thing in Python:
In [1]: arr = ["1", "2", "3", "4"]
In [2]: dir(arr)
Out[2]:
[(stuff removed, fucking lameness filter) 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
In [3]: arr.pop()
Out[3]: '4'
OK, it's pretty sim
We all know it! (Score:1)
Ruby is dead!
Proof: was on /. yesterday!
Re: (Score:2)
* Don't forget to read the subject line that GoogOle' Boy AC here spent a whole lotta his 'lowance to get the neighbor boy to write, I reckon!