Managing complex communication over raw I/O streams using async-io-typed and async-io-converse

Introduction

Over the past few months I’ve been working on a pair of Rust crates that I think might be useful to the wider world. async-io-typed and async-io-converse which provide the ability to exchange typed messages between two endpoints linked by any kind of byte based I/O channel. This channel could be a TCP connection, a named pipe, a unix socket, even a file (if you don’t need the communication to be real time).

Read More

Init Struct Pattern

Introduction

Let’s talk initialization of complex structures in Rust. There’s a few popular ways to go about this, some of which include the pub fn new() convention and the builder pattern. In this blog post I’m going to compare these, and also introduce a new pattern which I’m going to call the Init Struct Pattern.

Read More

Rewriting software and how to avoid it

Rewrites. They may sound fun at first, but by the end of most of them you’re tired and under a lot of pressure. I’ve been writing software in some form since 2010, in a variety of languages and frameworks. This post is about how you can avoid the problems I’ve had with rewrites, and when a rewrite might actually be the right thing to do.

Read More

ECS ramblings

Introduction

This post is mainly written for people familiar with Amethyst and I won’t be spending a lot of time going over the history of the project and how we got to where we are today.

A small summary and some reminders is in order though.

For those who aren’t familiar I have opinions on how an ECS should be implemented for Amethyst.

We have three names flying around for our ECS project so I’ll provide a quick summary of them here.

  • specs The OG amethyst ECS, this has been kicking around for a long time. It’s got a few problems that have manifested for Amethyst in unfortunate ways which inspired two spin off/reboot projects.
  • nitric @torkleyy’s spin on an ECS, developed here on gitlab.
  • igneous My proposal for a fork of specs that can be used to solve problems with it. Doesn’t actually exist beyond a few drafts and proposals.
Read More