ruby
ruby
ruby
How to create a simple parallelized web scraper using Ruby and Async
Build a parallel web scraper in Ruby with the async and async-http gems: fetch many URLs concurrently using Async tasks, a Barrier to wait for results, and a Semaphore capping requests at eight at a time, all in one short script.
ruby
Painting 'Lady with a weasel' using genetic algorithms and Ractor parallelism in Ruby
Genetic algorithms meet Ruby Ractors: a script that repaints Lady with a Weasel generation by generation. Follow the full lifecycle (mutation, fitness scoring, crossover), see how Ractor parallelism speeds up scoring specimens, and view the final result.
Latest
Rails optimistic locking, pessimistic locking and how to solve StaleObjectError
Rails locking strategies for concurrent updates: optimistic locking with a lock_version column that works out of the box, pessimistic locking with lock! and with_lock, and practical ways to rescue and resolve the StaleObjectError that optimistic locking raises.