❤️ you're the best
09.08.2025 10:29 — 👍 0 🔁 0 💬 0 📌 0@byroot.bsky.social
Rails core, Ruby committer, funemployed.
❤️ you're the best
09.08.2025 10:29 — 👍 0 🔁 0 💬 0 📌 0No need to be sorry. That was my decision and I'm happy about it.
I'm gonna take a break and see what's out there at RailsWorld.
Bio update: s/Senior Staff Engineer on Shopify's Ruby and Rails infrastructure team/ funemployed/
After almost 12 years, today was my last day at the company. 🫡
Yeah, I generally agree with that. The devil is in the details though.
08.08.2025 08:24 — 👍 0 🔁 0 💬 0 📌 0Yup. Common mistake.
08.08.2025 07:23 — 👍 0 🔁 0 💬 0 📌 0What I mean to say, is the problem is not to much the compiler (erb vs erubi) but the API which is often misused.
Granted, few people need to integrate ERB in a way where performance matter.
The problem here isn't really Erubi vs vanilla ERB, even though Erubi is a tad better.
The issue is what was being benchmarked included a not so efficient compilation cache inside Tilt.
If you look at the p2 generated code, there's lots of things to rewrite backtraces etc that slow it down.
Rule of thumb: if your benchmark shows you your template engine is significantly faster than ERB, the benchmark likely is using ERB in an imperfect way.
github.com/digital-fabr...
The redis RTT method is only GVL free if you use `hiredis-client`. The default pure Ruby client has no way to measure the rountrip without being impacted by GVL contention.
06.08.2025 23:33 — 👍 1 🔁 0 💬 1 📌 0Also Ractors are somewhat getting these sort of capabilities, with `Ractor.select`.
04.08.2025 20:45 — 👍 2 🔁 0 💬 0 📌 0I see. That seems a bit redundant with Fiber, but `SizedQueue.new(0)` is an interesting idea.
`Queue.select` is too, but not sure how to avoid thundering herd issues for implementations without a GVL 🤔.
Perhaps a `Queue.pop(queues...)` would be more workable.
Oh wow, that bug still hasn't been fixed 😿
04.08.2025 20:41 — 👍 1 🔁 0 💬 0 📌 0> We think this is an inaccuracy caused by the thread not having the GVL.
This shouldn't be the case because the event is triggered before trying to acquire the GVL.
But if you have some reproduction, I'm interested.
I honestly don't know. I always wondered how languages that rely fully on multi-threading do.
Of course they most likely rely on cooperative termination, but not idea what they do in the rare case where it fails.
And Pitchfork's soft_timeout feature is also followed by a worker shutdown.
04.08.2025 17:42 — 👍 1 🔁 0 💬 0 📌 0> there is no alternative but to kill the entire runtime? I guess?
Thing is. Once you've used `Thead#kill`, it's a good idea to shutdown, because you have no idea if something was corrupted or not.
I believe `Rack::Timeout` does trigger a full process shutdown after killing a thread.
> Ruby doesn't have any direct analogy to either
Isn't Queue very similar? You can close it to ask for shutdown, etc. docs.ruby-lang.org/en/3.4/Threa...
I generally agree. The `#to_json` interface is too encroached to ever be deprecated, but `Object#to_json` could probably be.
I'd need to get rid of the similarly bad behavior in Active Support first, though: github.com/rails/rails/...
There are also a bunch of interesting uses in the stdlib, e.g.:
github.com/ruby/ruby/bl...
> Are there some dynamic one-time use examples you’re thinking of?
Yes, things like this: gist.github.com/byroot/84b37...
Not saying it's common nor that you aren't better to more explicitly use a memoization pattern. But there is legit uses in the wild.
I agree that 99.99% of the time /o isn't needed, or not what you want, and the doc definitely should be improved, but I'm not convinced it's worth deprecating it.
03.08.2025 11:33 — 👍 3 🔁 0 💬 0 📌 0I'm afraid your benchmark doesn't make much sense.
/o only "optimize" if there is interpolation, if you can replace it by a regexp without interpolation, then of course it's simpler and faster, no reason to use /o there.
Beyond performance work, I deprecated a bunch of APis in the JSON gem, and added others, so I figured it would be a good occasion to talk about API design: byroot.github.io/ruby/json/20...
02.08.2025 16:19 — 👍 26 🔁 8 💬 2 📌 0I meant to link to api.rubyonrails.org/classes/Acti...
28.07.2025 17:35 — 👍 1 🔁 0 💬 1 📌 0nitpick: Consider using one of the `select_*` methods instead of `execute` so Active Record knows it's a read query and can retry it if needed.
28.07.2025 17:00 — 👍 1 🔁 0 💬 2 📌 0I'm not as familiar with Puma than with Unicorn/Pitchfork, but I suspect these IPC messages are fairly small? Pipes (at least on Linux) are very efficient.
Also I suspect pipes are needed anyway to be able to select/epoll and be notified when new messages are to be read.
Yes, this one puzzles me as well, considering dynamic typing get dunked on constantly.
> Flexible typing is a feature of SQLite, not a bug.
www.sqlite.org/flextypegood...
I'm totally OK with dynamic typing in my programming language obviously, but not at all for my database.
TIL: www.sqlite.org/nulinstr.html
Hot take 🌶️
The more I deal with SQLite the more I'm astounded it became such a tech darling given its many surprising quirks.
MySQL has been flamed to death for this sort of stuff, and still has poor reputation a decade after most of them have been fixed.
Conférence de presse officielle, au pupitre est inscrit « réforme des retraites ». Un ministre à l’allure de responsable RH énonce : « Chers concitoyens, vous travaillerez désormais jusqu’à 102 ans… » Réactions indignées dans la salle : « Quoi ?? 102 ans ?! » Un conseiller souffle un mot à l’oreille du ministre-RH. Celui-ci enchaîne dans un sourire narquois : « Ah oui et pour chaque année non-cotisée on vous tranchera un orteil !! » Hurlements outrés du public : « Mais ça va pas ?!! On se laissera pas faire ! » Plus tard, plan large dans le bureau du ministre, le ministre et son conseiller écoutent les infos : « Camouflet pour l’exécutif : la clause orteil est finalement retoquée et la réforme passe sans… » Ils exultent : « Haha, à chaque fois… » [fin]
la clause orteil
17.07.2025 10:13 — 👍 605 🔁 306 💬 4 📌 18Wow! Not sure if I should tip my hat off or call for help 😅
04.07.2025 18:32 — 👍 2 🔁 0 💬 0 📌 0