#654 — May 18, 2023 |
|
Ruby Weekly |
Ruby 3.3 Preview 1 Released — Christmas Day, and the eventual release of Ruby 3.3, might be seven months away, but there’s already a preview release to sink your teeth into. It is early days though and the range of new features is limited. Updates include:
Yui Naruse |
Free eBook: Advanced Database Programming with Rails and Postgres — Learn about subqueries, materialized views, and custom data types in Postgres and Rails. We walk through realistic real-life examples, translating first into SQL, and then into Rails code. Every example comes with source code so you can follow along. pganalyze sponsor |
A Field Report from RubyKaigi — If you weren’t able to make it to RubyKaigi 2023 in Japan, never fear. Justin Searls acts as your eyes and ears on the ground in this thorough report summarizing a variety of talks on topics from ReDoS attacks to the future of the Ruby parser. Justin Searls |
Polyphony 1.0: Fine-Grained Concurrency for Ruby — Uses fibers and io_uring (or libev) under the hood to provide a cooperative, sequential coroutine-based concurrency model. Thankfully there are lots of usage examples. Digital Fabric |
QUICK BITS
|
📕 Tutorials, Articles, and Videos |
From Ruby to Crystal? Writing and Distributing a CLI Tool — The saga of building a cross-platform CLI using Crystal, a compiled language with static types that’s very Ruby like. But how Ruby-esque is Crystal, really? And is it the best choice for building statically linked binaries in a friendly language? Valentin Kiselev and Travis Turner (Evil Martians) |
Refactoring a Rails App to Use Action Mailer for Transactional Email — A handy step-by-step tutorial born from recent experience. Harrison Broadbent |
A Better Postgres Support Experience — "We’re able to do so much more working with a partner who cares as much about data as we do." –CareRev case study Crunchy Bridge sponsor |
Flog-Driven Development — This fifth installment in an ongoing series explores Flog, a tool that measures the complexity of your code, and how it can drive your development toward a simpler implementation. Kevin Murphy |
Running Ruby 3.2's YJIT in Production at Discourse — Discourse (the forum folks) ran a test on two sets of clusters to evaluate the now production-ready YJIT in Ruby 3.2. The results were encouraging, resulting in all hosted servers now running YJIT. If you’re self-hosting Discourse, it’s worthwhile to opt-in to YJIT once you understand the effects. Tan Guo Xiang (Discourse) |
'Inline' Routes in Rails — Thanks to Rack, you can rig up a simple route without getting a typical Rails controller or view involved. Akshay Khot |
Handling Environment Variables in Ruby — And a few tools to make it easier. Ariel Juodziukynas |
How to Create Custom Flash Types in Rails
|
🛠 Code & Tools |
ChatGPTErrorHandler: For More Helpful Error Messages — This is a cute use for ChatGPT by having it attempt to explain your app’s errors along with a potential remedy. (You’ll need an OpenAI API token.) Nick Schwaderer |
Docker Rails Example 0.8 — A production-ready example Rails 7 app using Docker and Docker Compose. Nick Janetakis |
Is Your Monitoring Provider’s Complexity Slowing… You… Down?🐌 — Honeybadger’s dead simple UI makes it easy to find and fix problems quickly so you can get on with your day. Try it now. Honeybadger sponsor |
chroma-rb: Chroma Vector Database Client — Chroma is an “AI-native” open-source embedding database and this client opens it up to Rubyists who want to store and search embeddings. Mario Alberto Chávez Cárdenas |
Mayu: A Live-Streaming Server-Side Component-Based Framework — This is typically more of a JavaScript kind of idea but this is an interesting experiment with enough to play with if you’re interested in reactive and Next.js-like ideas in Ruby. Andreas Alin |
Vessel: Fast High-Level Web Crawling Framework — Vessel uses Ferrum, the Ruby API based on the Chrome DevTools Protocol (CDP), to crawl and parse pages as “fast as Chrome.” RubyCDP |
|
|