Steve Klabnik

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

Read this first

The Language Strangeness Budget

I’ve always loved programming languages. I’ve spent plenty of times with many of them, and am fortunate enough that language design is now part of my job. In discussions about building Rust, I’ve noticed myself making a particular kind of argument often in design discussions. I like to call it ‘the language strangeness budget’.

When building anything, it’s important to understand why you are building it, and who you are building it for. When it comes to programming languages, building one is easy, but getting people to use it is much, much harder. If your aim is to build a practical programming language with a large community, you need to be aware of how many new, interesting, exciting things that your language is doing, and carefully consider the number of such features you include.

Learning a language takes time and effort. The Rust Programming Language, rendered as a PDF, is about...

Continue reading →


Ouroboros

One of the things that I love about open source is its ability to send improvements across projects. Sometimes, an improvement in one project ends up improving its upstream. This kind of network effect really gets to the core of it for me: steady, constant improvement.

I saw an example of this today that makes me smile. Before Rust’s 1.0 release, I wrote a chapter about the Dining Philosopher’s problem. Incidentally, I’m really happy to use classic CS concepts in the Rust docs, hopefully exposing them to people who didn’t get the opportunity to get a degree in computer science. Anyway, towards that end, I decided to cite Tony Hoare’s classic CSP paper. Other funny aspect of that: I started my implementation using channels, but ended up using mutexes instead.

Anyway, today, a new contributor spotted a typo. The PR message made me smile:

Looks like this was an issue in the source...

Continue reading →


Hope

“The people are unstoppable / Another world is possible”

This has long been my favorite protest chant. For me, it gets to the heart of the matter: another world is possible. If I’m honest with myself, most days, I don’t really believe that the world will get better. We often present history as a kind of positive progression: the world has only been getting better, more tolerant, and less poor as the years go by. I don’t feel that, though. What I see is imperialism, consolidation of power, and rampant racism/sexism/etc. Liberalism presents itself as an end of history, the final stop on the line. That’s unacceptable to me, but I usually feel like the only one.

The start of this post sounds depressing, but I’m only writing it because I actually feel positive, invigorated. I’m writing this post from the Barcelona airport, about to board the plane home. It took me a while to figure this...

Continue reading →


An introduction to economics under capitalism

The dismal science a difficult one. Many people have strong opinions about economics, and it determines many of their other political beliefs. As someone who has significantly different thoughts on this topic than many of my peers, I’m writing this post out to give a basic explanation as I see it. That doesn’t mean I’m inventing something here, just explaining the model that I currently prefer. I’ll give sources at the end, if you want to dig deeper. Speaking of ‘deeper,’ this is also an introduction, one could easily write a book or three on this topic. I’ll try to be clear where I’m making an assumption, and why I’m making it.

Finally, this is very much a draft, I may make small, or even maybe major errors. Nobody’s perfect. My spelling is terrible, and there’s a bug where my browser spellcheck isn’t working… anyway.


Let’s start from the beginning. And that beginning starts with...

Continue reading →


An alternative introduction to Rust

Lately, I’ve been giving a lot of thought to first impressions of Rust. On May 15, we’re going to have a lot of them. And you only get one chance at a first impression. So I’ve been wondering if our Intro and Basics are putting our best foot forward. At first I thought yes, but a few days ago, I had an idea, and it’s making me doubt it, maybe. So instead of re-writing all of our introductory material, I’m just going to write the first bit. A spike, if you will. And I’d like to hear what you think about it. This would take the same place as 2.4: Variable bindings in the existing structure: They’ve installed Rust and gotten Hello World working.

$ rustc --version rustc 1.0.0-dev (dcc6ce2c7 2015-02-22) (built 2015-02-22) 

Hello, Ownership

Let’s learn more about Rust’s central concept: ownership. Along the way, we’ll learn more about its syntax, too. Here’s the program we’re going to talk...

Continue reading →


Update Github Pages with Travis CI

Ever wanted to have your project automatically update Pages when you have a successful build?

I have a demo repository here: https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example

It, of course, uses Travis to update its own Github Pages, which is here: http://steveklabnik.github.io/automatically_update_github_pages_with_travis_example/

I hope that helps!

Continue reading →


I’m going write-only on Twitter for a while

This is something I’ve been joking about for a while, but I’ve decided for the near future, I’m just going to be posting things to Twitter, and not reading replies or anything.

So, if you don’t get a fav or a reply or something, it’s nothing personal.

There’s a lot going into this decision, but basically, I haven’t been actually doing a lot of things that I want to do because I’m super stressed out. Turns out Twitter is also a huge cause of stress in my life. Turns out Twitter is also a large part of my social interaction, so I’ve kept doing it even though I know it’s not great for me.

So, we’ll see what a post-read/write Twitter is like. You know how to get a hold of me otherwise.

Continue reading →


Rust’s documentation is about to drastically improve

Historically, Rust has had a tough time with documentation. Such a young programming language changes a lot, which means that documentation can quickly be out of date. However, Rust is nearing a 1.0 release, and so that’s about to change. I’ve just signed a contract with Mozilla, and starting Monday, June 23rd, I will be devoting forty hours per week of my time to ensuring that Rust has wonderful documentation.

A year and a half ago, I was in my hometown for Christmas. I happened upon a link: Rust 0.5 released. I’ve always enjoyed learning new programming languages, and I had vaguely heard of Rust before, but didn’t really remember what it was all about. So I dug in. I loved systems programming in college, but had done web-based stuff my entire professional life, and hadn’t seriously thought about pointers as part of my day-to-day in quite some time.

There was just one problem: Rust...

Continue reading →


I’m bailing on San Francisco

I was always not quite sure about moving to San Francisco. I’ve heard about this place for my entire life: back in high school, during the first bubble, I would read Slashdot and wonder about life out west. But San Francisco is like a vortex for software developers. It’s got this gravitational pull that’s hard to escape. When I made the choice to move here, I wasn’t sure if I’d be able to handle it. Turns out I can’t.

So I’m leaving. My job is great, but it’s not worth staying in this city. I haven’t done anything outside of work in a few months. I go to work, work hard, go home, and then go to sleep. I don’t go home late. I go home at five. It’s not work/life balance that’s the issue. I’m just not psyched for the ‘life’ part. San Francisco has sucked out all my creativity, most of my...

Continue reading →


Hypermedia FizzBuzz

I read a really great blog post last week: Solving FizzBuzz with Hypermedia. In it, Stephen Mizell builds a FizzBuzz service using Siren, and then shows how client code evolves. I wanted to explain exactly why I think this example is amazing, because I’m not sure it’s exactly obvious.

FizzBuzz? Really?

The first thing that makes this post brilliant is that it uses FizzBuzz. While FizzBuzz has historically been a simple interview question to make sure that you can actually write some basic code, in this case, it works well because it’s a very, very simple programming problem. When writing examples, there’s always tension between real-world and straw-man examples. If you make it too real-world, all sorts of incidental details creep in and distract from your main point. If you make a trivial example, it can be claimed that it works for your simple example, but not for ‘real’ examples....

Continue reading →