Madeline's Blog

Wonder what she's doing...

Mastodon Projects GitHub Crates.io RSS

Traiting Harder

2026-02-01

Generating Trait impls with an Attribute Macro

#[template("post.html")]

Writing a crate that implements the trait described in the previous post and supplies a macro to make implementing that trait easier.

We'll make use of the syn and quote crates to write our macro, and deconstruct all the different parts of the macro so you can see how it works.

I Trait My Best, I Swear

2026-01-28

For web servers, my go-to framework for Rust has been Rocket, and my favourite templating library has been the mustache crate.

This post covers some interesting things I discovered when trying to write a helper trait for my projects.

Better Understanding HTMX by Building a Video Player

2026-01-27

I've been playing around with htmx in combination with Rust's Rocket for a while in some simple self-hosted projects. Recently however I realized that I still felt clumsy when implementing certain models and behaviours using htmx. Because so many people rave about the simplicity and expressiveness of htmx, I figured it was about time that I knuckle down and learn how to use htmx 'properly'.

To that end, I decided to implement a video player that progresses to the next video automatically.

An Erlang, A Cowboy, and A Mustache Walk Into A Bar

2025-12-18

Having just arrived at the ACT airport at 10:30AM for my flight at 6:30PM, I decided to try out another programming language. This time it's Erlang.

Given my current fascination with htmx, I though it a good idea to see if I could get a basic cowboy web server working with some HTML templating engine. We won't look at using htmx here but as templating is important for it, it seemed interesting enough to motivate me to learn Erlang

Soranoba's mustache library called bbmustache seemed the most approachable.

Code for this project can be found here.

The Bad Program I Use Everyday

2025-12-15

I edit a lot of code on the command line and as such find myself using the ESC and LEFTCTRL keys more than most. Because of this, I wrote a piece of software called key-remapper for remapping keys using evdev and uinput.

The problem is, it doesn't work. Well it does, but for some reason when my laptop starts up, none of my keys work until I hit enter.

Let's fix that.

First Go Project: HTMX Blog

2025-12-13

Source for this project can be found here

fmt.Println("Hello, HTMX!")

A very basic implementation of a markdown-based blog using htmx backed by Go.