Improved User Interface 0.3.0!
posted June 13, 2018
The Improved User Interface crate has had its 0.3.0 release, adding new input fields (Checkbox and Combobox), new layout options (LayoutGrid), as well as finally working 100% on Windows, and with many bug fixes. This comes with the 0.1.3 release of the underlying ui-sys crate to support these features.
It’s been a big undertaking to get to this point, and I’m excited to grow from here, now that libui itself is moving forward again as well.
A Gentle Introduction to Practical Types
posted September 29, 2017
Types Programmers talk a lot about types, but what is a “type”, anyway? It is, in essence, the set of all possible values for some variable. Defining such a set gives us some information about what we can do with the value of that variable, in general.
For example, when speaking about numbers, we might say, “let x be any integer” or “let y be any real number not equal to zero”.
SBrain, an extension of BrainF*ck
posted May 02, 2017
SBrain, or Semantic Brain, is a language based on Urban Müller’s famous language Brainf*ck with only 8 symbols (3 bit instructions). SBrain’s additions increase the number of symbols to 32 (6 bit instructions), including bit-shifting and arithmetic, and add a stack and a register.
Having these additional facilities allows SBrain to be far more expressive while retaining its attractiveness as a genetic medium for evolutionary algorithms. I’ve been interested in genetic programming for a long time.
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.