Discover more from Naming Things
Hey everyone, it’s been a while since I wrote anything here, so here’s a quick update on a few things I’ve got going on:
I left Twitter
I’ve been on Twitter for years and years, but it’s changed beyond recognition since Elon took over. It’s not a healthy place for me any more, so I’ve left. Rather than deleting my account — which would allow someone else to take my username — I deleted my tweets with Tweet Deleter and took my account private.
I’ve joined a growing community of Rubyists on the Ruby Social Mastodon instance, and I’m using the Elk web client, which I highly recommend. You might have tried and given up on Mastodon before it reached critical mass — I did. But it’s very different now and with clients like Elk and (soon) Ivory, the user experience has come a long way. You might want to give it another shot and follow me.
I released Phlex 1.2
This release brings a bunch of ergonomic improvements, as well as a new experimental take on “slots.” The pattern is called DeferredRender and it allows you to render slots multiple times or out-of-order, which is not possible with the simpler builder-style pattern. I put some examples of both styles in the release notes.
I paired up with Marco to work on Phlexing
Working on a project to convert a medium-sized app from ActionView and ViewComponent to 100% Phlex views, I quickly released an ERB → Phlex converter would be critical to adoption and ultimately sustainability of the framework.
Marco Roth invited me to collaborate on Phlexing, a gem and web app he’s been building for just that. The biggest challenge has been finding a parser that understands ERB and HTML correctly. We’re now using a combination of Deface, Nokogiri and Syntax Tree, which seems to cover most of what we need.
This project is going to be my main focus for the next few weeks.
I released Literal Enums 2.0
Literal Enums is partly a meta-programming playground and partly a serious library with powerful features. In 2.0, the syntax is even more concise, enumeration classes and members are frozen automatically, and performance is significantly improved.
I adopted Memoize
I’m a big fan of memoization, and I’ve suggested that attr_reader should take an optional block to calculate the initial value of the attribute — prototyped here. But beyond that, I also like the idea of memoizing a method that takes arguments. The memoize gem does exactly that, though one risk is the cache can grow infinitely large. To tackle this, I plan to introduce a new cache with least-recently-used eviction and other improvements.
I’m writing a book
I announced that I’m working on a book about meta-programming, library development and advanced interface design in Ruby. If you’re subscribed to this newsletter already, that will be the best way to find out when the beta is ready.
I started a podcast
Collin Donnell and I started a new podcast called Rooftop Ruby. We published our first episode on Saturday, and we’re recording the next episode tonight. Please check it out and let us know what you think.
I’m still looking for work
I’m still unemployed since I was laid off by Shopify back in July. I’ve loved working on open source full-time and wish I could continue, but it’s pretty unsustainable. If you are hiring or looking for a Ruby contractor, please drop me an email.