Plurrrr

a tumblelog
Fri 26 Mar 2021

Plurrrr Turns Two

Today it's two years ago that I wrote the first post for this tumblelog. Since then it has mostly been a link blog with here and there a post of my own hand. It has not always been easy to find links that I think are great. Sometimes it takes me quite some time browsing Hacker News. But I like to do this, and learn a lot doing so.

The Friendly Tabby

On my way to school, to pick up Adam, I encountered a tabby. When I called the cat it jumped on a nearby metal box and made clear it wanted to be petted, which I did.

The friendly tabby
The friendly tabby.

The magical applications of Zero-Sized Types in Rust

Rust has the concept of zero-sized types, or ZSTs for short. These are types that hold no information as part of their layout. A common misconception, however, is that this makes them trivial. Rather, they offer the necessary properties for a complex interactions between the type system and values. In the following text I will explore how they give rise to mathematical reasoning within Rust, but also show how this provides concrete application. We will work around restrictions in Rust's trait system, or show how libraries can side-step long-term commitments to single dependencies without breaking changes according to Semantic Versioning.

Source: The magical applications of Zero-Sized Types in Rust.