---
title: "Tenderlove's Ruby powered Ruby JIT"
publication: "Ruby Weekly"
issue: 571
published_at: "2021-09-23"
canonical_url: "https://rubyweekly.com/issues/571"
---

Plus producing e-books with Ruby, a new book from Jemma, and a big JRuby release. |        

#​571 — September 23, 2021 

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

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/ej2qarpsgbp4xiww8hta.jpg)](https://nts.strzibny.name/ruby-for-ebook-publishing/)  

[Using Ruby for Ebook Publishing](https://nts.strzibny.name/ruby-for-ebook-publishing/) — The author of _Deployment from Scratch_ enumerates how he uses Ruby in the publishing process, including PDF (and PDF preview) generation, text manipulation, image preview, and more. I'm always a fan of using Ruby as glue in non-Web scenarios like this! 

Josef Strzibny   

[TenderJIT: A JIT for Ruby, Written in Ruby](https://github.com/tenderlove/tenderjit) — An interesting project being worked on by esteemed Ruby and Rails core team member Aaron ‘tenderlove’ Patterson. If this sort of thing interests you, he’s running a live session on September 30 which digs into how JITs work and how to implement one, and you can [register here](https://www.hexdevs.com/open-source-thursdays/expert-sessions-with-aaron-patterson-sep-30th/). 

Aaron Patterson   [![\](https://copm.s3.amazonaws.com/b88d1e2e.png)](https://www.hookrelay.dev/?utm_source=rubyweekly) 

[Building a Reliable Webhook Delivery System Sucks](https://www.hookrelay.dev/?utm_source=rubyweekly) — Skip the grunt work and let Hook Relay manage all your webhooks for you. Inbound and Outbound? ✅ Automated retries plus delivery history for your users? ✅ Visualize Stripe-quality webhooks for your app, [now click here](https://www.hookrelay.dev/?utm_source=rubyweekly) to make it a reality in minutes. 

Hook Relay sponsor   

[Building a Real-Time Chat App in Rails with ActionCable and Turbo](https://www.honeybadger.io/blog/chat-app-rails-actioncable-turbo/) — A walkthrough creating users, chat rooms, and private chats using the shiniest, new tools in Rails. 

Abiodun Olowode (Honeybadger Development Blog)   

[JRuby 9.3.0.0 Released](https://www.jruby.org/2021/09/22/jruby-9-3-0-0.html) — The popular JVM-based (Java 8-17 supported, as well as OpenJDK) Ruby implementation gets a new release which is now updated to be compatible with Ruby 2.6.8 standards (in comparison, JRuby 9.2.x was/is Ruby 2.5 compatible). 

JRuby Core Team   

📕 [Preorder for 'Ruby GC in Under Two Hours' Book](https://jemma.dev/book/) — Jemma Issroff (of _Tip of the week_ fame, amongst other things) has been writing a book on the Ruby garbage collector that is focused on loading you up with info in as short a time as possible. Mark this down and sweep it up? 

Jemma Issroff     

Jobs  

[Senior Software Engineer (Remote in the US)](https://grnh.se/bf97c4df4us) — Snapdocs is now a [Unicorn](https://snapdocs.com/press/snapdocs-named-to-the-2020-cb-insights-fintech-250-list-of-fastest-growing-fintech-startups/) with a $1.5B+ valuation. We’re a SaaS product disrupting the mortgage and real-estate industry. Join our growing distributed team. ROR, Go, Postgres, React, TypeScript, AWS. 
Snapdocs   

[Senior Ruby Engineers | Remote US/EMEA | Full-Time](https://orbit.love/weloveruby) — Orbit is building mission control for communities like Kubernetes and CircleCI. Join our remote team that values empathy and the occasional space pun. 
Orbit   

[Find Ruby Jobs Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired    

📕 Articles & Tutorials  

[How to Reduce Memory Bloat in Ruby](https://blog.appsignal.com/2021/09/21/how-to-reduce-memory-bloat-in-ruby.html) — A handful of tips, but with more of an introduction to some of what’s going on behind the scenes in Ruby regarding memory management. 

Kumar Harsh   

['Move Over Rake, Thor is the New King'](https://technology.doximity.com/articles/move-over-rake-thor-is-the-new-king) — Rake is the longest running and most popular task runner in the Ruby space but [Thor](https://github.com/rails/thor) presents a compelling alternative (and is reasonably long running itself). 

Ben Simpson   

[Free Index Advisor for Postgres: Get Ideal Index Recommendations](https://pganalyze.com/index-advisor?utm_source=RubyWeeklySecondary09232021) — Paste your query and schema data and the pganalyze Index Advisor recommends the ideal index that covers a specific query. 

pganalyze sponsor   

[Let's Read _Eloquent Ruby_, Chapter 4](https://dev.to/baweaver/let-s-read-eloquent-ruby-ch-4-c0m) — The latest chapter in Brandon’s walk through Russ Olsen’s _Eloquent Ruby_ covers some string methods. 

Brandon Weaver   

[Buffered IO Streams in Ruby](https://blog.thegnar.co/ruby-io-buffer) — Ruby IO may not immediately write where you are asking it to. This post looks at where data written to a stream goes and when it may or may not be committed where you would expect it to. 

Kevin Murphy   

[Use `compact_blank` to Remove Empty Strings from Arrays and Hashes](https://andycroll.com/ruby/compact_blank-remove-empty-strings-from-array-and-hash/) — A nicety in Active Support and an alternative to something like `.reject { |e| e.nil? || e&.empty? }` 

Andy Croll   

[Quick Tip: Going Cookie-Free with Rails](https://ryanfb.github.io/etc/2021/08/29/going_cookie-free_with_rails.html) — Respect your users’ privacy with this quick lambda. 

Ryan Baumann   

[Rails 7 Adds `weekday_select` and `weekday_options_for_select`](https://blog.saeloun.com/2021/09/22/rails-7-adds-weekday_options_for_select.html) — More useful new helpers for a common situation. 

Deepark Mahakale   

[Mapping Rails to Hanami](https://hanamimastery.com/episodes/8-rails-vs-hanami-mapping-frameworks) — A side-by-side look at the various abstractions of each framework, and while this definitely is Hanami-colored, the mapping is quite informative. 

Hanami Mastery   

[Teaching by Filling in Knowledge Gaps](https://jvns.ca/blog/2021/09/20/teaching-by-filling-in-knowledge-gaps/) — A good idea and something that used to really keep the blog ecosystem going at one point. 

Julia Evans  

🛠 Code & Tools  

[Power Tools for Analyzing Your Heroku Logs](https://railsautoscale.com/heroku-logs-tools/) — The biggest tool here is Angle Grinder, a real-time log analysis tool that makes parsing, extracting, and aggregating bits out of your logs simple. 

Rails Autoscale   

[Taylor: An Open-Source Game Engine with Ruby Scripting](http://taylor.oequacki.com/) — Taylor is implemented in C++, but the scripting language is mRuby. 

Sean Earle   

[ActiveEventStore: Rails Event Store in a More Rails Way](https://github.com/palkan/active_event_store) — If you’ve used Rails Event Store, you know it’s great but pretty advanced. This is an effort to make using RES more like the other Active* frameworks. 

Vladimir Dementyev   

[Seamlessly Integrate Video into Your Ruby App](https://get.mux.com/2W5IIsa) 

Mux sponsor   

[RSpec Tracer: A Specs Dependency Analysis Tool](https://github.com/avmnu-sng/rspec-tracer) — Maintains a list of files used for each test which enables skipping tests in subsequent runs if none of those files change. 

Abhimanyu Singh   

[ffi-libc: Useful Ruby FFI Bindings for `libc`](https://github.com/postmodern/ffi-libc) — Bindings to the `libc` library which allow accessing certain low-level C functions that Ruby does not (e.g. `alarm(2)` and `getifaddrs(3)`). 

Postmodern   

[Ruby Packer: Pack a Ruby App into a Single Executable](https://github.com/pmq20/ruby-packer) 
Minqi Pan   

[Rambulance 2.0: Dynamically Render Error Pages or JSON Responses for Rails Apps](https://github.com/yuki24/rambulance) 
Yuki Nishijima      

💡**Tip of the Week** 

   

## General Delimited Input 

We sometimes see Ruby snippets like `%w(some strings)` or `%s(some other strings)` or `%Q(even more #{strings})`. It can be a little unclear what is happening. What's the `%` syntax? What do the different letters do? When are they uppercase or lowercase? 

This is usually referred to as _'general delimited input',_ although I've also heard this called _'percent syntax'._ Either way, it's a shorthand for creating strings, arrays, symbols, or regular expressions. And, as we'll see below, each different letter creates an object of a different class. 

With one exception, lowercase delimiters ignore interpolation, while uppercase delimiters compute interpolated values. 

General delimited input is used most frequently for constants which are arrays of `String`s, in codebases which prefer the syntax for multi-line strings, and for regexes. 

Let's take a brief tour of a handful of general delimited input syntaxes, and what they do: 

### %w() or %W() - Arrays of Strings 

These split the arguments on space, and create arrays where each element in the array is a String 

- **%w()** no interpolation, so will split 'interpolated-looking' values on spaces too: 

```
%w(some values #{1 + 1})
=> ["some", "values", "\#{1", "+", "1}"]
``` 

- **%W()** with interpolation: 

```
%W(some values #{1 + 1})
=> ["some", "values", "2"]
``` 

### %i() or %I() - Arrays of Symbols 

Same as above, except instead of strings, each element is a `Symbol`. 

- **%i()** no interpolation, so will split interpolated values on spaces too: 

```
%i(some values #{1 + 1})
=> [:some, :values, :"\#{1", :+, :"1}"]
``` 

- **%I()** with interpolation: 

```
%I(some values #{1 + 1})
=> [:some, :values, :"2"]
``` 

### %q() or %Q() - Strings 

These will turn the argument into a string. 

- **%q()** no interpolation, so will split interpolated values on spaces too: 

```
%q(some values #{1 + 1})
=> "some values \#{1 + 1}"
``` 

- **%Q()** with interpolation: 

```
%Q(some values #{1 + 1})
=> "some values 2"
``` 

### %s() - Symbols 

**%s()** no interpolation, so will split interpolated values on spaces too: 

```
%s(some values #{1 + 1})
=> :"some values \#{1 + 1}"
``` 

### %r() - Regex 

**%r()** is the only exception to the capitalization / interpolation rule. `%r()` will give us a regex with interpolation: 

```
%r(some values #{1 + 1})
=> /some values 2/
``` 

Hopefully next time you see, or need to use _general delimited input,_ you now know the appropriate delimiter to use. 

_Note: The characters delimiting the contents (`(` and `)` in the examples above) don't_ have _to be parentheses, but could be square brackets, braces, angle brackets, and others - but that's a tip for another day._    

This week’s tip was written by [Jemma Issroff](https://twitter.com/jemmaissroff).          

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
