I finally managed to finish working through “The Little Typer”. The “Little” series is a series of (semi-)introductory books published by MIT press, which typically use Scheme or Lisp as a vehicle to teach some interesting aspect of programming. In this case, “The Little Typer” aims to teach the most interesting aspects of dependently typed programming. The “Little” series has been one of my favourite series of programming books, and the books have always been a delight to work through. Having spent quite a considerable time working through the book (several weekends since around sometime last November / December or so), I figured I would write up a book review, since I have a lot to say about the book!
Recently I fixed a bug in librealsense2. The core of the bug was that the developers used a C++ functional cast expression in a C header, which broke the realsense-rust wrapper we’re developing at work. Worse yet, this was shipped as part of the official 2.42.0 release of librealsense2. Oof.
The fix is pretty clear: use a C-style cast instead. Better yet, follow the advice in Modern C don’t use casts at all. Well, we can’t always avoid them, and the compiler can make the whole process annoying. At least, it is especially problematic to detect such issues when you use a C++ compiler.
The (current) extended public health crisis has given me a gratuitous amount of free time. At least, comparatively to before the public health crisis. This past weekend, bored out of my mind, I came across a post from the K-9 developers on Hacker News. This got me thinking a lot more about email and how my use has changed over time.
Since starting my new role at Tangram Vision, I’ve been doing a lot of programming in Rust. This is a bit of a change for me having mostly worked in C / C++ / C# over the past 6 years, but my impressions overall are quite positive.
One of my favourite features of Rust are the enum types. They don’t stick out among Rust’s set of language features compared to some of the more novel aspects of the language (borrow checker, lifetimes, safe-multi-threading); however, Rust’s enum types drive some of the coolest parts of the language, and make modeling data in terms of types a pleasure.
Huzzah! I recently received my Librem 5 (Evergreen) from Purism. The Librem 5 is a smartphone that runs an otherwise standard linux kernel. However, unlike Android which also relies on the linux kernel under the hood, the Librem 5 uses a GNU userspace, adapted for mobile. This makes it more akin to your typical laptop in some ways, although the form factor still resembles a modern smartphone (at least, mostly). Here are some preliminary thoughts about the phone and how it compares to Pine64’s Pinephone, which is another phone that uses neither Android nor iOS, and relies on a GNU / Linux based OS.