Three years on…

Frank Shearar wrote “It’s nearly exactly three years since I started at LShift. I’d like to take a moment and look back at what I’ve done.”

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…”

Programming as a social activity

Frank Shearar wrote “I realised tonight something that I’d forgotten. We’re usually so busy knocking out code to fulfil our timebox coomitments that it’s perhaps easy to forget something very important: to have fun. I went to the local Smalltalk user group tonight where Jason Ayers gave a talk on simplicity: do our tools help us make simple…”

Testing the Reactor pattern

Frank Shearar wrote “A good while ago I wrote a SIP stack. Like many network things, a SIP stack needs to keep track of multiple tasks – reading or writing from sockets, asking the user to respond to events, and so on. And so I naïvely added a bunch of threads. And then I spent a few weeks…”

Assuming there’s a user is sometimes a bad idea

Frank Shearar wrote “Squeak has a very strong (historic) assumption that there’s a(n interactive) user interface. I stumbled across another occurrence of this assumption the other day. Let’s take a look at the problem, and how to fix it.”

Delimited dynamic variables from call/cc

Frank Shearar wrote “I’m prepared to own up to my biases. I like delimited continuations. I like zippers. I like getting halfway through my work, shelving my work for a time, and coming back to it later. We’ve seen the relationship between resumable exceptions and delimited dynamic variables before, but what about languages where you don’t have direct…”

Controlling fast producers in a Rabbit-as-a-Service

Frank Shearar wrote “Offering a RabbitMQ server on the public internet poses a few challenges. Today we’ll look at the problem of controlling fast producers.”

Breaking inter-package dependencies through Squeak’s pragma preferences

Frank Shearar wrote “The Preferences class provides a common place for all parts of a Squeak Smalltalk image to register their switches: Which update stream do we want to follow? What colour do we want our Browsers? Do we allow assignments to block parameters? Do we allow underscores in selector names? Preferences range from low level things that…”

Resumable exceptions for separating packages

Frank Shearar wrote “Resumable exceptions form a key component of the Smalltalk infrastructure. They are one of the standard means of communicating along the call stack, much like Common Lisp’s condition system. They can, however, add a “cross layer” dependency.”

One thing and one thing only

Frank Shearar wrote “Package dependencies appear in many ways, some more surprising than others. Let’s see what we’ve recently dug up in the trenches.”

Managing multiple GitHub repositories

Frank Shearar wrote “We all know GitHub is a fantastic way to collaborate on software. It has a fairly basic issue tracker, but it serves most purposes well enough. But if your code base is spread across several repositories, it can be difficult to know how you’re doing, from a management perspective. Octoherder can help with that.”

A Double Fugue in Traits

Frank Shearar wrote “Traits provide a means of composing an object’s functionality out of smaller, simpler parts. Verbs being limited in number, especially good ones, sometimes you want to compose two traits that share names. Today we’re going to look at how to resolve the dispute.”

Testing Ansible playbooks with Vagrant

Frank Shearar wrote “One of the projects here at LShift uses ansible to configure its EC2 machines. I needed to refactor the playbook in a minor way. But of course “refactor” doesn’t just mean “change the code”. It means “change the code (presumably for the better) while preserving behaviour“. I really didn’t want to check the change by…”

Emacs versus Vim

Frank Shearar wrote “Here at LShift we take our programming pretty seriously. Which is why we now warm up properly before discussing important topics like static versus dynamic typing, tabs versus spaces and other such crucial aspects of our craft. An Emacs operator preparing for a discussion with a vim user about text editors.”

How readable are your comments?

Frank Shearar wrote “You’ve done the Right Thing and written extensive class comments, docstrings and the like. But are they really readable?”