A Hoverbear's Musings

Articles primarily relating to science and technology.

Setting up a Rust Development Environment

In this post we’ll be discussing one way to set up your machine for Rust development. There are different ways, particularly related to the text editor, so feel free to skip what is irrelevant to you. We’ll focus on: Setting up Rust via Rustup. Valuable tools like clippy and rustfmt. Configuring VS Code for Rust. Debugging with the command line and inside of VS Code. Using different compile targets. Everything we do should be functional on both Linux and MacOS, on Windows your mileage may vary. I, unfortunately, don’t have a Windows instance to test on. In order to finish...

Posted on , into Rust , Tutorials , and Tooling .

The Future with Futures

Recently there has been a lot of progress in the Rust language towards a robust asynchronous stack. In this article we’ll take a look at what these things are, take a tour of what’s available, play with some examples, and talk about how the pieces fit together. We’ll get started with the futures crate to start, move on to futures_cpupool, and then eventually to tokio. We will assume you have some knowledge of programming, and have at least thought about trying Rust before. What are Futures and Async? When writing code to do some action which may take some time,...

Posted on , into Rust and Tutorials .

Pretty State Machine Patterns in Rust

Lately I’ve been thinking a lot about the patterns and structures which we program with. It’s really wonderful to start exploring a project and see familiar patterns and styles which you’ve already used before. It makes it easier to understand the project, and empowers you to start working on the project faster. Sometimes you’re working on a new project and realize that you need to do something in the same way as you did in another project. This thing might not be a functionality or a library, it might not be something which you can encode into some clever macro...

Posted on , into Rust .

An HTTPS Terminator Box

Over the last couple days at asquera we’ve been on a retreat at the Landhaus Fredenwalde. It’s really beautiful out here and it’s given me a chance to work on a few small projects which I’ve been wanting to explore for awhile now. Anyways, yesterday I set up a system that uses Ansible, Let’s Encrypt, nginx, and DigitalOcean to terminate HTTP and proxy requests to arbitrary hosts. The intended use case for this is to have Github Pages sites able to be dropped onto a custom domain that is SSL enabled, but there are many other use cases which I...

Posted on , into Infrastructure and Tooling .

Winds of Change

Unlike most of this blog this post is not technical in the slightest, instead it’s a personal update. Though, I have been wanting to write this post for a long time now! Many things have happened in the last few months, and life is still swirling all around me. Many things seemed uncertain, other things still do. Irregardless, things are pretty darn cool. Anyways, here’s what’s happened lately. The First Degree I went Camosun College in late 2010, and transfered to the University of Victoria in 2012. As of June 2016, I’ve finished my program and recieved my degree! I’m...

Posted on , into Personal .

New Roots part 5, Erecting Container Infrastructure

This is the fifth part of an ongoing series on configuring a new server. In our last post we discussed and configured some basic tools. For all intensive purposes, our ‘root’ system is complete. What we’ll be doing now is building the infrastructure to run containers the way we want to. Before we get around to setting things up, let’s describe the what we’re up to. Currently, the only external service the server is running is ssh. We’d like our server to host more services. These services are likely to be both internal services like databases, and external services like...

Posted on , into Infrastructure and Arch Linux .

New Roots part 4, Making it 127.0.0.1

This is the fourth of a series on taking up residence on a new server. In our last post we talked about how to set up some basic network services like ssh and configure iptables, our firewall. In this post we’ll talk about making your server feel like home. There are a grand number of things we can do at this point to make our time on the machine enjoyable. Take time to evaluate your choices though. This ‘root’ host is going to be our ‘control seat’ so it’s not going to be doing much more than orcestrating virtualized environments....

Posted on , into Infrastructure and Arch Linux .

New Roots part 3, Services & Hardening

This is the third in a series of posts about getting settled into a server. First we talked about choosing a server, then we talked about installing a base OS on a dedicated server. In this post we’ll discuss configuring, securing, and hardening our server. In our last post we left our new server in a very, very minimal state. Heck, we didn’t even tell it it’s own name! In this post we’ll talk about configuration. Throughout this process we’re going to try to keep things simple and tightly knit. Through most of this guide you’ll need to be using...

Posted on , into Infrastructure and Arch Linux .

New Roots part 2, On the Metal

This is the second post of a series on settling into new servers. The first was about choosing a server. This post is specifically targetted at newly acquired VPS and Dedicated servers. We’ll talk about installing our chosen distribution, configuring its basics, and familiarizing ourselves with the new metal. What Distribution? This choice is entirely dependent on your personal tastes and use case. Different distributions are catered well to different things, even different installation media of specific distributions are different enough to warrant considering. You might be interested in Ubuntu if you’re new to Linux or interested in doing things...

Posted on , into Infrastructure and Arch Linux .

New Roots part 1, Choosing a Server

This is the first in a series of posts where we’ll discuss the process of obtaining, setting up, and settling into a new headless server. Along the way we’ll install Linux, configure firewalls and web servers, set up virtual machines, tinker with system knobs, explore automation tools, and generally have a great time. In this post, We’ll discuss things to keep in mind when searching for your own hosting, things to look for, and the differences between distinctions. This series is not intended to be a comprehensive guide. These are just the notes and rambling of a hobbyist server admin...

Posted on , into Infrastructure .