Hello, I'm Hexagon
I've been building things for the web since 1996, and releasing them as open source for most of that time. My best-known project is Croner, a cron scheduler that started in JavaScript and now exists for Rust, Python, .NET and C++, all following the Open Cron Pattern Standard. Lately I've been working on rootcard, a federated identity where the server never sees your password, and Murmo, an end-to-end encrypted messenger built on top of it.
The blog covers what I happen to be working on: Rust and JavaScript, runtimes like Deno, Linux servers, security and identity, and letting AI help out with the day-to-day running of things. I'm all about Open Source, portable code and minimal bloat.
Looking for something longer? Check out the series The guide to Rust, The guide to JavaScript and SSH keys and passwordless login.
This blog is built using ombryt, a static site generator I wrote in Rust, and the source code is available at github.com/hexagon/blog.
Recent posts
Talking to my servers, and letting them take notes
by Hexagon,
I have a couple of servers that I care about. Each was set up by me, at some point, in a hurry, and each has its own little surprises. These days I mostly just talk to them. Claude runs on each of them, and writes down what it learns, so it knows a bit more the next time.
One cron pattern, five languages: Croner and OCPS
by Hexagon,
Croner started as a small cron library for JavaScript. It then got a Rust version, and recently Python and .NET versions. Now there is a fifth one, for C++. Five libraries that should answer the same question in the same way: when does 0 0 L * FRI run next? That turned out to be the easy part. The hard part was deciding what the right answer is.
Murmo bots: Letting Claude tap me on the shoulder
by Hexagon,
A few days ago I wrote about Murmo, the end-to-end encrypted messenger built on rootcard. Since then it has learned a new trick: bots. Any program can now write with Murmo users over plain HTTPS. And the first program I wanted to hook up was Claude, so it can tell me when it is done instead of me checking every five minutes.
Croner for Python and .NET: Stable releases
by Hexagon,
Croner started as a cron library for JavaScript, and later got a Rust version. It is now also available for Python and .NET, and both have reached their first stable releases.
Murmo: A secure messenger that is still just a messenger
by Hexagon,
So, there I was, with an identity system that I had just built for a space game. A login where the password never leaves the browser, and an account that belongs to the user instead of the server. I kept thinking that it would fit something else even better: a messenger. I had played with that idea once before, just for fun, a long time ago. This time I wanted to do it properly, and the result is Murmo.
rootcard: A new take on the password login, and an ID card for the web
by Hexagon,
So, there I was, with a game server where anyone could log in with just a name. The game is Xigna, a space MMO I'm building, and it needed real accounts. That should be easy. Hash the password, store the hash, add a reset by e-mail, done. But the more I looked at it, the less I liked it. A couple of weeks later I had built rootcard instead.
Modules, Cargo and Testing in Rust
by Hexagon,
So far, everything has lived in a single file. Real projects need more structure. In this article, we'll split code into modules, add crates from crates.io, and write tests, all with the tools that come with Rust.
Lifetimes in Rust
by Hexagon,
Sooner or later, you'll see something like <'a> in Rust code, and wonder what it means. Lifetimes are how Rust makes sure that references never point to data that's gone. Most of the time they're invisible, but when they show up, it helps to know what they say.
Concurrency in Rust
by Hexagon,
In the JavaScript guide, we learned that JavaScript runs your code on a single thread. Rust doesn't have that limit. You can run code on every core of your CPU, and the ownership rules you've learned make sure that threads can't step on each other's data. The Rust community calls it fearless concurrency.
Traits and Generics in Rust
by Hexagon,
Traits describe what a type can do, and generics let you write code that works with any type that can do it. Together, they're how Rust shares behavior between types, instead of inheritance. Let's see how they fit together.
Error Handling in Rust
by Hexagon,
Rust has no exceptions. Instead, functions that can fail say so in their return type, and the compiler makes sure the caller deals with it. In this article, we'll look at panics, the Result type, the question mark operator, and how to make your own error types.
Enums and Pattern Matching in Rust
by Hexagon,
Enums in Rust are far more powerful than in most languages. Combined with match, they let you describe exactly which states your data can be in, and make the compiler check that you've handled every one of them. This is also where we meet Option, Rust's answer to null.
Collections, Iterators and Closures in Rust
by Hexagon,
Most programs work with lists of things. In this article, we'll look at Rust's most common collections, Vec and HashMap, and at iterators and closures, which let you process data in a way that'll feel familiar if you've used map and filter in JavaScript.
Structs and Methods in Rust
by Hexagon,
Structs let you bundle related data together under one name, and give it your own type. Add methods, and you have something that works a lot like objects and classes in other languages, but without inheritance. Let's build some.
Strings and Numbers in Rust
by Hexagon,
In this post, we'll explore text and numbers in Rust. Why are there two string types? Why can't you get the third letter of a string with text[2]? And what happens when an integer gets too big? Let's find out.
Ownership and Borrowing in Rust
by Hexagon,
Ownership is the one big idea that makes Rust different from other languages. It's how Rust manages memory without a garbage collector, and how it prevents a whole family of bugs before your program even runs. It takes a while to get used to, so take your time with this one.
Functions in Rust
by Hexagon,
Functions bundle code into reusable pieces. In Rust, they also are where the type system shows up the most, as every parameter and return value has a type that is written out. Let's look at how they work, and at the difference between statements and expressions.
The Guide to Rust - Introduction
by Hexagon,
The aim of this series is to give a solid understanding of Rust, from the very first line of code to ownership, traits and threads. We'll stick to the standard library, and focus on the parts of the language you'll use every day. No prior Rust experience is needed, but it helps if you have written some code before, in any language.
Fundamental Concepts of Rust
by Hexagon,
In this section we'll cover the key elements that are essential to working with Rust. We'll look at variables, mutability, the basic types, and how to print things while you debug. Let's dive in!
Control Flow in Rust
by Hexagon,
Control flow decides which code runs, and how many times. Rust has the usual suspects, if and loops, but with a twist: almost everything is an expression that gives back a value. Let's see what that means.