Event Sourcing in Haskell with Eventium

I've been building a Haskell library called eventium — a typed, composable event-sourcing and CQRS library. It started as a fork of the abandoned eventful project, modernized for GHC 9.10+ and reshaped around a cleaner set of abstractions.

Event sourcing is one of those ideas that sounds straightforward until you try to implement it properly. State is derived from a sequence of events, not stored directly. That constraint forces clarity — but it also raises a lot of questions about how projections, commands, and aggregates should fit together.

This post walks through building a small banking system using eventium v0.2.1, covering each abstraction as we need it.

GADTs in Haskell

If you've spent any time reading Haskell code, you've probably run into GADTs — Generalized Algebraic Data Types. Maybe you've seen the {-# LANGUAGE GADTs #-} pragma at the top of a file and moved on. Maybe you've read an explanation or two and thought "okay, but when would I actually need this?"

This post builds up to GADTs step by step. We'll start with a problem, try the obvious fix, watch it fail, and then see how GADTs solve it cleanly. By the end, we'll also look inside to see what GHC is actually doing.

Managing MikroTik RouterOS with Nix

My home network runs on a MikroTik router. It's a capable piece of hardware with a powerful but deeply imperative configuration system. RouterOS gives you a CLI, a GUI (WinBox), and a scripting language that feels like it was designed for a world where "just SSH in and change it" is a valid way to operate.

For a while, that was exactly what I did. Then I tried to bring the same declarative thinking I use for everything else to my router. It took three attempts to get it right.

1 Year on Nix

For eight years, Ubuntu was my home. I knew the system inside out — or at least I thought I did. I had a dotfiles repo, a symlink manager, and a comfortable routine. Everything was version controlled. Everything was under control.

It wasn't.

Getting Started with Haskell

Haskell is a purely functional programming language known for its strong static type system, lazy evaluation, and mathematical elegance. In this post, we will walk through the basics that make Haskell a great choice for building reliable software.