• This week, I want to talk about how to use Go to write a client/server system with both synchronous requests and asynchronous event notifications. To help learn Go, I wrote a clone of the Conserver console server. Now, of course,…

  • Last week I showed how a channel could link a producer and a consumer, and I idly speculated on how you’d set the depth of the queue, relative to the rate and variability of the producer and the consumer’s need…

  • I try to write a Go article every Monday, but the holiday season has disrupted me a bit. So here’s a little something I dug out of my stocking to get things going again. I thought an interesting way to…

  • In my post about how to efficiently put data into a Go binary, I mentioned that strings are immutable, and can be accessed without causing the Go runtime to copy them. This turns out to be the key to a…

  • Here is a little program to that implements RTM’s series for Cliff Stoll. package main import “fmt” func count(s []int) int { i := 1 x := s[0] for ; i < len(s); i++ { if s[i] != x {…

  • I have a nice source of []byte slices (see last post), and now I’d like to do something with them that resembles a filesystem. I was planning on just using a map from name to file contents, which would work…

  • I play from time to time with a patch for Go that makes the Tiny runtime more capable. My current goal is to get a new backend for exp/draw working which writes to the SVGA screen. It would be cool…

  • Is is possible? Of course! package main func add(x, y int) int { return x + y } func mul(x, y int) int { return x * y } func runner(ch chan func(int, int)(int)) { for f := range ch…

  • I have been trying to make a post per week about Go, but that requires learning something interesting during the week. I’m currently cycling between several little Go toys as I get the time. One is to make Go on…

  • In my last post, I showed a program that had a strange behavior that caught my eye. I was trying to look at how Go handles shared access to globals, but the program also had the unintended effect of measuring…