Stainless

Platform Build Retrospective

On a regular basis, I take a month off of work to focus on projects that are outside of my normal work. In 2018, I decided I needed to build a storage solution for my loft. The project went through a number of stages to arrive at the final design, some of it decided on the fly while working in the shop, so I’ll do my best to recap everything here....

Dropping root privileges in rust

When I was writing a fingerd daemon in Rust (why? because I could), one thing that took me a little while to figure out was how to drop root privileges after I bound to port 79. One of the principles of security is to use the least amount of privileges you need in order to accomplish the functionality you need. In the case of fingerd and most network daemons that run on privileged ports (i....

Frost Daemon Costume

View this post on Instagram

Failed to find Jack Frost clothes so... I went with a pun

A post shared by Russell Hay (@therealrussellhay) on

I bought a ton of .men domains

I have no idea what I’m going to do with them, but here they are: trumpscon.men trumpsyes.men gladilike.men haveyoutried.men skinbits.men danksac.men itstoxic.men sharetheload.men ...

Bitflags 1.0.1 - Part 3

This is part three in the series of breaking down the rust crate Bitflags. If you haven’t already, go read part one and page two And lastly, we are on to the most obtuse bit of the entire crate, which arguably I still don’t fully understand, but let’s dive in to see. Let’s start with the chunk of comment that explains what this macro does at the high level because it sets the context pretty well....

Bitflags 1.0.1 - Part 2

This is part two in the series of breaking down the rust crate Bitflags. If you haven’t already, go read part one Let’s look at what __impl_bitflags! does. macro_rules! __impl_bitflags { ( // Pattern matching omitted ) => { impl $crate::_core::fmt::Debug for $BitFlags { fn fmt(&self, f: &mut $crate::_core::fmt::Formatter) -> $crate::_core::fmt::Result { First up, it implements the ability to debug/format the struct into a nice enough string, but first, as explained in the comment in the original code, the code needs to do some convoluted things to handle flags that are omitted conditionally, so let’s walk through that....

Bitflags 1.0.1 - Part 1

The Line by Line series will be an in-depth look at Crates in the Rust ecosystem. It’s an attempt for me to get a better understanding of Rust by looking at real work examples and explaining what they do. I am far from a competent rust programmer, so if I get something wrong, please leave a comment with the corrections and I’ll update the posts based on your feedback with appropriate edit credits....

About Stainless.io

Stainless.io is a blog where we dig deep into technical topics on programming, hardware, and other things. This was started because of the adage that to truly understand a topic, you need to be able to teach it. This is our attempt at teaching to better learn. Russell is a developer living and working in Seattle, WA. When not writing code, you can find him jumping on things, and proving you are never too old to learn to do flips....

Platformer Physics

I’m making a platformer game based on something out of the DCU that I’ll be releasing on PC/MAC (mac currently, but porting to windows will be “easy”). The first step to most platformer games is getting the player movement and physics to feel good. That’s what I’m working on right now. I decided to build many things from scratch and the physics engine is one of them, which means research, lots of research....

CascadiaFest 2016

please note, I’ll have links to all of the videos for the talks as soon as they are available. Links to descriptions of all of the talks can be found on the CascadiaFest 2016 page. Day One: CSS Day First Block The first block started off with a talk about practical color theory. It was a good explanation for people who have maybe not taken any art classes in school (do such people exist?...