#564 — August 5, 2021 |
Ruby Weekly |
Sorbet Compiler: Stripe's Experimental, Ahead-of-Time Compiler for Ruby — Stripe has been experimenting with an AOT compiler for Sorbet for about a year, and is now open-sourcing it for all to see. It’s not ready for production (outside of Stripe) yet, but the concept is solid, and the potential is exciting. Sorbet |
A Sneak Peek at Ruby's New Debugger — Ruby 3.1 will ship with a new debugger (clearly inspired by both GDB and byebug) that has some great features like scripting debug commands within your code so you don’t, for example, have to dig through gems to set breakpoints. Stan Lo |
Try Scout’s New Error Monitoring Feature Add-On for Free — Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues in minutes. See for yourself why Scout is a Ruby developers’s best friend with a free 14-day trial, no credit card needed. Scout APM sponsor |
The 2022 Fukuoka Ruby Award Competition — Every year the government of Fukuoka (a prefecture of Japan) teams up with Matz (the creator of Ruby) to offer a 1 million yen prize to the developer(s) of an ‘interesting Ruby program’ developed in the past year. So if you like competitions and think you can impress Matz, enter by December 3rd. Fukuoka Ruby |
▶ Matz's Talk at a Crystal Conference — We’ve mentioned Crystal, a Ruby-inspired compiled and statically typed language, a few times recently, and even Ruby’s creator gave a talk to the Crystal community where he showed support for their endeavors and said he ‘encourages the search’ for better solutions. Yukihiro 'Matz' Matsumoto |
Ruby Support Added to Compiler Explorer — If you’re not familiar with Compiler Explorer it’s a really neat tool for compiling code and letting you walk through the output (I’ve spent many an hour analyzing GCC optimizations with it with simple C code - yes, I’m a nerd) and it now shows you the VM code for Ruby code of your choice. I’d struggle to explain why this is neat, so.. have a play. Matt Godbolt |
|
📕 Articles & Tutorials |
An Introduction to Pattern Matching in Ruby — Pattern matching is a new, experimental feature in Ruby 2.7 (certain features are stable in 3.0) inspired by Elixir. It seems foreign at first, but the utility soon becomes very apparent. Pulkit Goyal |
Running Rails on the Google Cloud Run Environment — Cloud Run is Google’s service for running containerized apps in a serverless fashion. Google Cloud |
▶ Information Foraging: Tricks Great Developers Use to Find Solutions — Professor Austin Henley explains the tactics veteran developers use to quickly find the best solutions. Stack Overflow Podcast sponsorpodcast |
Esoteric Ruby in MemoWise — Frequent Tip of the Week contributor Jemma Issroff pens another post on the internals of MemoWise (a memoization gem) including how to memoize frozen objects and other oddities. Jemma Issroff |
Using ActiveRecord's Jonathan Miles |
Deprecating Code in a Rails Application — Did you know Aaron Sumner |
Free eBook: Effective Indexing in Postgres pganalyze sponsor |
▶ Dynamic Select Fields in Rails with Hotwire — Want to dynamically update fields when a user changes a select box? Hotwire’s Turbo Stream actions to the rescue. Go Rails |
|
Understanding Ruby: |
🛠 Code & Tools |
Nokogiri 1.12.0 Released with New HTML5 Support — HTML5 support has been added (to the CRuby variant only) by merging Nokogumbo into Nokogiri, a still popular way to work with XML and HTML from Ruby. P.S. Did you know a 'nokogiri' is a type of Japanese saw? Hence the picture above. Sparkle Motion |
Six Command Line Tools for Productive Programmers — Some truly helpful items here. The FZF fuzzy file finder (written in Go) is particularly handy. Adam Gordon Bell |
MemoWise 1.1: The Modern Choice for Ruby Memoization — It’s fast, has good test coverage, full documentation, lets you reset or preset values, and more. Panorama Education |
Babosa: A Library for Creating Slugs — An extraction of code from FriendlyId for normalizing and sanitizing data for use as a simultaneously computer and human friendly identifier. Apparently babosa is Spanish for slug – it certainly sounds nicer. Norman Clarke |
Puma 5.4 Released: A Rack Web Server Built for Concurrency Puma Team |
SearchFlip 3.5.0: Full-Featured Elasticsearch Client with Chainable DSL — If you need Elasticsearch’s powerful brand of full text search in your Ruby apps, this is a worthy option. Benjamin Vetter |
|