RSSAmplifier

Blog

katafrakt’s garden

Just my website. Some Elixir, some Ruby, some more exotic languages and general thoughts on tech.

katafrakt.meRSS feed ↗10 posts

Latest posts

What if Hanami had templateless views?

In the new glorous website of Hanakai there are two “getting started” guides for Hanami: one for a “web app” (meaning, a fullstack app) and one for an API app. Even though those two guides follow building the same application (bookshelf), they differ quite a bit in places. Sometimes it’s absolutely justified (you don’t have HTML templates in API app), sometimes it feels justified, but can also…

Untimely feedback as a root cause of tech debt

Have you ever worked on a brand new codebase with talented engineers, only to find out a year later that it turned into the same “archaeological strata of quick fixes” as your last legacy project? I know I have, and it happened many times. My go-to blame target for this was usually micromanagement and imposed unrealistic deadlines. And I’m sure these play a significant role in it. But a recent…

Portable mruby binaries with Cosmopolitan

One of my main interests with mruby is its ability to create standalone executables. As explored in this post , this is absolutely possible and works well. However, there is a classic issue of most standalone binaries: they can only be run on the same, or very similar, system as the one they were built on. For example, if I take an executable from my mruby Hello World project , built on amd64…

Using Elixir head version with Mise

In 2025 I followed the direction many people headed in and switched my version manager to mise-en-place . It has been going really well for me, but recently I came across a problem which took me a bit to figure out (and few very frustrating conversations with LLM, which did not lead to anything). I wanted to test some code with unreleased version 1.20 of Elixir, straight from git. How to do it?…

Integrating Pagy with Hanami (2025 edition)

Back in 2018 I wrote a post about connecting Hanami (then 1.x) and Pagy gem together. My verdict was not that favorable. I had to write quite a lot of glue code to make it work and perhaps the worst thing was that I had to pass the request object to the template to make it work. However, things have changed since then: Hanami is now 2.3, its persistence layer is more mature, based on ROM and…

Eglot, Ruby LSP and StandardRB

I use Doom Emacs as my main coding editor, and eglot for language server shenanigans. My config is mainly optimized towards Elixir, so for Ruby I was mostly using the default Doom’s Ruby module. It worked pretty well for me. The main hurdle was always projects not using Rubocop. I prefer StandardRB , because I don’t like bike-shedding, and their defaults are really good for me. But in the absence…

My OCaml-flavoured Elixir style

Recently I’m finding myself leaning towards writing some Elixir code in a bit different way than the community standard. I call it, perhaps unjustly and a bit tongue-in-cheek, “OCaml-flavoured Elixir”. Now, I don’t really write OCaml well (or: at all), but I spent last 3 years working with a frontend written in ReScript . And I think in recent months it started to affect how I think about the…

Micro-slices in Hanami

Slices are my favourite architectural feature in Hanami. They allude to the vertical slices architecture and let you host cross-functional “mini-apps” within your main Hanami project The feature itself is present from early days of Hanami, perhaps from the times when it was still called Lotus. Back then it was called apps . . A typical slice file structure (generated by Hanami slice generator)…

Ecto, on_replace and deferred checks

Today I learned a valuable lesson about how a seemingly simple task can have very rough edge cases, which take hours to solve. It involved Ecto, its associations and on_replace option, and uniqueness checks in the database. Here’s the story. The problem Let’s say you are modelling some kind of processes. These processes have steps and the steps have to be executed in a precise order. This is how a…

Putting Hanami in the browser via WASM

The other day I was loosely listening to a Code and the Coding Coders who Code it podcast episode with Vladimir Dementyev. He was talking about his work around putting Ruby on Rails into the browser to lower the entry barrier for folks who just want to “feel” it, but witohut going through the struggle of choosing a correct Ruby version manager, installing dependencies for gems with C extensions…