top | item 16003590

Ruby 2.5.0 Released

431 points| phereford | 8 years ago |ruby-lang.org

108 comments

order
[+] skywhopper|8 years ago|reply
When I discovered Ruby 12 years ago, it was an amazing moment. All the features I loved from my previous favorite languages Perl, Smalltalk, and Scheme in one place, but with a much more reasonable syntax, a far more robust standard library, a complete and dead-simple packaging system, and a practical and portable runtime. The fact that it still feels magical, fun, practical, and pragmatic all at the same time while progressing and improving step by step each release after all these years is a truly amazing feat, especially when you compare it to its peers.

So congratulation and thanks to Matz, and all the other Ruby contributors for creating and maintaining and growing and improving this amazing language that's still my favorite. 2.5 looks great, and I can't wait to see what's in store for the future.

[+] pka|8 years ago|reply
I started a new contracting gig a couple of months ago, in Ruby. I had used it briefly years before in another project, but it was so long ago that I had to learn it again basically from scratch.

Although I don't really think the language is anything special (i.e. it's a standard dynamic OO language), what really turns me off Ruby is this dogmatic, almost religious aspect of its community.

Take POODR - it's more or less the community bible. If it's not written in POODR - don't do it. If it is - do it that way or else. It's POODR's way or the highway.

According to more experienced Rubyists more than 80% of the Ruby community use Rails. Rails is so widely spread that its development even fundamentally affects Ruby's roadmap.

Now irregardless of what you think about POODR or OO or dynamic types or whatever, a homogenous echo chamber filled with people chanting the same things over and over again is not a good thing.

As a counter example, take Javascript. Yes, it has its warts; its equality table is a joke. Ruby is a better thought out and implemented language in almost every aspect (although I do like Javascript's minimalism better, but that's a matter of taste I guess.) However, Javascript's community is as diverse, vibrant and experiment-friendly as it gets - there are the OO diehards, but there's also React, fantasy-land, macros, monads. People are trying out new things constantly.

Now I know you have monads in Ruby too or flow-like gradual typing libraries or rewrites of Clojure's spec. But at least where I work (and I work with some very experienced Ruby people) those libraries and the ideas they embody would never ever be considered as serious alternatives for anything. POODR or else.

[+] nileshtrivedi|8 years ago|reply
Ruby may not be the cool thing in town it once was, but it remains my preferred language for prototyping ideas - purely because of its elegance and expressivity. It truly delivers on its fundamental goal of "developer happiness". A lot of ideas from Ruby have gone to other languages (CoffeeScript, Elixir) and many web frameworks are modelled after Rails.

Congrats and thanks to all the core devs! :-)

[+] abritinthebay|8 years ago|reply
See, expressive I totally get. Absolutely. But elegance? Don’t understand that one.

Ruby is a cluster of inelegant and over concise cludges in the name of expressivity. The fact that it was once most famous for one of the most inelegant hacks - monkey patching - as a core feature speaks to that.

So I totally understand that it’s quick, it’s expressive, and it’s easy to prototype in. Agreed. It’s lost a lot of it’s shine there now but it’s all still true.

But elegant? It’s concise, not elegant.

[+] WJW|8 years ago|reply
I started using Ruby only in April this year due to starting at a new job. Having used and/or dabbled in C, Java, Python and Haskell before (amongst others), I find it super interesting to see how Ruby manages to take some interesting parts from each and manages to integrate it into a very pleasant programming experience. Also the rspec testing library is nothing short of magic, none of the compiled languages have anything that even comes close IMO.

For the cases where you have a tight loop taking up 99% of the actual CPU time it is also relatively easy to hook in C or Rust or whatever. Also, sometimes you hit hardware performance limits regardless of the language you use. We have some streaming download servers written for 99% in Ruby using the libCurl bindings that and they easily manage to fill up the 5 Gbps pipe* per server that AWS gives us.

* You can get 20 Gbps for some instances, but only to other instances in the same group. The biggest to the 'outside' seems to be 5 Gbps.

[+] grover_hartmann|8 years ago|reply
While rspec is indeed nice, I don't get why most projects don't use minitest more. Minitest ships with the Ruby standard library and I much prefer the assert syntax over the rspec DSL.

Rails also uses minitest with fixtures by default, I migrated to it recently and I really like the simplicity.

[+] fred123|8 years ago|reply
I'd be very interested to know what you mean by "nothing short of magic". I've had a quick look at the rspec documentation and as a Python dev this looks very similar to what's in the Python standard library. Would that be considered magic as well or does rspec have some cool features that I have missed?
[+] 0x445442|8 years ago|reply
Not too familiar with Rspec but I know Groovy (a compiled language) has testing frameworks like Spock that I believe are based on Rspec.
[+] taf2|8 years ago|reply
Cool which libcurl bindings are you using?
[+] geraldbauer|8 years ago|reply
FYI: I've collected articles / blog posts about what's new in Ruby 2.5 over at the Ruby Advent Calendar [1]. The list so far includes:

- Standard Gems 2.5.0 - Default Gems, Bundled Gems // by Jan Lelis, Idiosyncratic Ruby

- 10 New Features in Ruby 2.5 // by Junichi Ito, Ruby programmer @ SonicGarden.jp

- 10 More New Features in Ruby 2.5 // by Tom Lord, Software Developer from London

- Performance Improvements in Ruby 2.5 // by Jesus Castello, Ruby Guides

- yield_self in Ruby 2.5 // by Michał Łomnicki

- Improved stacktrace display in Ruby 2.5 // by Michał Łomnicki

- Ruby 2.5 Series // by Amit Choudhary, Mohit Natoo et al @ BigBinary

[1]: https://planetruby.github.io/advent2017

[+] elliotlarson|8 years ago|reply
Oh, it looks like Bundler didn't make it into the standard library for the 2.5 release. The commit to bring it in was reverted just before the release, with very little explanation. I mean, it's not like `gem install bundler` is that hard to do, but I'd be curious to hear why.
[+] ksec|8 years ago|reply
Same thoughts here, I thought that was the important step to gemify everything in 2.6. Are they reverting course?
[+] artellectual|8 years ago|reply
Was waiting for this!! Super happy about this. I’ve come to expect this every year now at this time.

Ruby is still one of the most productive languages out there. I just love it. It gives me great joy that 10 years ago I chose Ruby to be the language for my future.

My wish this coming year is to be able to contribute more to the Ruby ecosystem.

Btw I’ve also built something using MRuby this year. The whole ecosystem is just great.

[+] eropple|8 years ago|reply
I've really wanted to find a good use for MRuby (probably to noodle around with game development, as an embedded language) but figuring out where to start is really hard. Any tips?
[+] taf2|8 years ago|reply
Anyone else noticing syntax ruby parser regressions?

e.g.

  class FooBar < Foo
    prepend_before_filter only: [:create, :destroy] { 
  request.env["hello.skip_timeout"] = true }
  end
was valid in ruby 2.4 but invalid now in 2.5
[+] iovrthoughtthis|8 years ago|reply
rescue on do blocks!!! Wooooo. Merry Christmas!

Ruby is a joy to use.

[+] Lockyy|8 years ago|reply
Can’t beat reversing the backtrace output for making Ruby even more enjoyable. Slogging up through a huge pile of calls was one of the few things that drove me mad.
[+] burlesona|8 years ago|reply
Best thing to ever happen to Sinatra and the many block-oriented frameworks. Been looking forward to this one all year :D
[+] raitom|8 years ago|reply
Every year it's the Christmas gift I wait the most!
[+] burlesona|8 years ago|reply
There's no such thing as a perfect language, but Ruby is a very nice one, and the community is just such fun. The tradition of major version releases on Christmas Day each year is one of my favorite things!

Cheers to Matz and all the Ruby contributors :)

[+] hit8run|8 years ago|reply
I absolutely love ruby and its community :) My software goals for next year: - Start a new platform built on Ruby/Rails. - Contribute to the ruby eco-system. - Enjoy it.
[+] drchiu|8 years ago|reply
Love Ruby. Back a few years ago before I learned to program properly, I found a lot of the syntax of various languages to be hard to understand. I was not trained as a computer science major, mind you. Nonetheless, the syntax of the Ruby language made things easy enough for me to digest. Heck, even ended up starting a Ruby based software company won’t employees — something I couldn’t have imagined doing even a decade ago.
[+] jph|8 years ago|reply
Test Driven Development (TDD) gets a huge improvement with the new coverage capabilities for methods and branches. Thanks Ruby team!
[+] ajmurmann|8 years ago|reply
I'm surprised by this comment. Having done TDD for many years now I've only ever felt the need for coverage tools on code that wasn't initially TDDed. If you do proper TDD your coverage is always pretty damn close to 100% and you are already well aware of where it isn't because you struggled TDDing in the first place.
[+] drish|8 years ago|reply
> Mutex is rewritten to be smaller and faster. [Feature #13517]

This is something I find to be using quite a lot, great to see this.

[+] taf2|8 years ago|reply
looks like we have some gem authors that need to update their stuff...

google-protobuf-3.5.0-universal-darwin requires ruby version < 2.5, >= 2.0, which is incompatible with the current version, ruby 2.5.0p0

[update]

looks like this is resolved by forcing bundler to compile instead of grabbing the precompiled versions.

[+] nazgob|8 years ago|reply
Many thanks to all who contributed!
[+] onetwotree|8 years ago|reply
Hey they finally fixed the issue with SecureRandom using OpenSSL instead of the OS CSPRNG implementation!

I worked for a company a few years ago that made security software, with Ruby as a primary language, and this caused no end of frustration...

[+] rajangdavis|8 years ago|reply
I had installed Ruby on a Windows 10 machine a few weeks back and had some issues setting up Ruby 2.4.*.

I forgot where the issue came from (I think it was some issue with bundler or ruby gems), but can I install 2.5 without breaking my set up?