Posts by Tags

API

ActiveModel

Algorithm

Android

Architecture

Ask Hanami for the Model, Get Four Objects

4 minute read

There is no model generator in Hanami, and no scaffold either. What Rails calls a model turns out to be four separate jobs, and the framework makes you say w...

Hanami Froze the Door I Always Use

4 minute read

I am building a real app in Hanami 3 with twenty years of Rails habits, on purpose, to find out where those habits stop working. The very first one broke ins...

Arduino

Not Every Curve Belongs in Sand

3 minute read

Another CrunchLabs kit took over an evening: a sand table that drags a ball through sand on a polar arm. I added a few parametric math patterns, and the inte...

I Taught My Label Maker to Draw

8 minute read

I live in Ruby, Elixir and Emacs. A CrunchLabs label maker landed on my desk, I opened the firmware to fix two small annoyances, and it turned into a pocket ...

Auth

Best Practices

How to use infinity in your code

less than 1 minute read

You’ll sometimes have to use the notion of infinity in your Ruby code. There isn’t any way to directly use infinity in Ruby, at least none that I know of… Bu...

Default stack for Ruby projects

8 minute read

Having a clear and well-defined default stack when you start a new project is a good thing — it will have an impact on your productivity and happiness. I’ll ...

Blocks

Blocks, Procs, and Lambdas in Ruby

7 minute read

Blocks are everywhere in Ruby: every each, map, and File.open relies on them. Treat blocks, procs and lambdas as one idea and the iterator methods you use da...

C++

Not Every Curve Belongs in Sand

3 minute read

Another CrunchLabs kit took over an evening: a sand table that drags a ball through sand on a polar arm. I added a few parametric math patterns, and the inte...

I Taught My Label Maker to Draw

8 minute read

I live in Ruby, Elixir and Emacs. A CrunchLabs label maker landed on my desk, I opened the firmware to fix two small annoyances, and it turned into a pocket ...

CLI

Thor - a command-line scripting tool

5 minute read

Thor is a simple and efficient tool for building self-documenting command line utilities. I’m a shell guy, I use a terminal everyday and most of my job is do...

Closures

Blocks, Procs, and Lambdas in Ruby

7 minute read

Blocks are everywhere in Ruby: every each, map, and File.open relies on them. Treat blocks, procs and lambdas as one idea and the iterator methods you use da...

Concurrency

The Page That Never Came Back

6 minute read

Replying to a process that has died costs nothing and tells you nothing. In a pool that lends out browser pages, that silence cost me a page every time it ha...

Creative Coding

Not Every Curve Belongs in Sand

3 minute read

Another CrunchLabs kit took over an evening: a sand table that drags a ball through sand on a polar arm. I added a few parametric math patterns, and the inte...

I Taught My Label Maker to Draw

8 minute read

I live in Ruby, Elixir and Emacs. A CrunchLabs label maker landed on my desk, I opened the firmware to fix two small annoyances, and it turned into a pocket ...

DSL

Writing a DSL in Ruby

5 minute read

An internal DSL is just Ruby that reads like a little language of its own. RSpec, Rake and Sinatra are all built this way. Here’s how to build one yourself, ...

Debug

The Tooltip That Signed Me Out

6 minute read

My agent decided my Amazon session had expired while looking at a page Amazon only serves to people who are signed in. The culprit was a hidden tooltip, and ...

Design

Politely Ignored

5 minute read

My MCP server answered tools/list, validated every argument it was handed, and went completely unused. The model preferred its own browser extension, and not...

The Tooltip That Signed Me Out

6 minute read

My agent decided my Amazon session had expired while looking at a page Amazon only serves to people who are signed in. The culprit was a hidden tooltip, and ...

Doom Emacs

ET

Earth

Editor

Emacs Tramp lag and timeout

3 minute read

You’re experiencing excessive lag and timeouts when using Tramp on remote servers through SSH. Here is the solution to one of the most common cause.

How to solve Textmate slowdown on focus

1 minute read

On Friday I was having slowdowns on Textmate focus. I never had this problem before and this “bug” was only happening on this given project. I had to wait fo...

Elasticsearch

Elixir

Politely Ignored

5 minute read

My MCP server answered tools/list, validated every argument it was handed, and went completely unused. The model preferred its own browser extension, and not...

The Tooltip That Signed Me Out

6 minute read

My agent decided my Amazon session had expired while looking at a page Amazon only serves to people who are signed in. The culprit was a hidden tooltip, and ...

The Page That Never Came Back

6 minute read

Replying to a process that has died costs nothing and tells you nothing. In a pool that lends out browser pages, that silence cost me a page every time it ha...

What a Port Doesn’t Give You

6 minute read

My agent drives a headless browser through a Node process held by a Port. Two guarantees I take for granted in Elixir stop at that boundary, and one of them ...

Let It Crash Stops at stdin

7 minute read

I have been building a personal agent as an MCP server in Elixir, and the transport turned out to be the interesting part. A single malformed request killed ...

The State of Typing in Elixir

3 minute read

Elixir is dynamically typed, but ‘typing in Elixir’ now spans three things: the runtime shape you get from pattern matching and structs, optional typespecs c...

Building an Elixir API with Plug Only

3 minute read

You don’t always need Phoenix. For a small API, Plug alone gives you full control over requests and responses with almost no machinery. Here’s a JSON endpoin...

Emacs

shpaste: a paste.sr.ht Client for Emacs

2 minute read

shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...

Using auth-source in a Real Emacs Package

9 minute read

When an Emacs package needs an API token, the easy path is to introduce a custom variable and let users store the secret in their configuration. shpaste take...

Emacs Tramp lag and timeout

3 minute read

You’re experiencing excessive lag and timeouts when using Tramp on remote servers through SSH. Here is the solution to one of the most common cause.

Evil

Full-Text Search in Rails with PostgreSQL

3 minute read

Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...

GPG

Game Dev

I Built a Roblox Game Just to Try

11 minute read

On a whim I tried building a Roblox game in Luau, far from my usual Ruby, Elixir and Emacs, and found a real, typed, test-driven codebase hiding behind the t...

GenServer

The Page That Never Came Back

6 minute read

Replying to a process that has died costs nothing and tells you nothing. In a pool that lends out browser pages, that silence cost me a page every time it ha...

Git

Gnus

Hanakai

Declaring belongs_to Changed Nothing

3 minute read

Hanami has belongs_to, and it reads exactly like the Rails one. I declared it, ran my test again, and got a failure identical to the one I had before declari...

Ask Hanami for the Model, Get Four Objects

4 minute read

There is no model generator in Hanami, and no scaffold either. What Rails calls a model turns out to be four separate jobs, and the framework makes you say w...

Hanami Froze the Door I Always Use

4 minute read

I am building a real app in Hanami 3 with twenty years of Rails habits, on purpose, to find out where those habits stop working. The very first one broke ins...

Hanakai, and Hanami 3.0 in Full Bloom

3 minute read

Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...

Hanami

Declaring belongs_to Changed Nothing

3 minute read

Hanami has belongs_to, and it reads exactly like the Rails one. I declared it, ran my test again, and got a failure identical to the one I had before declari...

Ask Hanami for the Model, Get Four Objects

4 minute read

There is no model generator in Hanami, and no scaffold either. What Rails calls a model turns out to be four separate jobs, and the framework makes you say w...

Hanami Froze the Door I Always Use

4 minute read

I am building a real app in Hanami 3 with twenty years of Rails habits, on purpose, to find out where those habits stop working. The very first one broke ins...

Hanakai, and Hanami 3.0 in Full Bloom

3 minute read

Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...

Hanami 2 Is Finally Full-Stack

3 minute read

Hanami 2 arrived in three acts: the app rewrite in 2.0, views in 2.1, and a full ROM-based database layer in 2.2. With that last piece, it’s a complete full-...

Using I18n with Hanami

1 minute read

Last week I wrote about settings up Sikekiq in Hanami. Another gem I often use is I18n since it allows to localize strings and keep them separated from my co...

Using Sidekiq with Hanami

3 minute read

One of the gems I often use in my Ruby on Rails projects is Sikekiq. For those of you who don’t know about it, it allows to easily manage background processes.

Hardware

Not Every Curve Belongs in Sand

3 minute read

Another CrunchLabs kit took over an evening: a sand table that drags a ball through sand on a polar arm. I added a few parametric math patterns, and the inte...

I Taught My Label Maker to Draw

8 minute read

I live in Ruby, Elixir and Emacs. A CrunchLabs label maker landed on my desk, I opened the firmware to fix two small annoyances, and it turned into a pocket ...

I18n

Translating ActiveRecord data using JSON

4 minute read

Following the mass and using de-facto libraries isn’t always the best choice. Here are some thoughts about handling translation of data stored in database wh...

Using I18n with Hanami

1 minute read

Last week I wrote about settings up Sikekiq in Hanami. Another gem I often use is I18n since it allows to localize strings and keep them separated from my co...

IA

JSON-RPC

Let It Crash Stops at stdin

7 minute read

I have been building a personal agent as an MCP server in Elixir, and the transport turned out to be the interesting part. A single malformed request killed ...

Lib

LiveView

Logging

Luau

I Built a Roblox Game Just to Try

11 minute read

On a whim I tried building a Roblox game in Luau, far from my usual Ruby, Elixir and Emacs, and found a real, typed, test-driven codebase hiding behind the t...

MCP

Politely Ignored

5 minute read

My MCP server answered tools/list, validated every argument it was handed, and went completely unused. The model preferred its own browser extension, and not...

The Tooltip That Signed Me Out

6 minute read

My agent decided my Amazon session had expired while looking at a page Amazon only serves to people who are signed in. The culprit was a hidden tooltip, and ...

Let It Crash Stops at stdin

7 minute read

I have been building a personal agent as an MCP server in Elixir, and the transport turned out to be the interesting part. A single malformed request killed ...

Mac OS

Metaprogramming

Writing a DSL in Ruby

5 minute read

An internal DSL is just Ruby that reads like a little language of its own. RSpec, Rake and Sinatra are all built this way. Here’s how to build one yourself, ...

How Ruby Finds a Method

5 minute read

Every method call in Ruby is a search. Once you can see the chain the interpreter walks (modules, prepends, singleton classes, super), the object model turns...

Node.js

What a Port Doesn’t Give You

6 minute read

My agent drives a headless browser through a Node process held by a Port. Two guarantees I take for granted in Elixir stop at that boundary, and one of them ...

OS X

Pow using rbenv

2 minute read

Couple weeks ago I switched from RVM to rbenv because I think it’s a cleaner and faster way to handle Ruby versions. It is more respecful of the Unix philoso...

OTP

The Page That Never Came Back

6 minute read

Replying to a process that has died costs nothing and tells you nothing. In a pool that lends out browser pages, that silence cost me a page every time it ha...

What a Port Doesn’t Give You

6 minute read

My agent drives a headless browser through a Node process held by a Port. Two guarantees I take for granted in Elixir stop at that boundary, and one of them ...

Let It Crash Stops at stdin

7 minute read

I have been building a personal agent as an MCP server in Elixir, and the transport turned out to be the interesting part. A single malformed request killed ...

Object model

How Ruby Finds a Method

5 minute read

Every method call in Ruby is a search. Once you can see the chain the interpreter walks (modules, prepends, singleton classes, super), the object model turns...

Open Source

shpaste: a paste.sr.ht Client for Emacs

2 minute read

shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...

Performance

Phoenix

Plug

Building an Elixir API with Plug Only

3 minute read

You don’t always need Phoenix. For a small API, Plug alone gives you full control over requests and responses with almost no machinery. Here’s a JSON endpoin...

Ports

What a Port Doesn’t Give You

6 minute read

My agent drives a headless browser through a Node process held by a Port. Two guarantees I take for granted in Elixir stop at that boundary, and one of them ...

PostgreSQL

Full-Text Search in Rails with PostgreSQL

3 minute read

Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...

ROM

Declaring belongs_to Changed Nothing

3 minute read

Hanami has belongs_to, and it reads exactly like the Rails one. I declared it, ran my test again, and got a failure identical to the one I had before declari...

Rails

Rails 8 Wants You to Own Your Stack

3 minute read

Rails 8 isn’t really a bag of new methods. Its headline is a stance: drop Redis, drop the PaaS, and run a real app from a single box you own — with the datab...

Practical Service Objects in Ruby

2 minute read

Service objects keep business logic out of fat controllers and models. A handful of conventions (one entry point, a consistent return value, a simple constru...

Full-Text Search in Rails with PostgreSQL

3 minute read

Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...

The Rails 7.1 Features I Actually Reach For

2 minute read

Rails 7.1 isn’t a headline release. It’s a pile of quality-of-life additions that quietly remove boilerplate you write all the time — normalizing attributes,...

Rails console tips

5 minute read

Knowing how to use the Rails console can be very useful when debugging or trying your snippets. Being proficient with it will increase your productivity.

Translating ActiveRecord data using JSON

4 minute read

Following the mass and using de-facto libraries isn’t always the best choice. Here are some thoughts about handling translation of data stored in database wh...

Release

Roblox

I Built a Roblox Game Just to Try

11 minute read

On a whim I tried building a Roblox game in Luau, far from my usual Ruby, Elixir and Emacs, and found a real, typed, test-driven codebase hiding behind the t...

Ruby

Declaring belongs_to Changed Nothing

3 minute read

Hanami has belongs_to, and it reads exactly like the Rails one. I declared it, ran my test again, and got a failure identical to the one I had before declari...

Ask Hanami for the Model, Get Four Objects

4 minute read

There is no model generator in Hanami, and no scaffold either. What Rails calls a model turns out to be four separate jobs, and the framework makes you say w...

Hanami Froze the Door I Always Use

4 minute read

I am building a real app in Hanami 3 with twenty years of Rails habits, on purpose, to find out where those habits stop working. The very first one broke ins...

Writing a DSL in Ruby

5 minute read

An internal DSL is just Ruby that reads like a little language of its own. RSpec, Rake and Sinatra are all built this way. Here’s how to build one yourself, ...

Blocks, Procs, and Lambdas in Ruby

7 minute read

Blocks are everywhere in Ruby: every each, map, and File.open relies on them. Treat blocks, procs and lambdas as one idea and the iterator methods you use da...

How Ruby Finds a Method

5 minute read

Every method call in Ruby is a search. Once you can see the chain the interpreter walks (modules, prepends, singleton classes, super), the object model turns...

Hanakai, and Hanami 3.0 in Full Bloom

3 minute read

Hanami, dry and rom have joined forces as Hanakai, a single family of Ruby tools. The first release under that banner is Hanami 3.0: built-in mailers and i18...

Rails 8 Wants You to Own Your Stack

3 minute read

Rails 8 isn’t really a bag of new methods. Its headline is a stance: drop Redis, drop the PaaS, and run a real app from a single box you own — with the datab...

Five dry-rb Gems Worth Knowing

2 minute read

A short tour of five dry-rb gems I keep coming back to: validation, types, structs, configuration, and composable business logic. Small, focused libraries th...

Practical Service Objects in Ruby

2 minute read

Service objects keep business logic out of fat controllers and models. A handful of conventions (one entry point, a consistent return value, a simple constru...

Full-Text Search in Rails with PostgreSQL

3 minute read

Before reaching for Elasticsearch, it’s worth knowing that PostgreSQL has capable full-text search built in. Here’s how to use it from a Rails app — tokenizi...

Hanami 2 Is Finally Full-Stack

3 minute read

Hanami 2 arrived in three acts: the app rewrite in 2.0, views in 2.1, and a full ROM-based database layer in 2.2. With that last piece, it’s a complete full-...

The Rails 7.1 Features I Actually Reach For

2 minute read

Rails 7.1 isn’t a headline release. It’s a pile of quality-of-life additions that quietly remove boilerplate you write all the time — normalizing attributes,...

Creating a deeply nested Hash in Ruby

3 minute read

Sometimes you’ll have to create a deeply nested hash without knowing how deep it can be at first. This hash should allow reading and setting values at any le...

Ruby one-liners for file manipulations

10 minute read

Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...

RubyMotion

Downgrading RubyMotion

1 minute read

Sometimes after upgrading RubyMotion I face some bugs introduced in the new release. It can be bugs which can easily be worked around or really annoying bugs...

SSH

Emacs Tramp lag and timeout

3 minute read

You’re experiencing excessive lag and timeouts when using Tramp on remote servers through SSH. Here is the solution to one of the most common cause.

Security

Using auth-source in a Real Emacs Package

9 minute read

When an Emacs package needs an API token, the easy path is to introduce a custom variable and let users store the secret in their configuration. shpaste take...

Service Objects

SourceHut

shpaste: a paste.sr.ht Client for Emacs

2 minute read

shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...

Streams

SysAdmin

Ruby one-liners for file manipulations

10 minute read

Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...

Pow using rbenv

2 minute read

Couple weeks ago I switched from RVM to rbenv because I think it’s a cleaner and faster way to handle Ruby versions. It is more respecful of the Unix philoso...

Tips

Creating a deeply nested Hash in Ruby

3 minute read

Sometimes you’ll have to create a deeply nested hash without knowing how deep it can be at first. This hash should allow reading and setting values at any le...

Ruby one-liners for file manipulations

10 minute read

Most people using Ruby nowdays are using it for Rails. They often defined themselves has ‘Rails developers’, not ‘Ruby developers’. I’m an early adopter of R...

How to use infinity in your code

less than 1 minute read

You’ll sometimes have to use the notion of infinity in your Ruby code. There isn’t any way to directly use infinity in Ruby, at least none that I know of… Bu...

Encapsulate a code block in an object

3 minute read

Ruby is a very dynamic language which allows you to do things like encapsulate a piece of code in an object. This is a really powerful capability you can use...

Typing

The State of Typing in Elixir

3 minute read

Elixir is dynamically typed, but ‘typing in Elixir’ now spans three things: the runtime shape you get from pattern matching and structs, optional typespecs c...

Vim

Web

auth-source

Using auth-source in a Real Emacs Package

9 minute read

When an Emacs package needs an API token, the easy path is to introduce a custom variable and let users store the secret in their configuration. shpaste take...

dry-rb

Five dry-rb Gems Worth Knowing

2 minute read

A short tour of five dry-rb gems I keep coming back to: validation, types, structs, configuration, and composable business logic. Small, focused libraries th...

macOS

mailto

mu4e

shpaste

shpaste: a paste.sr.ht Client for Emacs

2 minute read

shpaste is a small Emacs client for paste.sr.ht. Create a paste from a region or a whole buffer, get the URL straight in your kill-ring, and browse or delete...