[#]TIL from @byroot’s excellent https://byroot.github.io/ruby/json/2024/12/18/optimizing-ruby-json-part-2.html that you can assign local variables in method argument defaults, e.g.
def initialize(ifnone = (ifnone_unset = true))
=> More informations about this toot | View the thread
Thanks to all who have tried out Argon2id https://github.com/mudge/argon2id so far.
In its first week after launch: I’ve pushed 104 versions of the gem to RubyGems (that’s including each individual platform’s gem), I added JRuby and TruffleRuby support (still without any new runtime dependencies), it has been downloaded over 10,000 times, and it was featured in Ruby Weekly https://rubyweekly.com/issues/726
Next job is to figure out the safest way for people to upgrade their hashing functions in existing apps…
=> More informations about this toot | View the thread
The risk with taking a week off work is that I find an open source itch to scratch. Now presenting:
Argon2id: native, pre-compiled Ruby bindings to the reference C implementation of Argon2, the password-hashing function that won the 2015 Password Hashing Competition.
https://github.com/mudge/argon2id
(Thanks to @flavorjones for putting up with my questions once more.)
=> More informations about this toot | View the thread
If, like me, you’ve wondered why the Action Mailer Basics guide (https://guides.rubyonrails.org/action_mailer_basics.html#calling-the-mailer) uses .with()
and params
instead of passing arguments to the method on the mailer (i.e. UserMailer.with(user: alice).welcome_email
vs UserMailer.welcome_email(user: alice)
), this API and its rationale is documented under Action Mailer Parameterized: https://api.rubyonrails.org/v7.1.3.4/classes/ActionMailer/Parameterized.html
(I actually prefer the non-parameterised version but it helps to understand the API is meant for extracting common setup.)
=> More informations about this toot | View the thread
I’m obviously biased but it is pretty incredible this is an entire computer. (Other single-board computers are available.)
=> More informations about this toot | View the thread
Inspired by @rmondello’s https://rmondello.com/2024/09/19/consider-slowing-down-when-switching-password-managers/, I’m slowly slowly trying to move over from 1Password to Apple’s Passwords app for personal accounts, even braving passkeys when available (and binning accounts where possible). There are going to be exceptions, e.g. where I use https://developer.1password.com/docs/cli/reference/commands/run/ to bulk publish gems to RubyGems, but it’s promising so far.
It’s going to take a while though. It turns out one really does accumulate a lot of usernames and passwords over the years…
=> More informations about this toot | View the thread
If you find yourself putting ternary conditions in templates to switch CSS classes for an element, e.g.
<%= tag.div(class: user.active? ? "active block" : "block") do %>
Try Rails 6.1's token_list
(https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-token_list) which is built into the tag
helper (https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-tag):
<%= tag.div(class: ["block", "active" => user.active?]) do %>
=> More informations about this toot | View the thread
Things I depend on before I can switch to a new version of Ruby (with the recent 3.3.5 release as an example):
If it is a minor version bump (i.e. an ABI change), I also need a new rake-compiler-dock, e.g. https://github.com/rake-compiler/rake-compiler-dock/releases/tag/1.4.0
=> More informations about this toot | View the thread
@flavorjones have you had a look at https://github.blog/news-insights/product-news/introducing-artifact-attestations-now-in-public-beta/? I'm wondering if there's any application to native gems (especially now I see Homebrew is using it to verify their bottle downloads)...
=> More informations about this toot | View the thread
re2 2.13.0 is now out, upgrading the bundled version of RE2 to 2024-07-01: https://github.com/mudge/re2/releases/tag/v2.13.0
=> More informations about this toot | View the thread
re2 2.12.0 is now out, upgrading the bundled version of RE2 to 2024-06-01: https://github.com/mudge/re2/releases/tag/v2.12.0
=> More informations about this toot | View the thread
@flavorjones to be more specific, this is calling rake native:x86-linux
and rake native:x86_64-linux
via rake-compiler-dock: https://github.com/mudge/re2/blob/f71be8edaf5020ffc4d07ae615db997464410ae0/Rakefile#L63-L73
=> More informations about this toot | View the thread
@flavorjones have you seen any significant slowdown in x86-linux and x86_64-linux builds with rake-compiler-dock on GitHub Actions? I'm seeing builds that used to take 15 minutes now take an hour, e.g. https://github.com/mudge/re2/actions/runs/9339330214/job/25703554982
=> More informations about this toot | View the thread
Taking a leaf from Lara Hogan who celebrates significant career events with doughnuts (see https://larahogan.me/donuts/), I’ll be indulging in a huge vanilla slice today.
=> More informations about this toot | View the thread
Really spoilt for choice today for announcements from fruit-themed computer manufacturers: https://www.raspberrypi.com/news/raspberry-pi-connect/
=> More informations about this toot | View the thread
Glad to see a kids’ party bag snap bracelet really reinforcing the “reduce, reuse, recycle” message.
=> View attached media | View attached media
=> More informations about this toot | View the thread
It has been over a week so it must be time for some more #weeknotes: https://mudge.name/2024/04/21/weeknotes-105/
=> More informations about this toot | View the thread
It looks like you can now test arm64 darwin precompiled gems on GitHub if you explicitly use the macos-14
runner (which uses an M1), e.g. https://github.com/mudge/re2/actions/runs/8754448473/job/24026902080?pr=144 (cc @flavorjones).
=> More informations about this toot | View the thread
In retrospect, our four year old was too young to introduce to the Nintendo Switch but I have no regrets about his recent exposure to Eiffel 65’s “Blue (Da Ba Dee)”.
=> More informations about this toot | View the thread
Admittedly I didn't get a great night's sleep last night but discovering that ESLint 9 switches to an entirely new, backwards-incompatible configuration file format (see https://eslint.org/docs/latest/use/migrate-to-9.0.0#-new-default-config-format-eslintconfigjs) isn't doing my blood pressure any good.
(I understand as a developer that the siren song of fixing all the design decisions you regret is extremely hard to resist but how much collective time will now be spent rewriting configuration files so that things work as they did before?)
=> More informations about this toot | View the thread
=> This profile without reblog | Go to mudge@ruby.social account This content has been proxied by September (ba2dc).Proxy Information
text/gemini