---
title: "More on an anonymous struct literal syntax for Ruby"
publication: "Ruby Weekly"
issue: 509
published_at: "2020-07-09"
canonical_url: "https://rubyweekly.com/issues/509"
---

Plus more of this week's Ruby news, views, and libraries.       

#509 — July 9, 2020 

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

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1594294120/eevdocilnvo18zglbfid.png)](https://blog.heroku.com/rate-throttle-api-client)  

[A Fast Car Needs Good Brakes: How Heroku Added Client Rate Throttling to Their API Client Gem](https://blog.heroku.com/rate-throttle-api-client) — When you’re interacting with remote APIs, you’ll often need to take _rate limits_ into account. As Richard amusingly says: 

> _“If you provide an API client that doesn’t include rate limiting, you don’t really have an API client. You’ve got an exception generator with a remote timer.”_ 

Richard Schneeman (Heroku)   

[More on Anonymous Struct Literals](https://supergood.software/ruby-anonymous-struct-literals/) — Last week we reported on [a proposed syntax](https://bugs.ruby-lang.org/issues/16986) for defining anonymous `Struct` literals in Ruby, but this post fleshes out the story a little more. 

Jared Norman   [![\](https://copm.s3.amazonaws.com/32941b24.png)](https://scoutapm.com?utm_source=rubyweekly&utm_medium=newsletter&utm_campaign=q3) 

[Scout APM - A Developer’s Best Friend](https://scoutapm.com?utm_source=rubyweekly&utm_medium=newsletter&utm_campaign=q3) — Scout’s intuitive UI helps you quickly track down issues so you can get back to building your product. Rest easy knowing that Scout is tracking your apps performance and hunting down small issues before they become large issues. Get started for free. 

Scout APM sponsor   

[Polyphony: A Fine-Grained Concurrency Option for Ruby](https://digital-fabric.github.io/polyphony/) — Polyphony uses fibers as its unit of concurrency along with `libev` as an event reactor/event loop. [GitHub repo.](https://github.com/digital-fabric/polyphony) 

Digital Fabric   

[Huginn: Create Agents That Monitor and Act On Your Behalf](https://github.com/huginn/huginn) — I don’t know why we’ve not linked to this before, but I’ve just been playing with it and it’s really cool. If you’ve ever seen a service like IFTTT or Zapier that can join online services together, this is a similar idea, but in Ruby and open source. 

Huginn     

**⚡️ Quick bits:** 

- Kernel#tap has been [rewritten in plain Ruby rather than C](https://github.com/ruby/ruby/pull/3281) and.. it's faster?
- A new, empty Rails app pulls in.. [106 megabytes of JavaScript.](https://gist.github.com/rileytg/6f2a1a8d982cbcee8cdcab37bfe344bb) Of course, that isn't the deployed bundle size, but, still...   

💻 Jobs  

[Senior Full Stack Ruby Engineer (Pembrokeshire, Wales)](https://www.craftcourses.com/) — Seeking an experienced Ruby dev to take the lead on our web platform: An ecommerce system in Rails with MySQL, various payment/3rd-party integrations, Elasticsearch & AWS services. Email kate@craftcourses.com to discuss. 

CRAFTCOURSES   

[Find a Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-rubyweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77583) — Use Vettery to connect with growing tech teams at startups and Fortune 500 companies. 

Vettery  

ℹ️ _Interested in running a job listing in Ruby Weekly? There's [more info here](https://booking.cooperpress.com/jobs)_. 

📘 Articles & Tutorials  

[Running Spot Instances Effectively with Amazon EKS](https://m.signalvnoise.com/running-spot-instances-effectively-with-amazon-eks/) — One of the developers behind Basecamp’s new _HEY_ email service (all Ruby and Rails powered, of course) shares some insights on keeping as much of their compute infrastructure on EC2’s much cheaper _spot instances_ as possible. 

Blake Stoddard (Basecamp)   

▶['Soft Delete' with Discard](https://www.driftingruby.com/episodes/soft-delete-with-discard) — A seven minute introduction to the idea of ‘deleting’ records with Active Record but _without_ totally destroying the underlying record. [Discard](https://github.com/jhawthorn/discard) does the hard work. 

Drifting Ruby   

[Build the World's Simplest ETL Pipeline with Kiba](https://t.co/RuHsZ66ocw) — [Kiba](https://github.com/thbar/kiba) is a Ruby-powered ETL system for transforming data and this is a very simple introduction. We linked to Kiba and talked to its creator in [issue 499](https://rubyweekly.com/issues/499). 

Chris I.   

[Be Ahead of the Curve — Upgrade Your Rails Application](https://kodius.com/upgrade-your-rails) — Snazz things up with Multiple Database support, Parallel Tests, better JavaScript ecosystem support and much much more. 

Kodius sponsor   

[`scan_left`: A Lazy, Incremental Alternative to `#inject`](https://medium.com/building-panorama-education/scan-left-a-lazy-incremental-alternative-to-inject-f6e946f74c00) — The major difference here is `scan_left` returns an array of the value change per iteration versus a single, scalar result. 

Parker Finch   

[First Class Experimentation in Ruby with Scientist](https://buildingvts.com/first-class-experimentation-in-ruby-with-scientist-8ff1a3474ebc) — Scientist is a gem that allows experimentation in production when you want to test two branches of code. The old way (the control) and the new are both executed, compared, and reported. So if you don’t know, now you know. 

Joe Letizia   

[Understanding and Implementing Bubble Sort in Ruby](https://www.honeybadger.io/blog/ruby-bubble-sort/) — Bubble sorting is rarely the best approach but it’s a simple algorithm to understand and reproduce solely as a learning exercise. 

Julie Kent   

[Why Validation Matchers Are The Only Shoulda Matchers I Use](https://www.codewithjason.com/validation-matchers-shoulda-matchers-use/) — An explanation of what [Shoulda](https://github.com/thoughtbot/shoulda-matchers) is, what its matchers do, and then why Jason only uses them for validation purposes. 

Jason Swett  

🛠 Code and Tools  

[Rails Application Templates Made Even Easier with Rails Bytes](https://everydayrails.com/2020/07/06/modular-rails-templates-rails-bytes.html) — [Rails Bytes](https://railsbytes.com/) is a community-driven repository of more than 100 application templates for specific purposes. 

Aaron Sumner   

[WahWah: A Library for Reading Audio Metadata](https://github.com/aidewoode/wahwah) — For reading things like MP3 IDv3 tags, embedded images, and similar metadata. 

Aidewoode   

[The Ruby Security Handbook](https://link.sqreen.com/yCOS9oW8) 

Sqreen sponsor   

[React on Rails: Bringing React, Webpack, and Rails Together with Webpacker](https://github.com/shakacode/react_on_rails) — Version 12 has just been released with (React) hooks support and TypeScript bindings. 

ShakaCode   

[Motion: Reactive Frontend UI Components for Rails in Pure Ruby](https://github.com/unabridged/motion) — Motion uses the newly popular send-HTML-over-ActionCable approach to updating the front-end from the server and requires little-to-no changes to your Rails app. 

Unabridged Software   

[A Ruby Interface to the Google Pay™ for Passes API](https://github.com/regularlady/googlepay) — [Google Pay for Passes](https://developers.google.com/pay/passes) is a Google service for working with boarding passes, gift cards, boarding passes, etc. 

Brittany Martin     

🕰 **ICYMI** _(Some older stuff that may catch your eye...)_ 

- A few [tips on debugging the webpack config](https://rossta.net/blog/how-to-debug-webpack-on-rails.html) in your Rails app.
- Machine Learning with Ruby? [Here's a list of gems](https://dev.to/daviducolo/machinelearning-with-ruby-3m75) to get you started.
- This need for a rules engine is common, yet existing gems are complex and hard to incorporate. [Anuj Biyani runs through a simpler way](https://t.co/NzXbVt1ej5).
- In this refactoring session Anton Davydov outlines [five common issues](https://www.davydovanton.com/2020/05/19/five-common-issues-with-services-and-dry-monads/) with services and dry-monads.
- Mehdi Farsi explains [how to keep your your routes clean](https://medium.com/rubycademy/how-to-keep-your-routes-clean-in-ruby-on-rails-f7cf348ec13b) in Rails.         

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

[Change your email address](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
