#658 — June 15, 2023 |
|
Ruby Weekly |
On Rewriting Ruby's Parser — The folks at Shopify have been working on a new parser for CRuby called YARP (Yet Another Ruby Parser). Gone is Bison and its parser generation approach (which doesn’t really suit a language like Ruby) and in comes a flexible, hand written recursive descent parser. This post goes into a lot of detail; the TLDR is YARP will be shipped as a library in Ruby 3.3 later this year. Kevin Newton (Shopify) |
Automatically Find Memory Leaks in Native Gems — ruby_memcheck uses Valgrind Memcheck under the hood to locate leaks in native code and has been used to find memory leaks in Nokogiri, gRPC, libxml2, and others. Peter Zhu |
Advanced Application Deployment Tool - Build. Deploy. Grow. — Deploy Rails applications hassle-free on any cloud and in any region with full database support, custom traffic rules, zero-downtime deployments, blue/green and canary releases, WAF, and more. Try it today for free, and get $100 in credits with the code: Cloud 66 sponsor |
▶ Ractor Reconsidered — Ruby core team member Koichi ‘ko1’ Sasada gave a 30-minute talk at RubyKaigi about Ruby 3.0’s Ractors, considered why they’re not used very much, and what’s being done to improve the situation. Koichi Sasada |
TruffleRuby 23.0 Released — A fast dynamically compiled JVM-based Ruby implementation that began as a project of the late Chris Seaton. It’s great to see a fresh release as part of a big development in Oracle’s GraalVM distribution. TruffleRuby gets faster, adopts Ruby 3.1.3 standards, uses less memory, and has been released under a new 'free' GFTC license. More in the changelog. Alina Yurenko |
|
📕 Tutorials, Articles, and Videos |
Deploying a Rails App with MRSK — MRSK is a tool DHH unveiled earlier this year as a fresh way to deploy web apps (with Rails as the focus, naturally) using containers and Traefik to reverse proxy incoming requests. Or “Capistrano for Containers”, as he refers to it. Greg Molnar |
Reducing Solidus Memory Usage with jemalloc — Solidus is a Rails-based ecommerce platform and an engineer used to working on Solidus deployments decided to see what alternative malloc implementation jemalloc could do. In short, reasonable improvement for ‘close to free.’ Nicholas Van Doorn |
Application Performance Monitoring Built for Developers, by Developers — With proactive alerting, real-time insights, and 24/7 support, Scout catches performance issues before customers do. Scout APM sponsor |
Making Sidekiq Retry Once Before Erroring — How you can silence/mute the initial Sidekiq error, but still report any errors after the first try. Mike Coutermarsh |
▶ Fortify Rails: Defending Your Rails Apps From Bad Actors — No, not Nicolas Cage (he’s fantastic, really), but botnets, folks who want to bring your app down, steal your data, etc. This is a 50 minute presentation of some high level ways to steer your app out of trouble, including some case studies. Ernesto Tagwerker |
A Fly + PlanetScale + Rails Example Dockerfile — It literally is just a Dockerfile but if this is a stack you’re using or that you want to try, other people’s results can be a real timesaver.. Mike Coutermarsh |
▶ 7 Ruby Feature Flag Products Compared — Also in text form.
|
Practical Stimulus: How to Toggle CSS Classes
|
How Module Autoloading Works in Ruby and Rails
|
🛠 Code & Tools |
AnnotateRb: Add Annotations to Rails Models and Route Files — If this sounds familiar, it’s a fork of AnnotateModels focused on making some big changes (around refactoring and best practices) under the hood, plus bug fixes, that felt too substantial to dump upon the original. Andrew W. Lee |
FactoryTrace 1.1: A Tool to Maintain FactoryBot Factories and Traits — If you’re a FactoryBot user, FactoryTrace can detect unused factories and traits for you to clean up. Evgeniy Demin |
Fixed Price Monthly Code Maintenance for Rails Apps — No time to do those small but critical updates? CodeCare will take care of necessary tweaks, bug fixes, upgrades and ongoing improvements for your app. reinteractive / CodeCare sponsor |
Chaskiq 2.0: A Rails + React Powered Conversational Marketing Platform — Imagine an open source, self hostable version of Drift or Intercom, say. An interesting example of a large scale, open source Rails 7 + Ruby 3.2 app. If you’re more interested as a potential user, a big recent development is the addition of a ‘marketplace’ that lets you add plugins to your instance. ChaskiqHQ |
Rails Performance: Self-Hosted Performance Monitoring — If you don’t need something as complete as a cloud performance monitoring service, this gives you the core essentials in self-hosted form with real time request monitoring, slow request monitoring, response time metrics, etc. Igor Kasyanchuk |
|
|