#​720 — September 19, 2024

Read on the Web

Together with  reinteractive

Ruby Weekly

DragonRuby: A Ruby-Based 2D Game Engine — Targeting Windows, Mac, Linux, WASM, iOS, Android and even consoles, DragonRuby is an interesting variant of Ruby coupled with a 2D game engine, meaning you can create striking games or demos with a language you already know. Apparently DHH hadn’t heard of it, so we wanted to feature it again, especially as it’s available for free for the next 36 hours (though it is commercial).

DragonRuby LLP

💡 Konnor Rogers' Rendering 2.5 Million Tiles in DragonRuby Without Dropping Frames shows off some of DragonRuby's power and the sort of code you could be writing for it.

Rails + AI: Turn Ideas into Apps. Book a Meeting — Stuck on AI integration in Rails? We're experts in leveraging OpenAI, Claude, AWS Bedrock, and more to create powerful Rails applications. Let's discuss your project goals, guide you through the process and deliver exceptional results.

reinteractive::Custom AI integrations with RoR sponsor

Ruby's Default Parser Switches from parse.y to Prism — A few months ago, Kevin Newton asked if CRuby could switch to the new Prism Ruby parser, but Matz said there was still work to be done. It remains to be seen if this change will ‘stick’ for Ruby 3.4 this December, but if you’re running on Ruby’s master branch, you’ll be using it for now.

The Ruby Core Team

The 'Gilded Rose' Refactoring Kata — As If It's 2024 — Victor never fails to engage in his writing, even when it’s pecking through a classic refactoring kata. Turning a mess of if logic like this into something easier on the eye is a common task, however, so it pays to practice it.

Victor Shepelev

IN BRIEF:

Ruby-SAML 'Pwned' by XML Signature Wrapping Attacks — Even if you’re not using SAML (commonly used in SSO systems), a lot of apps are, and this vulnerability is particularly nasty. “Ignore Postel. When it comes to processing cryptographic signatures, loosey-goosey isn’t “liberal”, it’s libertine.”

Ulysse Carion

Setting Up TOTP Two-Factor Authentication in a Rails App — Except for farming auth out to a third party service, using time-based one-time passwords (TOTPs) is probably the easiest way to add 2FA to your app.

Mikołaj Bogucki

Win a Ticket to Rocky Mountain Ruby in October — Rocky Mountain Ruby is back this year, and Honeybadger is a Sapphire sponsor! To celebrate, we're giving away a free conference ticket. Enter to win by 9/20 (that’s tomorrow!).

Honeybadger sponsor

Shrinking Big Postgres Tables with 'Copy-Swap-Drop' — If you’ve got a big unwieldy table with only a subset of its data in active use but you don’t want to partition the table or perform lots of DELETE operations, you could copy the rows you want to keep into a new table, rename the new table, and drop the original one.

Andrew Atkinson

RSpec Stubs the Object in Memory — Just because you applied a stub to an object doesn’t mean your underlying code will be using the same object, particularly if it’s loaded just-in-time from a database.

Kevin Murphy

📄 Rails 7.1's Partial Strict Locals and Their Gotchas Ayush Newatia (AppSignal)

📄 Rails Adds Ability to Ignore Counter Cache Columns While They're Backfilling Prasanth Chaduvula

📄 How We Upgrade Major Rails Versions Shane Tully (Aha!)

🛠 Code & Tools

Nextgen: Generate Your Next Rails App Interactively — An interactive and flexible alternative to rails new that includes opt-in support for modern frontend development with Vite. It also now supports Rails 8 (in its alpha form).

Matt Brictson

IOU: A Gem for Working with io_uringio_uring is a mechanism on Linux for handling asynchronous I/O.

Digital Fabric

Hands on Postgres 17: What’s New & Impacting Performance — Join our webinar to see how Postgres 17’s updates improve both database and application performance. Register today!

pganalyze sponsor