go

Synchronize goroutines in your tests

I have been working on an emulator for the MOS 6502 Microprocessor, written in Go. As part of this package I have also implemented a minimal 6551 Asynchronous Communication Interface Adapter. The 6551 provides serial IO and is easy to use in combination with the 6502. When the microprocessor writes a byte to the 6551 it is stored in the tx (transmit) register where it’s available for other hardware components to read.

A static file server in Go

If you don’t know Go, you should really look into it. Today I was trying to figure out how to write a simple (and fast) static file server in Go. As it turns out, this is very easy to do. Go contains (in the net/http package) a nice FileServer type that can server files from the directory you point it to. Here’s a sweet and short example: package main import ( "net/http" "log" ) func main() { err := http.