• Open files limit, macOS, and the JVM

    Bazel’s original raison d’etre was to support Google’s monorepo. A consequence of using a monorepo is that some builds will become very large. And large builds can be very resource hungry, especially when using a tool like Bazel that tries to parallelize as many actions as possible for efficiency reasons. There are many resource types in a system, but today I’d like to focus on the number of open files at any given time (nofiles).

  • On smartphones and email procrastination

    I used to be good at replying to emails on time. When tens of emails came in every day, I would sort them out and I would reply right away to anything that needed or caught my attention. The so-called Inbox Zero wasn’t a specific goal that required effort: “it just was”. Things have changed over the years and I am now quite awful at dealing with personal email. Some emails can go weeks (or, I confess, months) before getting a reply.

  • The fallacy of forbidding assertions

    There are two ways to handle abnormal conditions in a program: errors and assertions. Errors are a controlled mechanism by which the program propagates details about a faulty condition up the call chain—be it with explicit error return statements or with exceptions. Errors must be used to validate all conditions that might be possible but aren’t valid given the context. Examples include: sanitizing any kind of input (as provided by the user or incoming from the network), and handling error codes from system calls or libraries.

  • Rust vs. Go

    There is no good answer to this question: people tend to put Go and Rust in the same bucket because they were released at around the same time, because Rust's release felt like a response to Go's, and because they are marketed to similar audiences. They are, however, vastly different. So let's give in and compare them anyway.

  • Rust review: Closing thoughts

    Thought that the Rust review was over? Think again; I was just on vacation! I’m back now to conclude the series with a bunch of random thoughts and a surprise follow-up post. The series is coming to an end. It’s time to summarize everything we have discussed so far and to cover a few more items that didn’t really deserve full posts of their own. Most of these miscellaneous items were thoughts that I jotted down while reading TRPL book.

  • Rust review: The ecosystem

    In this part of the review, I would like to focus on Rust’s ecosystem: in other words, how Rust plays with other parts of a functioning system and how Rust’s standard library vs. external libraries interact with each other. There are a lot of pieces to cover in these areas and they have left me with mixed feelings. Let’s look at some. The standard library The std library feels generally well-thought out and full of features.

  • Rust review: The book

    “The Rust Programming Language” is one of the free books that the community has put together to teach the language. The book does a good job in general, but there are some things that could be better. Let’s cover these, but first, some background. A couple of years ago, right after getting started with Rust, I tried to go through the book’s first few chapters. It all sounded cool… but the first edition of the book moved at a glacially slow pace because it covered things in excruciating detail.