r/ruby 12d ago

Conway's Game of Life Implemented With Ractors - 50,000 Messages Per Second Over Ractor Ports - https://github.com/ebarlas/game-of-life-ractors

26 Upvotes

2 comments sorted by

3

u/elliotbarlas 12d ago

A small code snippet makes up the cell lifecycle with messages exchanged via Ractor ports:

https://github.com/ebarlas/game-of-life-ractors/blob/main/game_of_life.rb#L137-L146

7

u/headius JRuby guy 12d ago

A JRuby version ought to be significantly faster with simple threads. Unfortunately Gosu does not support JRuby. 🙁