Readit News logoReadit News
joemasilotti commented on Ruby already solved my problem   newsletter.masilotti.com/... · Posted by u/joemasilotti
skrebbel · a month ago
Unrelated side note, but I haven't written any Ruby in maybe 15 years or so and dammn I forgot how elegant the language is at its core. The author's AppVersion class is so nicely done, it's nuts how succinct eg the compare implementation is.

Having done mostly TypeScript and Elixir lately, I had forgotten things could be so succinct yet so clear. The combo of modern (to me) Ruby's lambda syntax (in the .map call), parentheses-less function calls, the fact that arrays implement <=> by comparing each item in order, that there's an overloadable compare operator at all, having multiple value assignments in one go... It all really adds up!

In any other language I can think of real quick (TS, Elixir, C#, Python, PHP, Go) a fair number of these parts would be substantially more wordy or syntaxy at little immediately obvious benefit. Like, this class is super concise but it doesn't trade away any readability at all.

Having learned Ruby before Rails became commonplace, with its love for things that automagically work (until they don't), I had kinda grown to dislike it. But had forgotten how core Ruby is just an excellent programming language, regardless of what I think of the Rails ecosystem.

joemasilotti · a month ago
> The author's AppVersion class is so nicely done, it's nuts how succinct eg the compare implementation is.

Why thank you! :D

joemasilotti commented on How to Draw a Space Invader   muffinman.io/blog/invader... · Posted by u/abdusco
joemasilotti · 4 months ago
This would be awesome as a random avatar generator!
joemasilotti commented on Bridge-components: A collection of bridge components for Hotwire Native apps   github.com/joemasilotti/b... · Posted by u/thunderbong
joemasilotti · 9 months ago
Creator here - thanks for posting! If anyone has any questions on the components or how to integrate them, I'm happy to help.

u/joemasilotti

KarmaCake day704February 11, 2015
About
I'm Joe Masilotti, the Hotwire Native guy! I help Ruby on Rails developers build web-powered iOS and Android apps with Hotwire Native.

https://masilotti.com joe@masilotti.com

View Original