News for hackers. Stuff that matters.
Re:New Features in Ruby 2.4 by windor on Thursday July 21, 2016 @06:39AM (#12135944)
Ruby is the first language I really like. The core concept of the language is small, just not easy to get, but the change on how to programming is significant. Sadly, Ruby is not the language for the multi-core world, and many advantages of using it is disappearing. Although Ruby is changing, 2.3, 2.4, maybe 3.0, but what's the difference?
Re:New Features in Ruby 2.4 by tinco on Thursday July 21, 2016 @11:35AM (#12137530)
First of all, Ruby has a very ambitious goal for version 3.0, which most likely involves some kind of thread parallelisation.

Second, I would not say Ruby is not a language for the multi-core world. There are tens of thousands Ruby production environments over the world that make excellent use of multi-core machines. They run Ruby on problems that are embarassingly parallel such as web applications using process managing application servers such as Phusion Passenger or Unicorn. This is the way many modern web application platforms parallelize, including Node.JS and Python.

Third lack of paralellization is not a language feature. Both JRuby and Rubininus support threads without a GIL. Projects like Celluloid and Concurrent-Ruby make use of this.

Re:New Features in Ruby 2.4 by windor on Thursday July 21, 2016 @12:16PM (#12137830)
1. Ruby will support parallelization, it’s just a matter of time.

2.Passenger and Unicorn are multi-process, which due to developers can make use of nearly nothing in Ruby, and that's why gems like https://github.com/grosser/parallel come out.

3. The language implementation detail matters a lot. Too many gems are not thread-safe. JRuby is an option, but not that good, as there're too many other options under JVM platform. Rubininus is awesome, I wish it comes out earlier.

Re:New Features in Ruby 2.4 by xutopia on Thursday July 21, 2016 @10:29AM (#12137070)
You should check out Elixir. It is heavily inspired by the Ruby language yet makes concurrency easier than many other languages.
Re:New Features in Ruby 2.4 by windor on Thursday July 21, 2016 @11:39AM (#12137561)
yeah, Elixir is a good option, indeed.
Re:New Features in Ruby 2.4 by dragonwriter on Friday July 22, 2016 @03:05PM (#12145907)
> Sadly, Ruby is not the language for the multi-core world

MRI isn't the implementation for the multi-core world, but MRI isn't the only Ruby implementation; on language features, JRuby, particularly, isn't particularly far behind (the current version runs Ruby 2.3 code; I wouldn't expect 2.4 support to be that far behind), and fully supports thread-based parallelism.

Re:New Features in Ruby 2.4 by RVuRnvbM2e on Thursday July 21, 2016 @08:50AM (#12136460)
Re:New Features in Ruby 2.4 by windor on Thursday July 21, 2016 @09:55AM (#12136812)
Yes, from the beginning, and there exists celluloid which try to implement actor model. The fact that concurrent-ruby cannot be truly parallelized just disappoints me. The same idea of Future,Promise applied to Ruby doesn't gain the benefit. At last, it's just a method of writing 'better' code, not getting better solution.
Re:New Features in Ruby 2.4 by Meegul on Thursday July 21, 2016 @08:58AM (#12136506)
Does this fix the issue that is the GIL?
Re:New Features in Ruby 2.4 by pizza234 on Thursday July 21, 2016 @07:00AM (#12136023)
> Ruby is not the language for the multi-core world, and many advantages of using it is disappearing

Not really; it depends on the audience. The Ruby audience is still mainly Rails development, whose paradigm is multi-process.

Re:New Features in Ruby 2.4 by windor on Thursday July 21, 2016 @08:09AM (#12136264)
Rails is an excellent framework, but it isn't a feature of Ruby. When some other frameworks are rising, Ruby can lose quickly.
Re:New Features in Ruby 2.4 by gabrielc on Friday July 22, 2016 @06:46PM (#12147321)
maybe you should try crystal.