@postmodern Does that mean Crystal does not have optional chaining?

@postmodern that does seem like something that would be in there. I would've tried about three different things before looking it up and finding out it didn't exist. 😂

Thing's I would've tried before googling:
hash1 & hash2
hash1.intersection(hash2)
hash1 - (hash1 - hash2)

But I guess if we want Hashes to work like Arrays...
(hash1.to_a & hash2.to_a).to_h

That seems like the most/least Ruby thing I've seen in awhile.

Did you know: If you give an LED enough power, it will continue to glow after the power is removed? This is the result of a phenomena called "Catching on fire" and it can only be done once.

I am regularly rocked by the revelation that there are people out there who click Web ads

Some guy: "Hey there Delilah, a thousand miles seems pretty far, but they've got planes and trains and cars"

Other guy who just walked 500 miles and then walked 500 more: "... they have WHAT!?"

@oz I didn't even realize a block could take kwargs. I've only seen them used in method definitions. That's pretty cool!

The best I could come up with was explicit destructuring:

a.each { ->(foo:, bar:) { puts "foo: #{foo}, bar: #{bar}" }.call **_1 }

Or pattern matching like you said:

a.each { _1 => {foo:, bar:}; puts "foo: #{foo}, bar: #{bar}" }

RT @websebdev@twitter.com

💎Rails tip💎

Did you know about template variants? Useful when you have let's say one view for admins and one for normal users. Or one for mobile and one for desktop (when the views are too different to just be responsive).

🐦🔗: twitter.com/websebdev/status/1

In which a shaded corner holds winter’s last fingertip, stories are my only escape, and I fail at optimism.

Show thread

Every time I have to use a browser without uBlock Origin installed, I lose a little faith in humanity. How can anyone even browse the web like that?!

do not be afraid of installing our app it only uses the official malware and is signed by a corporate robot automatically when it was uploaded to the official store so you know it is 100% safe. our app is so good for installing for being code running on your phone purposes that will benefit you by the functionality of the app (that you should install on your phone). Also our website with identical functionality boots you off of it when on your phone even though you can see an illusion of it working behind the undismissible link to install the app instead (the app which we made that you should install on your phone). Oh no the website is having issues (but have you tried to install our app, to your phone, where we can run the app code on your phone?). Anyways make sure to stay tuned because we may make more of the app (for installing, on your phone) with support for different website that are now also the app running code on you're phone) because we are having technical difficulties allowing you to instead not have to install the app on your phone, but do not worry we have an app that is (a phone app!) that you can install instead so that we are in your phone. It is comfier here on the phone, as an app.

permissions: your soul (install the app) (on your phone) (please) (install)

This is something I keep forgetting, but it never ceases to amaze me how the rise of SPAs was (probably) largely driven by pressure from native mobile iOS and Android apps. You refactor your server to emit JSON instead of HTML, and now suddenly you're like, "Well, I may as well use this same server output for my website." If web apps had been natively supported on iOS and Android, HTML probably would have been the lingua franca, and servers would still largely be emitting HTML.

..and five, five gold Rings were gifted to the Lords, who above all else desire leaping but they were, all of them, deceived, for another Ring was made.

In the Tree of Pear, the Partridge forged a master ring to control all others.

I just heard a little honk and was like, What notification was THAT, I do not recognize it, and turns out there was a literal goose outside

Today is a day for drinking coffee, cleaning the house, and watching Zatoichi movies.

@nilesh Forem is the best example I can think of for a more recent open source Rails project.

I know a few veteran Ruby devs who moved to Elixir, and some who moved to the frontend. It seems like lots of people move through several technologies in their career. It does seem like fewer new devs choose Ruby though.

Show older
Ruby.social

A Mastodon instance for Rubyists & friends