At Flox1 we recently released a feature that we call "service management", which is essentially an analog to Docker Compose that runs processes instead of containers. In short, you define some services in your manifest and they get started as part of activating your environment with flox activate --start-services. When there are no more activations of this environment (i.e. you've closed all your shells that had activated the environment) the services are automatically cleaned up. A simplifie...| Tinkering
From the moment I joined Flox, I knew that there was one feature I wanted: composition. This is the ability to build an environment out of other environments. Two years later we finally built out this feature, and I was the project lead. Let's talk about why it's so exciting.| Tinkering
While working on the service management feature of Flox I found myself wanting debugging tools that didn't exist, so I wrote my own. Let's talk about what it does, how it works, and where it's heading.| Tinkering
Three of the weirdest "bugs" I encountered during my PhD.| Tinkering
...or, how `disko-install` is what I thought `nixos-install` would be. I've been in the Nix world for about a year now, I work at a company that uses Nix daily, and it was only last week that I finally installed NixOS on the PC that I've been meaning to install it on for close to a year. Why? What kept me from installing it for so long? What was the breakthrough?| Tinkering
Come for the Foo, stay for the Bar| Tinkering
Today we released version 1.0 of Flox, a new tool that allows you to create declarative environments without containers. Let's talk about why we built it, how it works, and some of my favorite features.| Tinkering
Since the last post I've been in contact with some members of the Nix community with regards to joining the documentation team. From that discussion and my experience with other ecosystems I've had some ideas rolling around about what the ideal Nix documentation strategy/ecosystem would look like to me, so I'm putting those ideas in writing to start a discussion. These ideas aren't super concrete and I don't speak for anyone else, but they're my vision for how Nix documentation could better s...| Tinkering
In this series I'll be documenting my journey learning Nix and this first installment is more of a prequel. A common complaint when learning Nix is that the documentation "is not good", and I think what people mean by that is that the documentation is spread across several sources which may or may not be easy to find, or that there is no explanation at all in official documentation. This post is a collection of both official and unofficial resources.| Tinkering
I found myself looking for a specific type of bitmask and couldn't find what I was looking for. These were easy to make, so I've put them on the internet for your benefit.| Tinkering
As part of my PhD I do computational modeling of quantum-biological systems. One of my simulations was misbehaving and in certain cases could take 8 hours to complete. That's really bad when you're trying to iterate quickly. This post describes how I made a series of optimizations to reduce the runtime by 250x via profiler driven algorithmic improvements, rewriting the core in Rust, and making use of parallelism.| Tinkering
When you're running experiments that take ~8 hours wouldn't it be nice if the experiment told you when it was done rather than needing babysitting? In this post I'll show you how I used Twilio to do just that.| Tinkering
When you're investigating performance problems you may find yourself reading or writing assembly. Rust has a nice set of tools for interacting with assembly in a variety of ways such as viewing the assembly generated by a particular function.| Tinkering
Software testing is industry standard practice at this point, but there's a variety of ways to test your software ranging from the most basic of unit tests all the way up to mutation testing. Property-based testing is a testing technique in which you declare abstract properties of your system, feed it randomly generated inputs, then check whether your properties are upheld. In this post I'll discuss the benefits of property-based testing and how to do it in Rust.| Tinkering
Let's build a simply web service in Rust using Rocket.| Tinkering
As part of my research I found an excuse to use Rust. `polsim` is a commandn line utility for simulating the polarization of a laser beam as it interacts with a sequence of optical elements. In this post I'll describe `polsim` itself and my experience using Rust to write it rather than Python.| Tinkering
By playing with the Python AST we can add functionality with making the user write any extra code. You may use this power for good or evil.| Tinkering
After learning about async/await in Python I wondered how I could apply it to software in my lab. Much of that involves talking to equipment via serial ports. Libraries for talking to serial ports exist, but I found the documentation for doing so via async/await sparse. Here's an example of how to use PySerial asynchronously.| Tinkering
Come for the Foo, stay for the Bar| Tinkering
One of the really nice things about Rust is its macro system. It makes it really easy to generate boilerplate code that would otherwise be really tedious to write by hand. In this post you'll learn how to write your own macros that will put Nicolas Cage quotes in the error messages generated by your IDE.| Tinkering