#​623 — October 6, 2022

Read on the Web

Together with  Cloud66 logo

Ruby Weekly

📊  Towards Ruby 4 JIT — Essentially 'the state of the JIT union' with a look to Ruby's future from a member of the YJIT team at Shopify. Note that it’s just a slidedeck (for now) so lacks a little context, but the slides are quite illustrative and it's good to see the thinking here.

Takashi Kokubun

Pitchfork: New Ruby HTTP Server Optimized for Latency and Memory — A pre-forking HTTP server for Rack apps designed to minimize memory usage by focusing on Copy-on-Write performance. Don’t rip out Puma from your apps just yet, though, as it’s still considered experimental. There’s more about the creator’s motivation in this thread. Pitchfork is fresh, but not entirely new, though, as it began life as a fork of Unicorn so some of that lives on under the hood: “In short it’s basically Unicorn, but with a MUCH lower memory usage.”

Jean Boussier (Shopify)

Heroku Alternative - But On Any Cloud — The convenience of PaaS, but on any cloud & in any region, with persistent storage, custom traffic rules, zero downtime deployments, blue/green & canary releases, WAF, & more. Try it today for free, plus $100 in credits with the code: RubyWeekly!

Cloud 66 sponsor

Some Security Best Practices for Rails Apps — While Rails has a lot of good security-oriented defaults, there’s a lot more you can do to ensure you “sleep well at night”, as Paweł puts it, like forcing SSL, handling CORS, and using scopes to avoid data leaks.

Paweł Dąbrowski

How to Run Multiple Rails Apps with Puma-devPuma-dev is a zero-config dev server (for macOS and Linux) letting you use less artificial URLs in local development, such as http​://web.​test instead of http://​locahost:​3001, say. This is especially useful if you need to run multiple Rails apps locally.

Lewis Buckley (37signals)

QUICK BITS:

📖 Articles, Stories & Videos

'So You Moved Off Heroku, Where Did You Go?' — This Hacker News post spawned some great discussion. There are a few responses focused on Rails. Render, fly.io, Railway, and Google Cloud Run all fare well, but Heroku’s own new plans keep them in the game too.

Hacker News

Shopify's Engineering Story Behind 'Flex Comp' — Hearing about Shopify’s employee compensation plan sounds dull, but this post is really about how they approached building the employee facing app to manage it, the related privacy aspects, and their frontend vs backend approaches. It’s interesting to see how much structure a company like Shopify places around building its systems.

Eric Poirier (Shopify)

Migrating Postgres from Heroku: A Customer Study on Crunchy Bridge

Crunchy Data sponsor

Simple Presenter Pattern in Rails Without Gems — The Presenter Pattern can help keep models small and makes things more testable. (As an aside, we wondered what the image on this post was about and it relates to European carnivals like this.)

Paweł Urbanek

How to bundle install in Deployment Mode, using Bundler in Docker — While the fix is easy, this is the kind of thing that can burn hours/days of a developer’s time with trial and error. Oh, and this is not just a Rails issue.

HoneyRyderChuck

The Tao of Writing a Ruby Gem Specification — This is, indeed, a “whirlwind tour” of the gem spec, including how it shapes how the gem is represented on rubygems.​org. Stow this away as a reference.

Piotr Murach

Time Extensions Are Unsung Heroes of Active Support — Is the end of the quarter on Tuesday, a week from now, a Sunday? There’s a method for that. Maybe there’s potential for bringing some of this into Ruby proper?

Andy Croll

The Hundred-Year Programming Language — How could a programming language live for 100 years? Is it all down to performance or expressiveness? Or a community that comes together and stays together by evolving the language? Noah, well known for his Ruby benchmarks, thinks it over.

Noah Gibbs

🛠 Code & Tools

A Ruby 'Quine Relay' That Generates 128 Programs in a Loop — We linked this years ago but it remains a fantastic bit of work and has seen some fresh interest this week. It’s a Ruby program that generates a Rust program that generates a Scala program.. rinse and repeat through 128 different languages.

Yusuke Endoh

If this sort of thing tickles you, Yusuke has a slidedeck (or ▶️ a conference talk) showing off more 'esoteric, obfusctated Ruby programming.'

Active Storage Validations 1.0: Simple Validations for Active Storage — Imagine having a validation that could validate a photos attribute that has an attached PNG or JPEG file within a certain file size range and certain pixel dimensions..

Igor Kasyanchuk

Observability for Your Ruby Test Suites — Get instant, real-time visibility into the performance of your Minitest and RSpec tests with Buildkite Test Analytics.

Buildkite sponsor

Ruby SMTP Mock 1.2.2: Mimic SMTP Server Behavior in a Test Environment — Framework agnostic and provides a lot of settings for testing your app’s interactions against an SMTP email server including error states.

Vladislav Trotsenko

Fusuma 2.5: Multitouch Gesture Recognizer for Linux — You define gestures and actions in YAML and it hooks into libinput to add custom gesture support on Linux. An unusual use case for Ruby.

Kohei Yamada

AssetRam: Memoize Your Rails Asset Links“Saves my Rails app 17–95% allocations per request,” says the author. See ‘Reasons to use memoization’ for more on this.

Robb Shecter

New Ruby API from a Google Ventures-Backed Notifications Infrastructure Service

Courier.com sponsor

Jobs

Ruby on Rails Developer — We're looking for a dev to help us build a collaborative video planning and AI-powered editing app. Compensation is 5.5-7k USD/mo.
Synura

Ruby on Rails Backend Developer (Remote) — Join our friendly product team as a Backend Developer (remote) and help us build UK's No.1 Cashback & Rewards platform.
VeryCreatives

Find Ruby Jobs Through Hired — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers.
Hired