week 51, 2022

Nix and NixOS, my pain points

I have been a user of Nix (a “reproducible” package manager) and NixOS (the Linux distribution based on this package manager) for almost two years. I use it in a personal and professional context. In this article I will focus on the “pain points” in my use of Nix and NixOS. While there are many positives, the NixOS experience is far from being a smooth ride. I still mostly enjoy using Nix and NixOS, and this article is not about blaming anyone. I’m also a part of the problem, as I could probably participate more actively in the project.

Source: Nix and NixOS, my pain points, an article by Rémy Grünblatt.

Just Another Christmas (2020)

Stuck in a time loop where it's forever Christmas, a family man who hates the holiday starts to learn valuable lessons about what's important in life.

In the evening Alice, Esme, and I watched Just Another Christmas. The movie was OK to me and I give it a 6 out of 10.

Setting up my new laptop: nix style

This week I received a new 12th Gen Intel laptop from Framework. And like with any new piece of hardware I get these days, my first instinct was to put NixOS on it 😄.

But I wasn’t just content with firing up the NixOS installer and getting to work. Oh no no no. You see, I knew there was a better way. I didn’t now exactly what that better way looked like just yet, but I could feel in my bones that it existed.

So I did what I usually do when I suspect there’s a better way of doing something in Nix land and pinged Mic92. What you’ll read in the rest of this post is the result of our conversations.

Source: Setting up my new laptop: nix style, an article by Brian McGee.

Nix on the Steam Deck

When I first started using Linux in 2006 I remember dreaming of a Linux Console. The idea maybe wasn't so far fetched at the time, the PlayStation 3 had just been released with OtherOS support which allowed users to install Linux (or BSD). Still, it seemed that a Linux-first console would only ever be a dream. Now in 2022, Valve's Steam Deck is a hackable Linux-first portable console.

Today, we'll be putting Nix on it, because what's Linux without Nix?

Source: Nix on the Steam Deck, an article by Ana Hobden.

The curl fragment trick

A neat trick is then to add a fragment part to the URL you use, and then do the globbing there. The fragment is the rightmost part of a URL that starts with a #-character and continues to the end of the URL.

Source: The curl fragment trick, an article by Daniel Stenberg.

Deck the Halls (2006)

Two neighbors have it out after one of them decorates his house for the holidays so brightly that it can be seen from space.

In the evening Alice, Esme, and I watched Deck the Halls. The movie was OK and I give it a 6 out of 10.

Comprehensive Rust 🦀

This is a four day Rust course developed by the Android team. The course covers the full spectrum of Rust, from basic syntax to advanced topics like generics and error handling. It also includes Android-specific content on the last day.

The goal of the course to teach you Rust. We assume you don’t know anything about Rust and hope to:

  • Give you a comprehensive understanding of the Rust syntax and language.
  • Enable you to modify existing programs and write new programs in Rust.
  • Show you common Rust idioms.

Source: Welcome to Comprehensive Rust 🦀.

For Want of a JOIN

Once upon a time, I was on a small team tasked with building a data pipeline. On this team was someone we’ll call Bob, who was fresh out of grad school and hadn’t had much experience with software engineering, and no experience with SQL. As part of this data pipeline, Bob had to combine the data from two tables. JOIN is a core feature of SQL, so this ought to be simple, right? Unfortunately, Bob hadn’t learned any SQL past SELECT and WHERE.

Source: For Want of a JOIN, an article by Brian Kihoon Lee.

Making GHC faster at emitting code

One common complaint from industrial users of Haskell is that of compilation times: they are sometimes painfully slow. Some of that slowness is difficult to avoid—no matter how you slice it, typechecking and optimizing Haskell code takes a lot of work—but nobody would argue that there is not ample room for improvement. For the past few months, Krzysztof Gogolewski and I have had the opportunity to work with Mercury to identify what some of those improvements might be, and I am pleased to report that our first major patch toward that end will be part of GHC 9.6.

Source: Making GHC faster at emitting code, an article by Alexis King.

Nixpkgs support for incremental Haskell builds

The context for this post is that at work I recently implemented Nix ecosystem support for “incrementally” building Haskell packages. By “incrementally” I mean that these Nix builds only need to build what changed since the last full build of the package so that the package doesn’t need to be built from scratch every time.

The pull requests implementing this feature have not yet been approved or merged at the time of this writing, but I figured that I would explain the motivation, design, results, and limitations of this work to hopefully persuade people that this work should be merged.

Source: Nixpkgs support for incremental Haskell builds, an article by Gabriella Gonzalez.

WebAssembly: Docker without containers!

Recently Docker announced support for WebAssembly in cooperation with WasmEdge.

This article will explain what is WebAssembly, why it is relevant to the Docker ecosystem and provide some hands-on examples to try on. We assume you are familiar with the Docker tooling. We will be using our work on the WebAssembly port of PHP to demonstrate how to build a PHP interpreter, package it as part of an OCI image and run it using Docker.

Source: WebAssembly: Docker without containers!, an article by Asen Alexandrov.

My impressions of nixOS

So the past week has been interesting, to say the least...

I got tired of ubuntu/popOS's BS and decided it was time to try something new, and instead of going with the mainstream power user options such as Arch, Debian, or even Gentoo, I went with something a little more obscure...

NixOS! I've been using it full-time for a week and a half now and I have some thoughts to share with you

Source: My impressions of nixOS, an article by Yusuf Bouzekri.

Converting my PhD thesis into HTML

Finishing a PhD is a weird emotional experience. All the hard work, the joys, the pains, the pulled hairs, everything gets condensed into a scary-looking PDF and then you're just… done? What? This makes no sense whatsoever. Or rather, this makes sense on paper, but then you feel this weird sense of grief somehow. And you're not quite at the acceptance stage yet. So instead, you decide to deal with those feelings in a perfectly normal and healthy way, and you embark on a journey to compile said thesis into a series of HTML pages.

Source: Converting my PhD thesis into HTML, an article by Damien Desfontaines.

A few new things in Emacs 29

Everybody with an Emacs blogs raves about Emacs 29 these days. Things like Eglot, tree-sitter, SQL support and the like. Well, this is all nice – more than nice, brilliant! – but let’s not forget a few minor advances which are coming with Emacs 29. Let me mention a few things that I especially like.

Source: A few new things in Emacs 29, an article by Marcin Borkowski.

Use Git tactically

You can’t edit code without temporarily breaking it. What you can do, however, is move in small, deliberate steps. Every time you reach a point where the code compiles and all tests pass: commit the changes to Git.

Tim Ottinger calls this a micro-commit. Not only should you commit every time you have a green bar—you should deliberately move in such a way that the distance between two commits is as short as possible. If you can think of alternative ways to change the code, choose the pathway that promises the smallest steps.

Source: Use Git tactically, an article by Mark Seeman.