Ruby 2.1.3 is released
ruby-lang.org
ruby-lang.org
Stock Ruby 2.1 was unusable on heroku because of this issue.
And yet -- I feel like Ruby is growing stagnant. Don't get me wrong: 2.x has brought lots of performance improvements, and some very smart people are constantly making it better, for which I'm eternally grateful. But I can't name a single 2.0-specific feature that I actually use. Refinements were the biggest thing I can think of, and in an informal survey of some other CTOs I know on Ruby stacks, nobody was directly using them.
Additionally, for a lot of the features I've come to love in other languages (e.g. pattern matching), my impression is that no one's talking about them in the Ruby community. Much of Ruby's success came from making it one of the most enjoyable languages to develop in, and that's unquestionably still there. But I stare wistfully across the sea to some of alternative choices, and I wonder how much longer that will be true.
For example, there are cases where you can replace options hashes with named parameters and get rid of guard clauses for key presence as well as lines that assign default values to keys in the options hash. And you don't have to index an options hash of course. The splat operator can be used to pass upstream options hashes to downstream methods taking named parameters so you can just refactor the downstream-most methods taking the options hash and get all these benefits.
What I long for from other languages (looking at you Python) is the vast array of library bindings.
I always seem to find what I need in this respect. What sort of stuff can you not find bindings for?
I am not sure that is true.
Many of the "old" languages that are still successful seem to have changed over time, while most of those that have stayed mostly unchanged seem to have lost mindshare (even if they had most things to begin with). It is probably a marketing problem.
Still, some increase in complexity may be acceptable: we have limited destructuring and case equality, pattern matching would be just a bit better. We have `Struct` which creates classes with positional arguments, but not a version that takes required parame even if it's a natural extension. We might have better composability for mixins etc..
And we can keep removing things (some more perlisms, for one).
One of the topics that's been discussed for a long time is breaking the standard library into gems (installed by default), so they can be developed and improved separately from the core language. That's probably the #2 priority for me.
One of Ruby's strengths (and sometimes one of its weaknesses, too) is that it has a fairly decentralized ecosystem. The standard library is small and has had few additions since Rubygems was added to the core distribution. Frankly, it could stand to have more taken out of it.
Ruby is already a pretty big language (in terms of core features and syntactic complexity); I think the core team is well-advised to exercise caution in adding new features.
My memory is hazy, but doesn't Erlang have unification rather than pattern matching? If so that seems quite harder to get than "plain" pattern matching (i.e. copying the Scala model with user defined extractors)
EDIT:
it seems it's plain pattern matching.
I don't think that's really true. Its true that the releases since 1.9 (which, despite the wonky versioning, was in a sense the last thing that was really a major version bump for Ruby, similar to Python 3.0 -- and dealing, in a different way, with many of the same issues, particularly string encoding) have been less "big feature" releases, there've been significant but less-disruptive new features (both structural language features like named parameters and core / standard library enhancements) since then.
Normally I wouldn't worry too much about this, except that I've heard that the Ruby C API changes substantially from release to release. Is this true? Anything in particular to watch out for?
The current rails (4.x) supports 1.9, but next year's rails (5.0) will require 2.x. So about the time that rails 5 comes out I would try to be ready to run 2.x in order to enjoy library compatibility.
According to the download page (http://rubyonrails.org/download/), the current Rails version requires Ruby 1.9.3 or newer.
Hopefully testing with Ruby 1.9.3 and the newest (Ruby 2.1.3) will give enough assurance that it works on all the versions in between.
The recent Ruby 2.2-preview1 announcement included a statement that the upcoming Rails 5.0 would require Ruby 2.2 (which should have a general release this Christmas), not just 2.x.
Why do you want to develop ruby (or anything else) with windows? Especially since most servers (where ruby is popular) are linux servers? All colleagues I've had running windows always seem to have to jump so many hoops that the *nix crows don't.
Also, no unix shell and package managers, how do you deal with it?
There's shells for windows very similar to (some of which are ports of) unix shells, and chocolatey exists.
It is only Ruby which is difficult to keep up to date on Windows. My question was to try and find a solution.
I have tried using a VM (VirtualBox and VMWare), but it is not a desirable work flow. I currently use RubyInstaller.
But it is still my preferred language for scripting and automation on Windows.
Is the issue of using ssh/CLI the issue? If you plan to use Ruby professionally, you're gonna need those skills.
Additionally, some things like Redis, common to many Ruby apps, just won't run on Windows.
My question was more of a concern for the future of my current dev setup. I was hoping someone on HN would know of a better solution to install Ruby on Windows manually, without having to wait on RubyInstaller.
I will check out Vagrant as you suggested.
Yes, you can build from source.
OTOH, unless you want to develop windows-specific Ruby software (or work specifically on improving Ruby-on-windows), you are probably better off using a VM -- vagrant is your friend.
(if possible, it's usually ~24 hours until the windows packages come in)
This upgrade will be very useful if you use threads or deploy your rails server in threaded mode like in Puma.
Basically, most people looking to setup a WordPress install can't deal with even the simplest CLI. So things like Heroku or a one-click Digital Ocean box are out.
This could be a good idea for a startup...