Toots for mudge@ruby.social account

Written by mudge on 2024-12-18 at 19:32

[#]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

Written by mudge on 2024-11-08 at 07:13

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

Written by mudge on 2024-10-31 at 16:24

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

Written by mudge on 2024-10-01 at 16:03

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

Written by mudge on 2024-09-25 at 15:53

I’m obviously biased but it is pretty incredible this is an entire computer. (Other single-board computers are available.)

=> View attached media

=> More informations about this toot | View the thread

Written by mudge on 2024-09-20 at 15:58

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

Written by mudge on 2024-09-19 at 08:31

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

Written by mudge on 2024-09-06 at 11:21

Things I depend on before I can switch to a new version of Ruby (with the recent 3.3.5 release as an example):

  1. A new version of setup-ruby, e.g. https://github.com/ruby/setup-ruby/pull/634

  1. A new version of cimg/ruby, e.g. https://github.com/CircleCI-Public/cimg-ruby/pull/181

  1. A new version of the Docker ruby image, e.g. https://github.com/docker-library/ruby/commit/04175a1c782da7183d8cd1ebed8c91b3ce0fe50b

  1. An update to ruby-versions, e.g. https://github.com/postmodern/ruby-versions/commit/b056b8beafc944b55346762b20928c9bf851c360

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

Written by mudge on 2024-08-01 at 10:16

@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

Written by mudge on 2024-06-30 at 19:00

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

Written by mudge on 2024-06-03 at 12:48

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

Written by mudge on 2024-06-02 at 17:04

@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

Written by mudge on 2024-06-02 at 16:56

@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

Written by mudge on 2024-05-08 at 10:42

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.

=> View attached media

=> More informations about this toot | View the thread

Written by mudge on 2024-05-07 at 18:14

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

Written by mudge on 2024-04-23 at 07:10

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

Written by mudge on 2024-04-21 at 13:37

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

Written by mudge on 2024-04-19 at 13:51

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

Written by mudge on 2024-04-12 at 10:41

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

Written by mudge on 2024-04-08 at 12:56

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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/109325503348506850/reblog
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
393.173257 milliseconds
Gemini-to-HTML Time
11.173456 milliseconds

This content has been proxied by September (ba2dc).