---
title: "How memoization can bend Ruby out of shape"
publication: "Ruby Weekly"
issue: 675
published_at: "2023-10-26"
canonical_url: "https://rubyweekly.com/issues/675"
---

Plus all the Rails World talks, and a cross platform Ruby snake game. |        

#​675 — October 26, 2023 

[Read on the Web](https://rubyweekly.com/issues/675)  

Together with [![FastRuby.io\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_467,h_106/e_make_transparent/co_white,e_outline:14/y65nyff19ylf5udphsq4.png)](https://www.fastruby.io/roadmap?utm_source=cooperpress&utm_medium=ruby-weekly&utm_campaign=primary-october-2023&utm_term=roadmap-budget&utm_content=action-plan)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/pzwp1o4mefkljkpaszun.jpg)](https://railsatscale.com/2023-10-24-memoization-pattern-and-object-shapes/)  

[The Performance Impact of Memoization on Modern Ruby](https://railsatscale.com/2023-10-24-memoization-pattern-and-object-shapes/) — A fantastic introduction to the [‘object shapes’ optimization](https://poddarayush.com/posts/object-shapes-improve-ruby-code-performance/) introduced in Ruby 3.2, before looking at how a common memoization technique adversely affects it, as well as the ways both implementers and developers can begin to mitigate the issue. 

Jean Boussier   

▶[All the Talks from _Rails World 2023_](https://www.youtube.com/playlist?list=PLHFP2OPUpCeY9IX3Ht727dwu5ZJ2BBbZP) — _They’re heeeere._ Taking place three weeks ago, the [Rails World conference](https://rubyonrails.org/world) was a success, and they didn’t fail in the video department. This is a fantastic array of talks, whether it’s Eileen Uchitelle [looking at Rails’ magic](https://www.youtube.com/watch?v=nvuPisDQ1hI) (and why she loves working on it), the [always-entertaining 'tenderlove'](https://www.youtube.com/watch?v=GnqRMQ0iQTg&list=PLHFP2OPUpCeY9IX3Ht727dwu5ZJ2BBbZP&index=5&t=226s&pp=iAQB), Peter Zhu [going deep on Ruby garbage collection](https://www.youtube.com/watch?v=IcN7yFTS8jY), or the [Rails core team answering attendee questions.](https://www.youtube.com/watch?v=9GzYoUFIkwE) 

The Rails Foundation   [![\](https://copm.s3.amazonaws.com/440c60c1.png)](https://www.fastruby.io/roadmap?utm_source=cooperpress&utm_medium=ruby-weekly&utm_campaign=primary-october-2023&utm_term=roadmap-budget&utm_content=action-plan) 

[🚀 Need an Action Plan to Upgrade Your App to Rails 7.1 and Ruby 3.2?](https://www.fastruby.io/roadmap?utm_source=cooperpress&utm_medium=ruby-weekly&utm_campaign=primary-october-2023&utm_term=roadmap-budget&utm_content=action-plan) — Get a roadmap by [@FastRubyIO](https://twitter.com/FastRubyIO)! Discover the work and effort needed for your upgrade, assess budget, and see potential roadblocks. Your effortless upgrade journey begins here. Know how long it will take before you begin. 

FastRuby.io | Upgrade Services sponsor   

[Tanakai: A Web Scraping Framework for Ruby](https://github.com/glaucocustodio/tanakai) — [Kimurai](https://github.com/vifreefly/kimuraframework) was a scraping framework that seemingly hibernated a few years ago, but Tanakai is an up-to-date fork that supports Ruby 3+, [Cuprite](https://github.com/rubycdp/cuprite), and lets you work with headless browsers to scrape and interact with modern sites, even those rendered with JavaScript. 

Glauco Custódio   

[Effects of Pitchfork Reforking on Shopify’s Monolith](https://railsatscale.com/2023-10-23-pitchfork-impact-on-shopify-monolith/) — [A year ago](https://rubyweekly.com/issues/623), we featured Pitchfork, a new HTTP server from Shopify focusing on low latency and memory use. One way it accomplishes this is through [reforking](https://github.com/Shopify/pitchfork/blob/master/docs/REFORKING.md); this post shares metrics showing off how much Shopify has benefitted. 

Jean Boussier   

- 🕰 GitHub cofounder (and former Ruby blogger!) Chris Wanstrath [tweeted that it was 16 years ago](https://twitter.com/defunkt/status/1715128542391153068) that the GitHub app's repo was created.
- 📗 [_Ruby on Rails Background Jobs with Sidekiq_](https://pragprog.com/titles/dcsidekiq/ruby-on-rails-background-jobs-with-sidekiq/), written by David Bryant Copeland, and published by _Pragmatic Bookshelf_ is now complete.
- 🏆 A decade ago, RailsConf had an annual 'Ruby Hero Awards' ceremony celebrating folks doing hard work in the community – Olivier Lacan wrote about [ending it in 2017.](https://olivierlacan.com/posts/ruby-heroes-farewell/) _Rails World 2023_ has reintroduced a similar idea in the shape of the _Rails Luminary Award_ and [its first two recipients are Chris Oliver and Tobias Lütke.](https://rubyonrails.org/2023/10/23/celebrating-the-first-rails-luminaries)
- 👴🏻 A thirteen year old bug in Rails [has now been fixed.](https://github.com/rails/rails/pull/49636)  

📕 Articles & Tutorials  

[The Future of Full-Stack Rails: Turbo Morph Drive](https://evilmartians.com/chronicles/the-future-of-full-stack-rails-turbo-morph-drive) — The forthcoming Turbo 8 will include DOM “morphing,” a way to more elegantly take a DOM tree from one state to another, providing a smoother UX. This article (and [its sequel](https://evilmartians.com/chronicles/the-future-of-full-stack-rails-turbo-view-transitions)) implements morphing in a Rails 7.1/Turbo 7 app to give you a feel for the future. 

Vladimir Dementyev   

37signals' Jorge Manrubia has also written on this topic in [Exploring server-side diffing in Turbo](https://dev.37signals.com/exploring-server-side-diffing-in-turbo/), showing how doing the morphing on the _server_ was also considered, before deciding to go with client-side morphing instead.  

[Better Forms with Superform](https://fly.io/ruby-dispatch/better-rails-forms-with-superform/) — [Superform](https://github.com/rubymonolith/superform) is another customizable form helper for Rails, but this one is built on Phlex, so the forms should be easier to test. Superform offers a lot, including a better way to handle strong parameters that will prevent errors because you forgot to update the controller. 

Brad Gessler   

[Wasting Time and Budget Interviewing the Wrong Candidates?](https://link.testdouble.com/custom-recruitment) — Or worse—wrong hire for a critical role? It doesn’t have to be that way—placement services customized to what you need. 

Test Double sponsor   

[How to Skip All Callbacks for All Models in Rails](https://allaboutcoding.ghinda.com/how-to-skip-all-callbacks-for-all-models-in-rails) — Using ActiveRecord::Suppressor, conditional callbacks, or patch ApplicationRecord to skip Rails callbacks. 

Lucian Ghinda   

[Advanced Usages of Action Policy for Rails](https://blog.appsignal.com/2023/10/18/advanced-usages-of-action-policy-for-ruby-on-rails.html) — A follow-up to a post we linked two weeks ago, this dives deeper into caching, pre-checks, and more advanced techniques in the new access control framework. 

Aestimo Kirina (AppSignal)  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/u30gh3dbpdsyff5gmg0r.jpg)](https://github.com/opal/opal/releases/tag/v1.8.0)  

[Opal 1.8: The Ruby to JavaScript Compiler](https://github.com/opal/opal/releases/tag/v1.8.0) — The latest version of the popular Ruby to JavaScript transpiler now bridges Ruby hashes to JavaScript [Map objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), and introduces performance improvements across the board. [Project homepage.](https://opalrb.com/) 

Elia Schito, Adam Beynon, et al.   

[FruitJuice: Send Background Jobs From Ruby to Crystal](https://github.com/crimson-knight/fruit_juice) — [Mosquito](https://github.com/mosquito-cr/mosquito) is a Crystal-focused background job runner and FruitJuice can be used in Ruby apps to enqueue jobs on to it – handy if you want to write your background jobs in Crystal for whatever reason (CPU-heavy work, say). 

Seth T.   

💎 If you've not played with it, [Crystal](https://crystal-lang.org/) is worth a look. Stylistically, it's a heavily Ruby influenced language but statically type checked and compiled.  

[Fixed Price Monthly Code Maintenance for Rails Apps](https://reinteractive.com/services/code-care) — No time to do those small but critical updates and features? CodeCare will take care of necessary patches, bug fixes, upgrades and ongoing improvements for your app. 

reinteractive/CodeCare sponsor   

[RuboCop Minitest: Code Style Checking for Minitest Files](https://github.com/rubocop/rubocop-minitest) — A RuboCop extension focused on enforcing best practices and coding conventions, inspired by [the Minitest Style Guide.](https://minitest.rubystyle.guide/) 

RuboCop Team   

- 📄 [HexaPDF 0.34.0](https://hexapdf.gettalong.org/news/2023/hexapdf-0-34-0.html) – Powerful PDF creation and manipulation library. Now with support for PDF Layers (a.k.a. 'Optional Content').
- [Rouge 4.2](https://github.com/rouge-ruby/rouge) – Pure Ruby code highlighting library.
- [JRuby 9.4.4.0](https://www.jruby.org/2023/10/18/jruby-9-4-4-0.html) – The Ruby 3.1-compatible JVM-based Ruby implementation.
- [Active Admin 3.1](https://github.com/activeadmin/activeadmin) – Admin framework for Rails apps. Now supports Rails 7.1.
- [Kredis (Keyed Redis) 1.6](https://github.com/rails/kredis) – Higher-level data structures atop Redis.
- 🤖 [LangChain.rb 0.7](https://github.com/andreibondarev/langchainrb) – Abstractions to build LLM-backed Ruby apps.
- [DoubleEntry 2.0](https://github.com/envato/double_entry) – Double-entry accounting system library.
- [Rodauth 2.32](https://github.com/jeremyevans/rodauth) – The fantastic authentication framework.
- [reCAPTCHA 5.16](https://github.com/ambethia/recaptcha) – Ruby helpers for reCAPTCHA.
- [MockRedis 0.38](https://github.com/sds/mock_redis) – A fake Redis for your tests.    

Jobs  

[Find Ruby Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired   

[Senior Full Stack Engineer | Remote in USA/Canada | Full-Time](https://join.tjoy.io/fs-eng) — TravelJoy is the market network for leisure travel. Thousands of travel agents depend on our product every day. 
TravelJoy   

[Full-Stack Developer at XYRALITY (Hamburg/Germany)](https://xyrality.com/files/stellenanzeigen/StellenausschreibungRubyonRailsFullstackDeveloperengl.pdf) — Development of a new game as senior member of a new core team based in Hamburg – come join us. 
XYRALITY    

🐍 Scaffolding and Snakes 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/fg4w4zvtebmswkrwljmd.jpg)](https://github.com/AndyObtiva/glimmer_snake)  

Andy Maleh of the [Glimmer project](https://github.com/AndyObtiva/glimmer-dsl-libui) has unveiled [a variety of scaffolding options](https://andymaleh.blogspot.com/2023/10/glimmer-dsl-for-libui-scaffolding-snake.html) for building Glimmer-backed Ruby desktop apps. 

To show off the potential for this handiwork, he's scaffolded [Glimmer Snake](https://github.com/AndyObtiva/glimmer_snake), a Nokia-phone style 'snake game' that works seamlessly on macOS, Windows and Linux, all from a `gem install`. You can try it right now like so: 

```
gem install glimmer_snake
glimmer_snake
``` 

Nice work.         

Curated by [Peter Cooper](https://twitter.com/cooperx86) and [Glenn Goodrich](https://twitter.com/ruprict).
Published by [Cooperpress](https://cooperpress.com/). 

[Change your email](https://rubyweekly.com/edit_subscription/*|UID|*) or [Stop getting this newsletter.](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Other weekly newsletters we publish include [Postgres Weekly](https://postgresweekly.com/), [React Status](https://react.statuscode.com/), [Frontend Focus](https://frontendfoc.us/), and [JavaScript Weekly](https://javascriptweekly.com/).
