Accidentally starting a community project in Go

Gonum: Consistent, composable, and comprehensible scientific code

Dan Kortschak

Golang Adelaide

Go as a replacement for C

2

Original problem 2011

Hired to revise a genomics analysis tool written in C (in the style of Fortran)

Hit limits of revisibility due to design of the code

Rewrite!

3

Explore alternatives

My background is not software engineering

Needed something simple enough to pick up quickly, but adequately performant

I had played with some Go the previous year (originally released in late 2009)

The design simplicity and nearish performance characteristics looked appealing

4

Programming problems in bioinformatics

Leads to pain — critical tools without support and often only just barely working

5

Go's design principles align with scientific computing needs

"The language is based on design principles intended to promote rapid and efficient software development and reduce the barriers to entry for new developers — language features should be `simple', `orthogonal', `succinct' and `safe' (R. Pike, JAOO Conference 2010)."

"These characteristics, the language implementation and its supporting tools are well aligned with the principles for scientific computing described by Wilson et al. (2014)"

6

Building a bioinformatics library

The original problem required some basic bioinformatics routines be written

This was no doubt written for bioinformatics (xkcd.com/927)

Quietly ... some months later, bíogo was finished

This made the original problem trivial except...

7

Early Go limitations

These were all fixed by Go1.1

8

bíogo eventually published-ish

9

Using bíogo to explore bioinformatics problems

The packages included some linear algebra (Cgo-based) and graph analysis routines

Partly for exploration and partly for solving the original problem

This attracted other users of Go from the science domain ... refugees from MATLAB, C++ and others ...

Lead to a community effort to create a suite of packages for doing analyses using Go

10

go.science — G+ community

Initial discussions were on G+

11

Initial designs

Focused around:

Progressed to include numerical optimisation functions

Attracted additional committed contributors to packages at github.com/gonum

12

Small consistent contributing community

The people who contribute generally do so because it's fun

13

Largely influenced by the early golang-nuts culture

I recall Russ Cox discussing bootstrapping of the culture in a talk

"I do think it was important to engage with everyone especially at the start, and then as other voices got up to speed and were able to handle most questions, we were able to step back."

This helped build a strong early community of people wanting to build the things that were missing at the time

14

International efforts

For the majority of the project the four main contributors lived on separate continents

The first time meeting each other f2f or by video chat was this year

15

Gonum - core

16

Gonum - plotting

Originally Plotinum started by Ethan Burns
17

Gonum design principles

18

Consistency of API

Doing the same kind of thing in different settings should look approximately the same
(this is not R or perl)

19

No surprises

Behaviour should be clearly documented and magic should not enter the picture
(R, I am looking at you)

20

panics versus errors

"Don't panic" get's into the go-proverbs.io list from Effective Go but was not in the talk.

Effective Go says:
But what if the error is unrecoverable?
Sometimes the program simply cannot continue.

Gonum follows the principle that incorrect software in a scientific setting should not continue running

In the world of bioinformatics, incorrect results can lead to significant harm (erroneous drug trial approval for example)

Otherwise, idiomatic Go code

21

Notable Gonum package clients

We conducted a user survey recently — the majority of user responses indicated for-profit organisations (6x higher than academic users)

22

Documentations and tutorials

From the survey...

These are going to happen — hopefully soonish, but external help is greatly appreciated

23

Gonum 1.0.0?

What people have to say about Gonum: "If it could bother to do releases, it would be a shining example for other Go projects."

I think, after about 6 years, we are now near a 1.0.0 release and API stability

24

Thank you

Dan Kortschak

Golang Adelaide

Use the left and right arrow keys or click the left and right edges of the page to navigate between slides.
(Press 'H' or navigate to hide this message.)