Steve Klabnik

“The most violent element in society is ignorance.” - Emma Goldman

Page 4

Fire Mario, not Fire Flowers

My post yesterday got a lot of great responses. Two of them are from people I greatly respect, Dave Herman and Graydon Hoare. You should go read those two posts; this one is in response to them. I’m going to respond to both at the same time by mixing them together.

Graydon says:

Safety in the systems space is Rust’s raison d'être. Especially safe concurrency (or as Aaron put it, fearless concurrency). I do not know how else to put it.

“Fearless concurrency” is a different way to put it! That is, to use Dave’s metaphor, “safety” is the fire flower. But “fearless concurrency” is Fire Mario. This is where I think Dave misses the mark slightly as well. I agree with his metaphor, but disagree with his conclusion.

I’m not saying that we get rid of fire flowers. I’m saying that we focus on “Rust makes you Fire Mario,” not “Rust is made of fire flowers”, when talking to people about Rust.


Continue reading →

Rust is more than safety

Rust is most well-known for its features around writing low-level code in a safer way than its predecessors. But it’s also a lot more than that. The Rust community is slowly evolving the way that we talk about Rust to people who haven’t yet given Rust a try, but it can take time. But how did we get here?

In Rust’s initial release announcement, Graydon used a phrase that is amazing:

[Rust is] Technology from the past come to save the future from itself

He goes on to elaborate a bit:

Many older languages [are] better than new ones. We keep forgetting already-learned lessons.

This is one of the many things that the “Rust” name evokes. Rust was not intended to be a cutting-edge PLT (programming language theory) research language. It was challenging an assumption that I think many of us hold dear: that “progress” means that things always get better. Reality is a bit more complex than...

Continue reading →

Four years with Rust

Today is four years since I first learned about the existence of Rust. I know this because Rust 0.5 was the first release I used. Rust has changed a lot in that time. For a brief overview of its history, watch this talk of mine. But for today, I thought it would be fun to check out the release announcement and see what’s the same, and what’s changed.


First up, the announcement itself. The rust-dev mailing list used to be your one-stop shop for talking about Rust in a persistent form. But in January of 2015, we decided to close it down. Why? Let’s see what Brian said at the time:

You likely have already noticed, but traffic to rust-dev has decreased
dramatically in recent months. This was a result of natural changes in
project coordination at first, and then an intentional effort to phase out
the list.

In the beginning of the project there were only two places to talk about

Continue reading →

What’s new with “The Rust Programming Language”?

It’s been a while since I’ve mentioned my work on “The Rust Programming Language”, and I wanted to give you all an update. Before we get into the news, though, I’d like to take a moment to reflect on where the book has been, and then we’ll talk about it’s future.

I previously wrote about my history with Rust and docs. As I said back then:

But my first area of focus will be on the area of Rust’s documentation that’s the most weak, and simultaneously the most important: the tutorial.

“The tutorial” eventually turned into “The Rust Programming Language.” But there’s a funny thing about writing a book for a language that isn’t done yet: you don’t really know how to write a good book on something that doesn’t exist, because, well, you haven’t played with it yourself. I could make decent guesses, given that Rust was evolving incrementally, but that’s still very different. I think...

Continue reading →

Structure literals vs constructors in Rust

Learning the basics of a language and its syntax is easy. Learning how all those bits fit together is a bit harder. There’s a neat intersection between three of Rust’s features that I’ve seen people use, but never seen written down. I was explaining this technique to someone in rust-beginners the other day, and thought I’d write it down in case it helps you, too.

A small review: If you have a struct in Rust, like this:

struct Point {
    x: i32,
    y: i32,

You can use ‘struct literal syntax’ to create a new instance of the struct:

let origin = Point { x: 0, y: 0 };

However, this syntax only works if you have the proper access to the struct and its members via Rust’s privacy rules.

mod foo {
    pub struct Point {
        x: i32,
        y: i32,

    pub fn foo(x: i32, y: i32) -> Point {
        Point { x: x, y: y } // this is fine, as we're in the same module


Continue reading →

A eulogy for my 20s

Today is the last day of my 29th year of existence. I’ve been thinking about it a lot, which is extra strange because I don’t generally care about birthdays. I’m not much of one for holidays in general. So why do I care about this one?

My 20s have been an extreme period of growth. At the start of it, I thought that I was going to live in my little farming town, get married to The Girl, go to mass every Sunday, and pretty much do exactly what everyone else I knew had done. If you’re reading this, well, you know a very different me. Before my 20s, I had only left the country once, a short trip to Toronto. I had barely even left my state. I was smart, but cocky, and incredibly sheltered. I was the very embodiment of a stereotype.

I’ve come a long way.

The root of my anxiety about being 30 comes from something that my brain is constantly whispering into my ear: “You don’t have enough...

Continue reading →

DOCember: documentation + December

There are few things I appreciate more than using software projects that have good documentation. When I’m new to the project, documentation is invaluable for helping me get going. When I’m not new, good documentation helps me get the information I need to :shipit:.

About a month ago, I was tweeting about this topic, and several of us came up with an idea: similar to how November is National Novel Writing Month, why not have a similar month for programming?

Here’s the idea: in December, let’s try to work on the documentation for the projects we work on. Make it 50k words like NaNoWriMo, make it 24 pull requests, whatever floats your boat. Your future self will love you for it.

Continue reading →

Rescuing Resque… again.

A long time ago, there was a big open source project, which was a huge part of the Rails world, but had almost no maintenance. This project was Resque, the go-to way to write background jobs for your Rails application. I attended a talk where the current maintainer was clearly getting burned out, and so, offered to help. The problem is, things have changed.

It wasn’t just me. It was a bunch of people. We all used Resque, and loved it, and wanted to make it better. We made plans for a big 2.0 to pay off a bunch of technical debt, simplify the codebase, and add more features. A ton of people chipped in, I had some awesome remote pairing sessions. Things were good.

But slowly, we all started to drift away. One contributor changed jobs. Another decided to spend more time with family. I got discouraged, and then, there was a strange situation in which I accidentally released an entirely...

Continue reading →

“The Rust Programming Language” will be published by No Starch Press

I’m happy to bring you some news: “The Rust Programming Language” is going to be published, in physical form, by No Starch Press. I am really excited to work with No Starch on this: they’ve published some of my favorite programming books, like “If Hemingway Wrote JavaScript”, “Ruby Under a Microscope”, and “Ruby Wizardry”.

Another reason I’m keen to work with No Starch on this is that they believe in publishing freely available material: we’re going to take the existing manuscript, whip it into shape, make a nice paper book out of it, and merge the changes back into the official documentation. So the improvements will get back to everyone, even those who can’t afford a physical copy.

The authorship credit is to “The Rust Project Developers,” as other people have contributed significantly: we even have an active PR to re-write an entire chapter. Rust is a team effort.

Oh, and one last...

Continue reading →

Community Versions for Rust

Rust has been through a lot of changes in recent years. As such, tutorials get out of date. We’ve occasionally said that including rustc -v in your blog posts would be helpful, but today, I saw this tweet go by:

After some quick hacking, I’ve modified it to work with Rust. You can find the project here:

TL;DR: Put this into your blog post, substituting the appropriate date and title:

  width="178" height="24" style="border:0px"

Then, make a pull request adding a new post with some front-matter:

layout: post

Continue reading →