Welcome to nickb.dev, a blog by Nick Babcock! Below are my most recent articles. You can find the history of all my writings in the archive or just find out more about me.
Published on:
I recently published highwayhasher as an npm package. It exposes Google’s HighwayHash to the JS world through the pure Rust reimplementation. Browsers will use the Wasm implementation while nodejs installations will use native modules built against hardware intrinsics. Both implementations expose the same API so clients don’t need to worry about which implementation is selected.
Published on:
This post will walk one through a real world migration on how to apply the principle of minimal privilege to a systemd service. This is accomplished by extracting sensitive configuration fields into an environment file, templating the config, running the service as a dynamic user, and sandboxing the application with systemd primitives.
Published on:
Embedding data in Rust code can be good idea so one doesn’t worry about acquiring the data at runtime. However, how one goes about bundling data in the application can have a significant impact on compile times, code size, and runtime performance.
Published on:
The EU4 achievement leaderboard and save file analyzer, Rakaly, has several requirements when it comes to maintaining the leaderboard. One of these requirements is to have current leaderboard submission decay overtime as EU4 receives updates. Redis has tools builtin to cater to this use case
Published on:
I recently overhauled a JS parsing library to delegate to the Rust implementation via Wasm. The result to users is seamless as the small Wasm bundled is inlined in the library as base64 encoded. Along the way, I saw that parsing can be much faster than object creation.
Published on:
At 160k words, this is by no means a small blog. When years of annoyances with Jekyll boiled over, I decided to migrate the Jekyll blog over to Hugo. The results were amazing and will hopefully lower the barrier needed for me to continue writing unencumbered.
Published on:
When cost optimizing, consider using Backblaze B2 over Github’s git LFS. B2 has a much more generous free tier compared to Github’s: 10x more storage (10GB vs 1GB) and 30x more bandwidth (30GB vs 1GB). Even after exceeding the free tier, Github’s git LFS still commands a 12x price premium. Before abandoning git lfs, there are several tips to keep in mind.
Published on:
I chose Rust for a project and I had struggles along the way which made me second guess this decision, but after releasing and fulfilling use cases I hadn’t considered, the decision was vindicated. The wins that Rust brings outweighed any struggles.
Published on:
Gatsby is a site generation framework. I recently was using it for one of my side projects, sff.life, a site dedicated to small form factor computing (eg: small computers). I decided to migrate away from Gatsby, as it is not a zero cost abstraction for static sites for two reasons:
Needless bloat via javascript and JSON bundles Way too many dependencies and releases Before I give a bit more background and expand on these reasons, I still believe that in many situations, Gatsby benefits outweigh the costs.
Published on:
I have a toy site that parses Rocket League replays using the rust crate boxcars. Parsing replays is done synchronously and shouldn’t block the browser’s UI thread, so parsing is offloaded to a web worker. Getting this side project to a point where it works + is maintainable (minimum configuration) has been an exercise in doggedness as I spent weeks exploring options.
I believe I’ve found a happy medium and here’s the recipe: