Posted 04-02-2015
Interactive Evolutionary Computation

Last semester I gave a lecture on Interactive Evolutionary Computation for my grad course. I found the area really interesting for it's applications in creative domains, such as art and music. If interested, the slides can be found on slides.js.

I've used some of the ideas in the creation of a fully automatic evolutionary computation system for evolving piano sonatas, with quite good results. I had my own automatic composer create music for me while I studied for finals last term :) The code can be found on github.

Posted 26-07-2014
Lambda Jam 2014 Retrospective - Day 1

Lambda Jam 2014 took place this past week in Chicago, and I had the great pleasure of volunteering. The conference was a blast, and I can't wait for next year!

Though I was volunteering, I was able to attend a few of the talks and keynotes.

Posted 04-06-2014
Finite State Automata in Racket (SoftBot Part 1)

I just finished my university's Programming Paradigms course, in which Racket is taught as an introductory language to Functional Programming. Thankfully, the course assignments encouraged creativity.

For example, we had one assignment involving the creation, and display, of a finite state automaton. I thought building a line-tracing robot in Racket built on a simple FSM would be a fun little project to fulfill these requirements. I'm fairly happy with the outcome, so I thought I'd post a bit of the code and the result.

Posted 23-08-2013
JavaScript Nonsense

The above is valid JavaScript code. I generally enjoy programming in JavaScript, mainly due to it’s accessibility and immediate feedback. These are very compelling advantages of the language that are largely unparalleled by any other language. Because of these advantages, JavaScript makes an excellent language for working on quick projects, and it also provides an excellent resource for people new to programming: all you need to do is open a browser and type!

JavaScript does have a number of peculiarities, however. Among these is the crazy weak typing. This system lets you perform operations on data which may make no sense in terms of the operation. For example, I would expect that adding 1 to the empty object, such as 1 + {}, would result in a type error… Nope! Surprise! According to JavaScript this equals “1[object Object]“. Fine, what is 1 + +{}. JavaScript tells us the answer is none other than NaN. Well, that makes sense. Whatever the answer to that would be, it’s certainly not a number. Thanks JavaScript! So 1 + +[] should also be NaN as well, right? Right?? Nope, this is in fact a number: 1 to be precise.

Posted 01-08-2013
Writing Literate Haskell with Code Block Notation

A few nights ago I wrote a very simple “parser” for Literate Haskell files that use a TeX-like notation for denoting blocks of code. The format expected by the program is: {code} -> begins a block of code {endCode} -> ends a block of code Both blocks of code and Bird Beak lines are converted to Bird Beak notation to be compiled. All other lines are considered comments.


There are many advantages to using a block notation rather than ‘>’ on each line, especially for larger blocks of code. To read a few reasons against standard Literate Haskell, see this post by Matt Giuca. While I quite enjoy Literate Programming, many of the arguments he puts forth address troublesome aspects of literate programming, but they are mostly tightly coupled to the notation used.

Posted 27-07-2013
Haskell Chess

This is my first attempt at writing a useful Haskell program. I am currently reading the wonderful “Haskell School of Expression” Book by Paul Hudak of Yale. I am finding Haskell extremely intriguing and thought I would take a stab at creating a Chess application (console-based) in Haskell. The application works via the honor system. I’ve decided to put this project on hold while I learn more so that I can more effectively implement an AI and a move validator.

In any case, here is my first attempt at Haskell…

Posted 25-10-2012
Linux IPC: Shared Memory
Interprocess Communication

Shared memory provides a way for a process to share data with other processes in a system. This process-to-process communication is commonly called interprocess communication, or IPC. In Linux, there are several forms of IPC. Those that have used Linux in a productive manor are likely familiar with one of the most simple forms of IPC in Linux: pipes. Pipes provide an extremely useful way of passing the output of one program as the input to another.

The “|” character is used to create a pipe. For example, we could use the programs wc _and _grep to quickly find the total lines of code in a source directory. First using the wc program with the -l flag, we can get the number of lines of code in each source file in the current directory. Issuing this against a directory of C++ files outputs the following,