24 Apr '13, 5am

Кто хочет программировать на Руби как на Ерланге, велком в Рубиниус:

Rubinius supports the same basic concurrency constructs as Ruby, Threads and Fibers, along with a new API: Actors. Actors provide concurrency without any mutexes or locking inherent when sharing state between Threads. Actors execute concurrently but don’t share state; instead they pass messages to other actors. Here we create two actors using Actor.spawn , ping and pong, who will send messages back and forth until they have collaboratively incremented a variable to 1000: require 'actor' pong = nil ping = Actor.spawn do loop do count = Actor.receive break puts(count) if count > 1000 pong << (count + 1) end end pong = Actor.spawn do loop do count = Actor.receive break puts(count) if count > 1000 ping << (count + 1) end end ping << 1 sleep 1 Note that actors receive messages by using Actor.receive . This will block the actor until a message arrives in its own mailbox. You can...

Full article: http://rubini.us/doc/en/systems/concurrency/

Tweets

Ruby 2.0 has been released and @rubinius has st...

rubini.us 26 Apr '13, 3pm

The Rubinius team is now focused on pushing Rubinius into the hands of all developers. To that end, the current highlevel ...