---
title: "Crystal in your Ruby"
publication: "Ruby Weekly"
issue: 698
published_at: "2024-04-11"
canonical_url: "https://rubyweekly.com/issues/698"
---

Plus typing talk, Ruby on Windows and WSL, and rewriting Ruby with other Ruby. |        

#​698 — April 11, 2024 

[Read on the Web](https://rubyweekly.com/issues/698)  

Together with [![reinteractive\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,w_900,h_186/e_make_transparent/co_white,e_outline:9/goq5p4n0bj1gcxvxkfel.png)](https://reinteractive.com/services-codecare-shield)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/mxi4uwbadvsixx6bnhor.jpg)](https://github.com/wouterken/crystalruby)  

[CrystalRuby: Embed Crystal Code Directly in Ruby](https://github.com/wouterken/crystalruby) — [Crystal](https://crystal-lang.org/) is a Ruby inspired programming language that boasts a lot of great features and is _well_ worth a try IMHO. One benefit is performance, and this gem lets you write Crystal code, _inlined in Ruby_, giving you a potential performance boost without a huge shift in syntax. New and YMMV! 

Wouter Coppieters   

🇯🇵 [Matz on Static vs Dynamic Typing](https://logmi.jp/tech/articles/330373) — **This article is in Japanese**, so get your browser’s translation feature ready. It’s a transcript of thoughts by Ruby’s creator (in a talk given in 2022) on the pros and cons of static and dynamic typing, and why Ruby hasn’t adopted type _declarations_ so far (complexity and potential bad feelings in the broader Ruby community). 

ログミーTech   [![\](https://copm.s3.amazonaws.com/0e7df463.png)](https://reinteractive.com/services-codecare-shield) 

[Inexpensive and Efficient: Get Your Ruby & Rails Upgrade Done](https://reinteractive.com/services-codecare-shield) — Don’t let the risk of out of date Ruby & Rails versions become a problem. Talk to us about our free security assessment & we can discuss how our incremental upgrade service - CodeCare Shield - can improve the speed, security & stability of your app. 

reinteractive/CodeCare® Shield sponsor   

[A Docs-First Approach to Rails API Development?](https://evilmartians.com/chronicles/let-there-be-docs-a-documentation-first-approach-to-rails-api-development) — Writing documentation for APIs is rarely an exciting job and often gets left till last, but what if you wrote it _first_? This article looks at how this can work in practice, and introduces [Skooma](https://github.com/skryukov/skooma), a new Ruby library for validating API implementations against OpenAPI documents. 

Svyatoslav Kryukov   

- 📈 On April 1, RoRvsWild tried to fool Rubyists by teasing [SuperFastRails](https://www.rorvswild.com/blog/2024/super-fast-rails), a gem to auto-optimize database queries. In reparation, they're back to suggest [_real_ ways to optimize and improve your app's queries](https://www.rorvswild.com/blog/2024/super-fast-rails-a-promise-given-is-a-debt).
- 📗 Last week we mentioned Josef Strzibny's new [Kamal Handbook](https://kamalmanual.com/handbook/) – it's great to hear about [his experiences in writing and selling it](https://nts.strzibny.name/how-i-wrote-kamal-handbook/) and that he's already sold over 360 copies (not because of us! 😅)
- 📕 In more book news, Bridgetown core team member Ayush Newatia has updated [The Rails and Hotwire Codex](https://railsandhotwirecodex.com/) to cover modern Rails features, including Turbo 8. It, too, is a paid book, but you can [📄 read the first few chapters free (PDF)](https://railsandhotwirecodex.com/assets/the_rails_and_hotwire_codex_preview_v1_1_0.pdf).
- 🎧 Ayush (above) also [▶️ just appeared on the Ruby on Rails Podcast](https://www.therubyonrailspodcast.com/513) to talk about modern Rails development and his book.  

📄 Articles, Tutorials & Videos 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/bvpa7dfzcbxeinewjqdg.jpg)](https://www.driftingruby.com/episodes/windows-and-wsl)  

▶[Setting up Ruby and Rails on Windows and WSL](https://www.driftingruby.com/episodes/windows-and-wsl) — If you’re considering ['doing a DHH'](https://world.hey.com/dhh/committing-to-windows-2d6388fd) and giving Windows a try for Ruby development, this quick look at setting up a fresh Windows 11 environment for Rails development could be very handy. 

David Kimura   

[Using Lambdas and Callables for Deferred Evaluation, Control Flow, and New Language Patterns](https://www.fullstackruby.dev/syntax-and-metaprogramming/2024/04/07/using-callables-for-deferred-evaluation/) — When might you write a block vs a “stabby lambda?” Procs and blocks and lambdas (oh my!) are fantastic and while Ruby has conventions and patterns to follow, there’s a lot you can do with the basics, as Jared shows here. 

Jared White   

[How Our Amazon ECS Autoscaler Works](https://judoscale.com/blog/how-our-ecs-autoscaling-works?ref=RubyWeekly) — Building an autoscaler for ECS was a bit more complex than a Heroku add-on, so here’s a taste of our secret sauce. 

Judoscale sponsor   

[Abstract Methods and `NotImplementedError`](https://nithinbekal.com/posts/abstract-methods-notimplementederror-ruby/) — Learn what the `NotImplementedError` exception is actually for and some other approaches for handling situations where abstract classes don’t provide methods meant to be implemented in their subclasses. 

Nithin Bekal   

[Creating a Flappy Bird Clone with Ruby](https://medium.com/@konstanty.koszewski_35161/flappy-bird-clone-in-ruby-961aaaca7443) — How has it been ten years since [Flappy Bird](https://en.wikipedia.org/wiki/Flappy_Bird) was the hit game of the moment? 

Konstanty Koszewski   

[How PlanetScale Makes Schema Changes](https://planetscale.com/blog/how-planetscale-makes-schema-changes) — Did you know Rails powers the popular MySQL platform’s main API? Here’s a look at how they approach handling schema changes at scale by separating migrations from deploys, along with some GitHub Actions and PlanetScale’s own magic. 

Mike Coutermarsh (PlanetScale)   

[Maybe MOAR Is Not the Answer 🫠](https://link.testdouble.com/22i) — Turns out a relentless push for MOAR features and developers was wrong. Leaders could do with some reflection on less. 

Test Double sponsor   

📄 [Modern CSS Patterns in Campfire](https://dev.37signals.com/modern-css-patterns-and-techniques-in-campfire/) Jason Zimdars (37signals) 

📄 [Work Around Rails Schema Noise with 'One Weird Trick'](https://blog.testdouble.com/posts/2024-04-09-work-around-rails-schema-noise-with-one-weird-trick/) Kevin Baribeau 

📄 [Implementing Account-Based Subdomains in Rails](https://www.honeybadger.io/blog/rails-account-subdomains/) Aestimo Kirina (Honeybadger) 

📄 [Notes on `git`'s Error Messages](https://jvns.ca/blog/2024/04/10/notes-on-git-error-messages/) Julia Evans  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/l2oh8h6iesi81okciktd.jpg)](https://synvert.net/)  

[Synvert: Write Code Snippets to Transform Existing Source Code](https://synvert.net/) — Supporting Ruby, JavaScript, and TypeScript, this is essentially a scripted, AST-powered form of 'find and replace' for code, letting you implement code transformations in a structured way. It can even be given input and output code and write a potential transformation for you to tweak. [Full Ruby docs here](https://synvert.net/ruby/docs/) and a [bunch of example ‘snippets’ for Ruby](https://github.com/synvert-hq/synvert-snippets-ruby/tree/main/lib/ruby). 

Synvert   

[Phlex 1.10.0: Build Object Oriented View in Ruby](https://github.com/phlex-ruby/phlex/releases/tag/1.10.0) — A minor release by number, a pretty big release by features! Phlex lets you treat everything in a view as a distinct component and manage them as plain old Ruby objects. v1.10 unveils some exciting experimental features including _selective rendering_, component kits, and CSV view rendering – all explained in detail here. 

Joel Drapper    

Jobs  

[Build Mission Control for a Global Weather Balloon Constellation](https://windbornesystems.com/careers/fullstack-web-developer) — WindBorne is supercharging forecasts with smart weather balloons launched from three continents; we're hiring a fullstack web dev. 
WindBorne Systems   

[Principal Full-Stack Rails Engineer (Remote)](https://www.linkedin.com/jobs/view/3868476988/) — Ruby FinTech w +10yr Track Record. NVDA, Bitcoin ETFs, Retirement Income, you name it. Helping investors research their options. 
Mitre Media      

[form_props: The Power of Rails Forms, Now for React Too](https://thoughtbot.com/blog/introducing-form-props) — If you want the convenience of `form_with` but when building forms in React apps, this is for you. [GitHub repo](https://github.com/thoughtbot/form_props). 

Johny Ho (thoughtbot)   

- [Pagy 8.1](https://github.com/ddnexus/pagy) – The popular flexible pagination gem gains a [Pagy 'playground'](https://ddnexus.github.io/pagy/playground/) to let you try things out more quickly.
- [Sidekiq::Throttled 1.4](https://github.com/ixti/sidekiq-throttled) – Concurrency and rate-limit throttling for Sidekiq.
- [Langchain.rb 0.11](https://github.com/patterns-ai-core/langchainrb) – Framework to build LLM-backed Ruby apps.
- [que-scheduler 5.1](https://github.com/hlascelles/que-scheduler) – [Que](https://github.com/que-rb/que) extension to schedule jobs cron-style.
- [Stripe Ruby 11.0](https://github.com/stripe/stripe-ruby) – Ruby library for the Stripe API.
- [Avo 3.6](https://avohq.io/releases/3.6.0) – Rails app building framework/CMS.         

Curated by [Peter Cooper](https://twitter.com/cooperx86) and [Glenn Goodrich](https://twitter.com/ruprict).
Published by [Cooperpress](https://cooperpress.com/). 

[Change your email](https://rubyweekly.com/edit_subscription/*|UID|*) or [Stop getting this newsletter.](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Other weekly newsletters we publish include [Postgres Weekly](https://postgresweekly.com/), [React Status](https://react.statuscode.com/), [Frontend Focus](https://frontendfoc.us/), and [JavaScript Weekly](https://javascriptweekly.com/).
