My Advent Mission
So, if you follow me on Mastodon, you'll see that I've been doing the Advent of Code 2022, pretty consistently (e.g., day9.rs). I haven't done the advent for years, and to be honest coding hasn't really felt terribly motivating. But lately, I've felt like I have to reclaim and reaffirm my technical skill lest I sink into the slowly evolving grey goo of Google's internal tech stack (and also: Google is adopting Rust slowly but surely). Since I've been meaning to learn a more widely accepted language with good type support and I've had an upwelling of motivation, the Advent seemed like the ideal excuse to dive into Rust.
Advent is Code is lovely because it's a wide ranging series of little problems that have deep roots in fundamentals of computer science, math, AND systems engineering. While I don't play competitively, the fact that there is some soft time pressure to "keep up" with the calendar is also very helpful for me when it comes to keeping consistent practice. Having a friend,y community of Rustaceans cheering me on and recommending code improvements is also extremely cool.
And because I figured that I might as well stack up a lot of learning at once, I've also picked up on a totally novel tool chain to work through as we go. I wanted to mention some big wins in my quest for rust skills and new tools you might also enjoy.
Mission Equipment
Zellij
Zellij is a "batteries included" terminal muxing tool. As a long time user of tmux at work, I'm very comfortable in that space for both personal and professional use. That's why I was so shocked when I tried Zellij.
It is so good. Not only do many things that tmux struggles with (e.g., nested use, nested use across ssh, u2f & fido key support) just work, but it's feature rich.
As an example, at the top I've included a screenshot of Zellij's "floating, process-specific windows". Like many good tiling window managers, Zellij can support complex layouts and also has breakout "floating" windows. The encouraged use case for these is to set up task-specific windows (like running tests) with a single key. It reminds me a lot of emacs dev workflows, but unlike the emacs workspace, it's sizzling fast to use.
And best of all, it has a robust plugin API that uses WebAssembly, meaning it supports a huge variety of languages from JavaScript to Haskell to, uh, Forth?
If you use terminal multiplexers and haven't tried Zellij, I'm very happy to be the one to recommend it to you.
Helix
While I'm generally very impressed with VS Code (and the open source version works well for me), I wanted to try something different. Helix is that different.
At first glance, Helix is VIM-like. It's modal, shares similar ideas around the paste and registers and navigation. But unlike neovim, it supports a much richer UX, batteries-included support for LSPs, and a speed of rendering and navigation that is... phenomenal. Neovim is a very responsive editor, Helix makes it feel slow.
But most interesting (and maybe frustrating, if you have deep muscle memory for vim like I do) is that Helix has a fundamentally different editing philosophy. In vim, you issue ed-like commands. In Helix, you visually select things, then issue commands on the selection. This difference sounds small, but in practice it's quite significant. Once you get comfortable with the idea, you'll find yourself doing much more complex edit motions because you can see what you're doing before you try it.
Helix doesn't yet have a plugin architecture, but they claim to be working on it. Once that happens, I suspect Helix will take off. It's beautiful, it's fast, it's responsive, and once it has a plugin infrastructure in wasm it'll be easier to develop for.
Hyperfine
One of the fun parts of Rust and Advent of code (especially for someone who spends a lot of time with slow and fugly Python variants at Google) is optimizing the speed and giggling at how fast my code is. I can't do that without great measurement, and hyperfine is the tool I'm using in this project to do that. It's fantastic.
There are tons of benchmarking tools, but Hyperfine does everything they do slightly better, and its interface shows a lot of attention to detail around presenting its results. I really am happy to see such a pleasant console experience.
To Be Continued
I'm doing my best to keep up with the advent despite being brutally slammed at work and having my downtime calendar full of events. I'll report back on any more tools or experiences I have. So far, my experience has been uplifting and exciting. I haven't felt this way since I learned Erlang, and I think it shows in my enthusiasm.
If you do want to talk about your AoC solutions, or give me Rust style or performance tips, please feel free to reach out on Mastodon. I welcome the interaction.