Evil Martians, a product engineering consultancy, writes about Ruby on Rails, CSS, Docker, PostgreSQL and front-end practice.
HN commenters cite its OKLCH color article as changing their view of CSS color, and also point to its login form and Turbo Mount write-ups.
This is good advice!
> Use Docker layer caching on GitHub Actions or your favorite CI (https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching)
Since the time that article was written, BuildKit added native support for interacting with the GitHub Actions cache, so it's even easier than they describe:
- uses: docker/build-push-action@v4
with:
cache-from: type=gha
cache-to: type=gha,mode=max
Kyle actually wrote a blog post with more details if you're interested: https://depot.dev/blog/docker-layer-caching-in-github-actions
What has to happen with cache-to and cache-from is BuildKit has to create cache tarball files for each of the layers to be cached, then upload them to the remote cache destination. Then next build when there's a cache match, BuildKit downloads the tarballs from the remote store and un-tars them so that it can continue the build.
This process can be slow, from creating the tarballs, to transferring them over the network, to unpacking them again. This is one of the reasons we created Depot in the first place. We had several commercial projects with highly optimized Dockerfiles, where saving and loading cache to GitHub Actions took several minutes, representing a significant amount of the overall build time. We also wanted to use some more advanced Dockerfile features like `RUN --mount=type=cache` that are entirely unsupported in GitHub Actions.
With Depot, builds re-use the same persistent…
We're experiencing a global peak of Ruby meetups (globally). About 800-900 meetups in the last 12 months as per https://rubyconferences.org/meetups/ I'm hosting probably the largest Ruby meetup in San Francisco, see https://lu.ma/sfruby
Rails is not at the peak of visibility (like it was in 2008-2014), it is not a "default stack for new products" but here's what we see: Rails startup just did a large IPO (Chime), another Ruby startup filed for IPO (Figma) Rails startup just posted a record ARR growth (bolt.new)
Lots of startups and lots of success stories. See https://evilmartians.com/events/startups-on-rails-in-past-present-and-future
Again, not the #1 or "default" choice, which is probably a good thing, because we are past the hype+disappointment cycle and on the pragmatic side of things.
Docker builds are not slow if you do them properly
1. Add layers properly, so that, the most changing code appears towards bottom.
2. Use a builder pattern where you build in one image and then copy the output binary into the second image (https://ashishb.net/tech/docker-101-a-basic-web-server-displaying-hello-world/)
3. Use Docker layer caching on GitHub Actions or your favorite CI(https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching)
IMHO, hadolint is a good docker linter but there is no tool in the market that helps people optimize docker images.
The benefit of OKLCH is that it normalizes the colors to our perception. So a saturation % change in OKLCH is more of what we'd expect than in HSL. This is good for design systems that want to have a visually expected output after running it through a color function.
See the part on https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl#oklch-vs-hsl and notice the cut out in the right column. Now pretend to stretch those cutouts to fit the edges of the chart, you'll have a color gradient that is more uniform across the board versus the left where you have darker areas.
I'm more interested in the concept of ViewComponents than just the current library. It's really just starting with Rails adopting ActionCable and Phoenix using LiveView (which I see as both immature proto-concepts of the future of JS frontends).
This blog post (and my linked talk above) opened my eyes on the subject: https://evilmartians.com/chronicles/anycable-actioncable-on-steroids
Right now the complexity is a bit high on this approach^ and I personally just use a mix of Vue + Turbolinks/Rails at work for legacy/simplicity reasons. But I'm watching the space.
Going full solar and wind is going to take some time(20 year-ish?) and in the meantime energy storage will get there in terms of scale and cost.
LiFePO4 packs already started trading below $100/kWh in 2020:
https://evilmartians.com/chronicles/a-no-go-fantasy-writing-go-in-ruby-with-ruby-next
CATL is pushing sodium-ion batteries:
https://www.reuters.com/business/energy/catls-new-sodium-ion-battery-help-ease-lithium-shortages-2021-08-03/
You don't even need a lot of storage to greatly increase maximum stable solar and wind share.
Exiting times ahead of us.