MLeM, a VM for genetic programming
posted April 17, 2017
I’ve recently been working on a project called the Machine Learning Machine, or MLeM. It’s a VM implemented in the Rust programming language which I hope to use as a basis for some genetic programming.
It’s a Harvard architecture machine, meaning that it has separate representations and memory for data and program segments. While this is not the way most modern computers work, it does model the more secure W XOR X functionality that exists in operating systems such as BSD and allows me to properly utilize the amazing type system of the Rust language to do compile time verification of a lot of the system.
Getting started with Piston, a game library for Rust
posted March 14, 2017
I’ve been interested in game programming for a while, and I periodically sample the Rust ecosystem’s offerings around game programming. Piston seems like the most promising candidate, but the tutorials are out of date, so here’s a simple one. Last update: March 2017.
This tutorial will show you how to build a simple windowed application with a time-locked update rate and keyboard controls. You can extend it with image loading, music, and many other features of the Piston library.
posted February 16, 2017
Session types are a technique for using a rich type system, like that of Rust or OCaml, to prevent the representation of certain kinds of illegal states. Here, I’ll illustrate them with a (somewhat contrived) example.
What is the use-case? Let’s take the example of a system representing packaging and shipping boxes. I want to create a Package datastructure, pack data into it, close it (preventing adding data), address it, and then ship it.
socketserver: the Python networking module you didn't know you needed
posted December 24, 2016
I occasionally spend time randomly surfing the Python standard library docs; there is a lot of useful functionality included in the language’s standard distribution, such as, for instance, the socketserver module, which I didn’t know about until this evening and which is one of the most useful I’ve seen in a while. As ever, the docs are straightforward in their self-description:
The `socketserver` module simplifies the task of writing network servers.
Rewriting tinyhttpd in Rust, Part One
posted October 21, 2016
In 1999, J. David Blackstone, or, as he is know online, jdavidb, was taking CSE 4344 (Network Concepts) at UT Arlington. Those were the glory days of Sparc Solaris, and Blackstone wrote, for his college course, a C program called tinyhttpd. It is, essentially, a very short version of the immensely complex programs that seem run the world these days: web servers. Unlike the million-line behemoths (think Apache, nginx, et cetera), tinyhttpd is a HTTP 1.