The State of the Gopher (Oct)

10 October 2014

Brad Fitzpatrick

Gopher, Google

The State of the Gopher

bradfitz

The Past

Userbase before November 2009

November 2009

Website in 2009

Website in 2009

Compilers in 2009

Aside: GC vs gc

Ports in 2009

With gccgo, more.

Tools in 2009

Release Highlights

weekly releases

monthly releases

Go 1.0 (2012-03-28)

// before Go 1:
latLong[storeID] = LatLong{}, false
name[userID] = "", false

// new:
delete(name, userID)
pkg net/http, const StatusOK = 200
pkg net/http, const StatusOK ideal-int
pkg net/http, type RoundTripper interface { RoundTrip }
pkg net/http, type Server struct, TLSConfig *tls.Config
pkg net/http, var DefaultServeMux *ServeMux
pkg time, method (*Timer) Reset(Duration) bool
pkg unicode/utf8, func ValidRune(int32) bool

Go 1.1 (2013-05-03)

type S struct { once sync.Once; ... }
func (s *S) init() { ... }
func (s *S) Foo() {
    s.once.Do(s.init)
func abs(n int) int {
    switch {
    case n < 0: return -n
    default:    return n
    }
}

Aside: precise vs conservative GC

Conservative GC: if it "looks like" a pointer, treat it like one.

[ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ]
[ ptr? ] [ byte slice (skipped in Go 1.0)                             ]
[ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ] [ ptr? ]

Terrible for 32-bit (e.g. ARM) computers: many integers look like pointers.

Precise GC:

[ int ] [ ptr     ] [ string      ] [ byte slice          ]
[ int ] [ t f t f ] [ ptr ] [ int ] [ float64     ] [ ptr ]

Requires knowing what every position in memory actually is.

Go 1.2 (2013-12-01)

s := make([]byte, 10, 20)
foo(s[10:12:15])

func foo(s []byte) { fmt.Println(len(s), cap(s)) }

Go 1.3 (2014-06-18)

Aside: Segmented vs. Contiguous stacks

The present (relative to Nov 2009)

More ports

Better docs

Users: up and to the right

The Cloud

Conferences

GoCon Tokyo

Conferences

Conferences

Conferences

CoreOS

build.golang.org

Better tools

Tooling begets better tooling!

The Future

Go 1.4

Go 1.4 (2014-12-01?)

Go 1.4

Go 1.5

Go 1.5 (2014-06-01?)

Go 1.5: ports

Go 1.5: removing more C

Didn't make Go 1.4:

"gc" Compiler in Go

See rsc's GopherCon slides, notes, video.

Go 1.5 Tracing

Go 1.6

Who knows.
Find out next year at dotGo Paris 2015!

Go 2.0

Outside of the core

libraries & tools

gccgo

All checking & improving each other:

Notable other compilers

And all three written in Go, use go/parser, go/types, etc.
We can't wait to join them.

In summary

The growth is exciting

You all are awesome

Thank you

Brad Fitzpatrick

Gopher, Google

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.)