The State of the Gopher (Oct)

10 October 2014

Brad Fitzpatrick

Gopher, Google

The State of the Gopher

2

bradfitz

3

The Past

4

Userbase before November 2009

5

November 2009

6

Website in 2009

7

Website in 2009

8

Compilers in 2009

9

Aside: GC vs gc

10

Ports in 2009

With gccgo, more.

11

Tools in 2009

12

Release Highlights

13

weekly releases

14

monthly releases

15

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
16

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
    }
}
17

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.

18

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)) }
19

Go 1.3 (2014-06-18)

20

Aside: Segmented vs. Contiguous stacks

21

The present (relative to Nov 2009)

22

More ports

23

Better docs

24

Users: up and to the right

25

The Cloud

26

Conferences

GoCon Tokyo

27

Conferences

28

Conferences

29

Conferences

30

CoreOS

31

build.golang.org

32

Better tools

Tooling begets better tooling!

33

The Future

34

Go 1.4

35

Go 1.4 (2014-12-01?)

36

Go 1.4

37

Go 1.5

38

Go 1.5 (2014-06-01?)

39

Go 1.5: ports

40

Go 1.5: removing more C

Didn't make Go 1.4:

41

"gc" Compiler in Go

See rsc's GopherCon slides, notes, video.

42

Go 1.5 Tracing

43

Go 1.6

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

44

Go 2.0

45

Outside of the core

46

libraries & tools

47

gccgo

All checking & improving each other:

48

Notable other compilers

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

49

In summary

50

The growth is exciting

51

You all are awesome

52

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