Topic: Rust

The following is a list of posts covered on my Blog, under the topic “Rust”, sorted from most to least recent.

  • Renegotiating C Posted on February 19, 2024

    I am tying myself in a knot.

    It all started when I read “You (Probably) Don’t Need to Learn C,” a good article which raises good points about the poor arguments people tend to make when defending the choice of learning C in this day and age. First and foremost: “you should learn C so you know how a computer really works.” The article itself refers then to David Chisnall’s “C is Not a Low-Level Language,” so I’ll do the same because it makes the case better than I can. C is not the computer. C is (maybe) the only interface to syscalls exposed by the operating system, depending on the system. C is (definitely) an important part of computing history and computing today.

    Continue Reading →
  • “Implementation Selection” in Rust Posted on January 23, 2024

    A common problem in programming is when you want the path of options for “what happens next” to split. In structured programming this would generally come in the form of a series of if/else if/else (or whatever the syntax is in your preferred language), or a switch if your language supports it. Maybe you have a ternary operator for a more compact if/else. Maybe you go whole-hog and have some array of function pointers to embed the selection into data. Whatever way you slice it, you have paths of control flow, and you want to choose between them in a structured fashion.

    Continue Reading →
  • Technostructuralism Posted on April 3, 2019

    So Steve Klabnik posted a really thoughtful piece on open source and free software (read it if you haven’t), and the responses on places like Hacker News made an error that seems common in these circles: believing working harder will solve a problem.

    Continue Reading →
  • Monomorphization Bloat Posted on December 3, 2016

    In this post I will discuss monomorphization: what it is, why it’s useful, and what problems can potentially arise from it, with a particular focus on the problem of monomorphization bloat. I will also look at options for dealing with monomorphization bloat in your codebase.

    Continue Reading →
  • String Types in Rust Posted on March 27, 2016

    This seems to be a common issue, so let’s talk about the different string types in the Rust programming language. In this post I’m going to explain the organization of Rust’s string types with String and str as examples, then get into the lesser-used string types—CString, CStr, OsString, OsStr, PathBuf, and Path—and how the Cow container can make working with Rust strings easier.

    Continue Reading →