RSSAmplifier

Blog

Tom Stuart

Public posts from @tom@ruby.social

ruby.socialRSS feed ↗20 posts

Latest posts

(untitled)

It’s bonkers that a) this hardcoded Last-Modified header is the unconditional behaviour of # http_cache_forever in the first place, but especially that b) ActiveStorage::Blobs::ProxyController uses it to inform browsers that all stored files served by your app are over fifteen years old https:// ruby.social/@mudge/11659726129 3692779

(untitled)

A clever idea from @ james : using Capybara & Cuprite to generate self-updating screenshots for product documentation https:// interblah.net/self-updating-sc reenshots

(untitled)

I’m the first to complain whenever something bad happens, so for balance: look, something good happened! https:// github.com/rubocop/rubocop/pul l/15046

(untitled)

https:// github.com/rails/website/commi t/8e261885e35839a2d11795dfd01ec23b8a1cfc29 https:// twitter.com/dril/status/246457 45311227904

(untitled)

I realise I’m being slow here, but… can anyone help me to understand whether Rails 8.1’s structured event reporting has any relationship to making the default logs (requests etc) structured, or are the two concerns completely orthogonal? You can use Rails.event.notify to report “business events”, but do you still — and will you always — need a gem like lograge or rails_semantic_logger if you want…

(untitled)

Leo pointed out that C++20’s std::chrono overloads the `/` operator to provide date creation syntax. Surely Ruby can do better? ``` >> module ISO8601 Month = Data.define(:y, :m) { def -(d) = Date.new(y, m, d) } refine(Integer) { def -(m) = Month.new(self, m) } end >> using ISO8601 >> 2025-12-29 => #<Date: 2025-12-29 ((2461039j,0s,0n),+0s,2299161j)> ```

(untitled)

Maybe I was right that one time.

(untitled)

Please, @ rubycentral , buy ruby-doc.org and redirect it to docs.ruby-lang.org. I’ll gladly chip in to help pay for it. https:// mastodon.social/@jamesbritt/11 4375521517175143

(untitled)

Er, I’d love to, except…

(untitled)

(untitled)

I’m even more happy at the prospect of this @ lrug talk finally becoming outdated https:// youtu.be/pEMMhaDaYSQ

(untitled)

I’m really happy to see RSpec move to a monorepo and clean up other maintenance burdens like supporting old Ruby versions. It’s by far my favourite Ruby testing library and I’d love to keep using it for another decade or two. https:// rspec.info/blog/2024/11/introd ucing-the-monorepo/

(untitled)

Happy 23 Dogs Day to all those who celebrate.

(untitled)

13 years ago today. Thank you @ james for the photos and the reminder.

(untitled)

Praise be! https:// github.com/ruby/json

(untitled)

I'm relieved to see Prism become the default CRuby parser at last. Hopefully one step closer to defusing the unnecessary ticking time bomb of having two competing parser projects. https:// github.com/ruby/ruby/pull/11497

(untitled)

I’d missed that Rails 7.1 included a change to exception handling behaviour in the test environment and it caused me headaches until I discovered the source of the problem. If you’re doing outside-in TDD you might want to change it from `:rescuable` back to `:none` so your acceptance tests fail with a more informative error message. (I’m glad that `:rescuable` is available as an option for those…

(untitled)

Happy π day! How accurate an estimate of the value of π does your commit history produce? ``` MAX = (1 << 64) - 1 hits = 0 `git log --pretty=format:%H`.each_line(chomp: true).with_index do |sha, index| x, y = [sha].pack('H*').unpack('Q*').map { (_1.to_f / MAX) * 2 - 1 } hits += 1 if Math.sqrt(x*x + y*y) <= 1 puts hits.to_f / (index + 1) * 4 end ```

(untitled)

Hey Ruby, how often (if ever) does Pancake Day fall on Valentine’s Day? https:// tomstu.art/weeknotes-215-confu sing-solution#love-tuesday

(untitled)

It’s been a year since I gave this lightning talk at @ lrug . It felt a bit silly at the time but in hindsight I’m glad I did it because it’s a nice concise summary of a project I enjoyed and worked hard on. I’ve already forgotten most of the details so I’m grateful to past-me for bothering to compile it. https:// assets.lrug.org/videos/2023/fe…