Short Ruby News - Edition #47

Discover the world of Ruby in this comprehensive newsletter covering week 24 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

You can jump directly to a section:

More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters, books and slides)

💸 For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore while receiving an ad-free version of the newsletter!!

👐 Our Community

👐 Last week Stack Overflow survey results were out, creating some discussion in our community. Here is for example, two of the discussions about it:

👐 Ruby Conf announced the tickets are on sale for Rubyconf - get them at rubyconf.org

👐 Nick Schwaderer announced a new Hackathon for scarpe

👐 Wroclove.Rb announced a new speaker:

👐 Adrien Poly launched a new project called rubyvideo.dev to “aggregate all Ruby-related videos in one place with searching capabilities to facilitate discovery.” The project is open-source at adrienpoly/rubyvideo

👉 All about Code and Ruby

🪧 Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)

You can send the sponsorship packages info to your marketing, HR, or product management teams.

I'm happy to assist you with drafting an email. Send me a message at [email protected] I'll do my best to draft an email for you to send inside your organization.

👉Matt Swanson shared a screenshot from a discussion in Github about Strada where it seems that David Heinemeier Hansson announced that Strada will be launched at Rails World and presented by Jay Ohms:

👉 Joel Drapper shared a perspective about thinking about types in Ruby:

Noah Gibbs replied, but I invite you to read the entire conversation about checking and testing:

👉 Kuba Suder shared a piece of Ruby metaprogramming for defining a custom Sinatra logger:

👉 Aristóteles Coutinho shared a code sample showing pattern matching with types in an initializer:

👉 Nate Berkopec shared that Gusto did not see a performance improvement after upgrade to YJIT:

Jean Boussier shared that they see performance improvements at Shopify:

👉 Andrew Hodson shared a code sample showing Rails 7.1 Comparison Validator:

👉 Ruby Cademy shared a code sample showing the difference between not and !@

Drew Bragg replied with an explanation about how not works:

👉 David shared how to configure View Component to raise errors on deprecations in development and test environments, specifically on slot_name syntax:

👉Collin shared a code sample from Forgive Us Our Sends about join that does not need flatten called before:

👉Matt Swanson shared a code sample showing how they work with Form Builder in Rails in a discussion about how to make Form Builder more flexible:

Brad Gessler also shared about improving form builders:

👉 Marc Köhlbrugge shared a code sample showing how to add a validator to Rails and filter disposable emails:

👉 Marco Roth shared a browser console warning with did you mean message:

👉 Kevin Newton shared that YARP docs got better and invited people to contribute at ruby.github.io/yarp

👉 Jason Zimdars shared a video (click to see the video embedded in tweet) showing an exploration of using View Transitions API - Web APIs in Hey

👉 Andrew Hodson shared about the Object#presence added by ActiveSupport in Rails:

👉 I shared a quote from Sandi Metz about code design:

👉 Marc Köhlbrugge shared the list of gems they are using for Room AI 

Here is the shared list with Mark notes:

👉Ruby Cademy shared a code sample showing the difference between safe navigation operator and try:

👉 Nick Schwaderer shared a preview of a new Ruby desktop app:

👉 Mario Schüttel shared a code sample about building a Boolean Validator in Ruby on Rails:

🤞 I imagine that if you have read this so far, you find value in this newsletter.

🧰 Gems, Libraries, Tools and Updates

🧰 Peter Zhu announced that they open-sourced the Ruby builds they use at Shopify. Read more at Open Sourcing Shopify’s Ruby Builds and project is at Shopify/ruby-definitions

🧰 Rubymine published a new Early Access Preview 2023.2 EAP 4. This release has:

🧰 Peter Zhu submitted a PR to Ruby about Remove transient heap:

🧰 Truffle Ruby announced a new release of Truffle Ruby 23.0 and a new distribution called Oracle GraalVM under GraalVM Free Terms and Conditions (GFTC) license  that seems to be “free for development and production use”:

🧰 Mike Perham published a new update for Sidekiq version 7.1.2 Read the changelog

🧰 Kirill Platonov announced a new release of polaris_view_components that upgrades Polaris 10 to View Component 3 Read the release notes

🧰 Andrea Rocca shared a gem they were happy discovering called query_diet:

🧰 Konnor Rogers shared a gem they discovered called isorun: Run JavaScript applications in your Rails application. Here is the list of features:

Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody while receiving an ad-free version:

If you consider upgrading and want more information, please read Why to subscribe to paid

🤝 Related (but not Ruby-specific)

🤝 Jason Swett shared about testing:

🤝 Chris Wanstrath shared about how Github readme for an empty repo was created:

🤝 Alex Lion shared about moving out of PaaS to bare metal.

Before making this change I think it will be great if you read also this article 11 years of hosting a SaaS by Alex Ghiculescu.

More content: 📚 🗞 🎧 🎥 ✍🏾

📚 Books

📚 Jason Swett shared a small introduction for his new book about ChatGPT:

🗞 Newsletters

🗞 Sara Jackson published a new edition of This Week in Open Source (June 16, 2023) - “In the past week we saw updates to Art Vandelay, Administrate, Shoulda Matchers, and our dotfiles.”

🗞 Ruby Weekly published a new edition about Exciting developments in Ruby parsing

🗞 Allison Pike published a new edition of Once a Maintainer: Josh Branham - “contributor to the popular attr_encrypted gem and the person who made it compatible with Rails 7”

🗞Any Cable published a new edition of Any Cables Monthly #10

🗞 Zzak published a new edition of This Week in Rails - June 16, 2023 - “Tighter security with SSL enabled as a default in production, expanded PostgreSQL enum support, and more”

🗞 Ruby Radar published a new edition Father's Day 2023 Edition

🎧 Podcasts

🎧 Jason Swett published a new episode of The Code With Jason Podcast about 185 - Test Suite Performance with Vladimir Dementyev

📽️ 🎥 Videos

Talks

📽️ FastRuby published a video and the slides for the workshop Fortify Rails - Defending Your Ruby on Rails Applications from Bad Actors

📽️ Creston Jamison published a new episode of Rubber Duck Dev Show about Palantir & Testing in Dragon Ruby with Kevin Fischer

📽️ Nick Schwaderer published a video where Noah Gibbs does a Walkthrough of the Scarpe framework code

📽️ Samuel Williams shared they updated their YouTube playlist about Ruby Async Presentations

Screencasts

🎥  Dean De Hart published a series of videos:

🎥 GoRails published a new video about Adding a Highlight Button to Trix

🎥 Hanami Mastery published a new video about Send emails with hanami-mailer

🎥 Pete Hawkins published a small video on Twitter about using Modules

✍🏾 Articles

What’s new

Nate Berkopec published an article about How We Made Gusto Page Loads 40% Faster: “For businesses with 25 or more employees, pages load 1.4 times faster. After loading gusto.com for the first time, navigations in Gusto are 2 times faster. For smaller businesses, page loads are 1.2 times faster, and all navigations after the first are now 1.8 times faster. Gusto’s internal customer support tools are faster, too: 30% faster than a year ago”

Nicholas Van Doorn published an article about Reducing Solidus Memory Usage with jemalloc “This post aims to discover if improving performance is possible without changing any code or adding extra costs to our production infrastructure. We will test the jemalloc project on a production Solidus store to see if we can improve some memory usage issues without negatively impacting response time”

Kevin Menard published an article announcing that TruffleRuby in Shopify CI “I’m happy to say our internal CI system recently added support for TruffleRuby in both release and snapshot builds. We utilize ruby-build to handle the installation, enabling us to use TruffleRuby’s published snapshot builds instead of waiting for the interpreter to be compiled from source”

Alessandro Rodi published a new article about Rubyday 2023 - A great come back!

How-Tos

Hanami Mastery published an article about WIP: Unofficial guide for upgrading Hanami 1.x -> Hanami 2.x “This is an unofficial, community-maintained guide to help upgrading projects that are built on Hanami 1.x to Hanami 2.x”

Matt Brictson published an article about Applying a Rate Limit in Sidekiq “I discovered an easy way to implement job throttling using the ruby-limiter gem and the new “capsules” feature of Sidekiq 7”

Akshay Khot published a new article about Practical Stimulus: How to Toggle CSS Classes “This second article in the 'Stimulus in Practice' series shows how you can work with HTML classes using Stimulus. Specifically, we'll learn how to toggle classes on an element. This is useful when you want to show or hide certain elements or update the design in response to user interaction”

Benito Serna published a new article about A form with two buttons with formation and formmethod “Imagine that you are building a custom CMS. Within the form to edit an Article, you need to have two buttons: a normal “Save” button and a new “Save and publish” button. And maybe, additionally, you will need a third button to delete the article”

Greg Molnar published an article about Deploying a Rails app with MRSK In this tutorial, I will show you how to: deploy a Rails app to a VPS, run Caddy in front of the docker container to handle SSL, use a hosted database server, run Redis on the same droplet, run a worker to process background jobs”

Julian Rubisch published a new article about Setting Up Business Logic with DCI in Rails “we will introduce another alternative that more naturally fits the mental models we apply when reasoning about the behavior of our applications: DCI (Data, Context, Interaction) for Rails”

Maful published a new article about How I use Nano ID in Rails “Nano ID is a tiny, URL-friendly, and unique string ID generator. Nano ID is a library for generating random IDs that still have probability of duplicate IDs. However, this probability is extremely small and it is based on the rules you defined”

Deep Dives

Akshay Khot published an article about Blocks, Procs, and Lambdas: A Beginner's Guide to Closures and Anonymous Functions in Ruby “Closures and anonymous functions are very useful concepts, especially in functional programming. Ruby makes working with them a pleasure via its flavors like blocks, procs, and lambdas. This post provides an in-depth tutorial and shows the subtle differences between them”

Kevin Newton published an article about Rewriting the Ruby parser “As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into CRuby, and are very excited to share our work with the community. This post will take you through the motivations behind this work, the way it was developed, and the path forward”

Related

Richard Schneeman published an article about What is github.com/zombocom and why most of my Ruby libraries there? “The other day I got another question about the zombocom org on GitHub that prompted me to write this post. This org, github.com/zombocom, holds most all of my popular libraries). Why put them in a custom GitHub org, and why name it zombocom? Let’s find out.”

Jorge Manrubia published an article about Remote strugglesThe failed experiment wasn't remote work but rewiring your company from the ground up. That makes for a less clickable headline, though, and is probably a harder pill to swallow for the people running the show”

Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody:

If you consider upgrading and want more information, please read Why to subscribe to paid.

Reply

or to participate.