Old spring-cover clock with chain

A memory gotcha

Matthew Sackman wrote “A couple of weeks ago I was reading Juho Snellman’s blog on implementing a hierarchical timer wheel, and as usual, over on the morning paper, Adrian’s covered a paper on various approaches to timer structures. What I found most interesting though is the final graph on Juho’s blog post where he does some performance testing…”

By Nevinson, C R W [Public domain], via Wikimedia Commons

Pushing Back

Matthew Sackman wrote “Over the last year I’ve become more and more convinced that possibly the most important feature of any queuing system is the ability to take action immediately upon enqueuing of a new item, where the action can modify the queue, and is based on state of the queue itself. Most commonly, this is referred to…”

By Shamsuddin Muhammad from Fort Hood, TX, USA (Jack Swagger) [CC-BY-2.0 (http://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons

Documenting an HTTP API with Swagger

Sam Carr wrote “I recently tried out Swagger, for documenting an HTTP API. The big win with Swagger is that it provides a sweet HTML UI to browse your API docs and experiment with sending requests and viewing responses, which is a great experience for other developers that are trying to get to grips with your API. Try…”

Fudging generics in Go with AST rewriting

Frank Shearar wrote “One possible workaround for a lack of generics is code generation. Let’s look at Go’s AST manipulation to make a Maybe Int out of a Maybe a.”

Going m(on)ad with parser combinators

Frank Shearar wrote “It’s about time someone started talking about Go again around here, so I picked up the old editor, and (painlessly!) installed Go. Maybe 5 minutes later I had the world’s faster compiler, a test framework, a coverage analyzer and a bunch of stuff besides available on my machine. But what to do? Hello World is…”

Some reflective testing with gocheck

Tim Clark wrote “Last time I wrote about custom gocheck checkers and wrote a checker that checked if a slice of int contained a specific int – it would be nice to have a generic contains checker and using the go reflection we can write one.”

Testing with gocheck – custom checkers

Tim Clark wrote “This post follows on from my previous post about gocheck. gocheck uses a checker abstraction to test arbitrary properties in tests, in the previous post for example we used the Equals and Panic checkers to test our code. It is very simple to write your own checkers and I will walk through some more complicated…”

Testing go programs with gocheck

Tim Clark wrote “The Go programming language comes with a simple built in test framework testing – this is usable and functional but is lacking in features that you might find in other languages test frameworks. A more fully featured testing framework called gocheck has been developed by Gustavo Niemeyer, this blog post walks through developing an extremely…”

Using goinstall for your own local code

Tim Clark wrote “I am working towards finishing a small project in go and my thoughts have turned to how I will package it up and release the code. The latest release of go has made some changes to goinstall so that code installed by you as a user can be kept separate from the base installation of…”

Using the syntax tree in Go

Tim Clark wrote “The Go programming language provides an abstract syntax tree, parser and pretty printer as libraries written in Go. This enables you to mangle your Go code by writing code in Go – this isn’t quite lisp macros but it is a nice facility. Here is some example code that I will transform by manipulating the…”