Go: 90% Perfect, 100% of the time.

"GoCon Tokyo"

31 May 2014

Brad Fitzpatrick

Hello!

2

"60% of the time, it works every time...."

3

"That makes no sense"

4

Starting a new project, picking a language...

5

Disclaimer

6

2010

7

Idea: Camlistore

8

Which language to use for Camlistore?

9

Before Go

10

Perl: The Good

11

Python, Ruby, Javascript: The Good

12

Perl: The Bad

13

Python, Ruby, Javascript: The Bad

14

Summary

15

Fun vs. fast

16

Maybe mix of two languages?

17

But...

18

Server? Threads or events?

19

Threads

Executor pool = new ScheduledThreadPoolExecutor(/* ???? guess a number */);
20

Events

21

Concurrency and performance

22

It's really hard to pick a language!

23

2010. Let's try Go!

24

Go: 90% Perfect, 100% of the time.

25

Go: 90% Perfect, 100% of the time.

26

Before Go

27

After Go

28

Go's Concurrency

for {
  conn, err := listener.Accept()
  // check err
  go serve(conn)
}
29

Concurrency before Go

30

After Go

31

Go is showing up for all sorts of tasks

32

Web frameworks

33

Image processing

34

Crypto

35

Replacing shell scripts

36

Camlistore

37

Controlling flying drones

38

Emulators

39

Disassembler, linker, compiler.

40

Mobile

41

Audio synthesis

42

Cloud infrastructure

43

Load balancers & servers

44

Raspberry Pi GPIO

45

What other language is used for all these?

Go!

46

And even better...

47

Go built-in tools

48

So why isn't Go perfect?

49

Generics

50

No generics (Simon Peyton Jones: "Haskell is useless")

51

Data races can happen

$ go test -race
52

Code generation

53

gccgo

54

Compiling to JavaScript isn't yet great

55

Limited Mobile Support

56

Embedding Go in C/C++/Java/etc

57

Shared libraries

58

Garbage collector

59

Hot stack splits

60

But...

61

Go for everything

62

Thank you

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