Slide 1

Slide 1 text

The Roots of Go Baishampayan "BG" Ghose Helpshift, Inc. @ghoseb GopherCon 2015 // Denver, CO 1

Slide 2

Slide 2 text

Or, How our past holds the key to the future. GopherCon 2015 // Denver, CO 2

Slide 3

Slide 3 text

Motivation — Should I really care? — Yes, you should. GopherCon 2015 // Denver, CO 3

Slide 4

Slide 4 text

And now, for something completely different... GopherCon 2015 // Denver, CO 4

Slide 5

Slide 5 text

How we design software — We need to build a doghouse — 3x3x3 foot GopherCon 2015 // Denver, CO 5

Slide 6

Slide 6 text

How we design software (contd.) — We succeeded. Oops! — Now let's scale this solution — 100x100x100 foot — Should be easy! GopherCon 2015 // Denver, CO 6

Slide 7

Slide 7 text

How we design software (contd.) — What we get instead is something else — Physics. Obey! GopherCon 2015 // Denver, CO 7

Slide 8

Slide 8 text

How we design software (contd.) — It's a feature! — We're building Pyramids all along GopherCon 2015 // Denver, CO 8

Slide 9

Slide 9 text

Rinse. Repeat. GopherCon 2015 // Denver, CO 9

Slide 10

Slide 10 text

GopherCon 2015 // Denver, CO 10

Slide 11

Slide 11 text

At scale, architecture dominates material. — Alan Kay GopherCon 2015 // Denver, CO 11

Slide 12

Slide 12 text

ar·chi·tec·ture n. the art or practice of designing structures GopherCon 2015 // Denver, CO 12

Slide 13

Slide 13 text

The Roots of Go GopherCon 2015 // Denver, CO 13

Slide 14

Slide 14 text

The Arches of Go GopherCon 2015 // Denver, CO 14

Slide 15

Slide 15 text

BCPL Martin Richards (1967) GopherCon 2015 // Denver, CO 15

Slide 16

Slide 16 text

BCPL GET "libhdr" LET start() = VALOF $( writes("Hello, world!*n") RESULTIS 0 // ret $) GopherCon 2015 // Denver, CO 16

Slide 17

Slide 17 text

Modula-2 Niklaus Wirth (1977) GopherCon 2015 // Denver, CO 17

Slide 18

Slide 18 text

Modula-2 MODULE ggTkgV; FROM InOut IMPORT ReadCard, WriteCard, WriteLn, WriteString, WriteBf; VAR x, y, u, v : CARDINAL; BEGIN WriteString ("x = "); WriteBf; ReadCard (x); WriteString ("y = "); WriteBf; ReadCard (y); u := x; v := y; WHILE x # y DO (* ggT (x, y) = ggT (x0, y0), x * v + y * u = 2 * x0 * y0 *) IF x > y THEN x := x - y; u := u + v ELSE y := y - x; v := v + u END END; WriteString ("ggT ="); WriteCard (x, 6); WriteLn; WriteString ("kgV ="); WriteCard ((u+v) DIV 2, 6); WriteLn; WriteString ("u ="); WriteCard (u, 6); WriteLn; WriteString ("v ="); WriteCard (v , 6); WriteLn END ggTkgV. GopherCon 2015 // Denver, CO 18

Slide 19

Slide 19 text

Modula-3 Go's alien ancestor from Outer Space MODULE GCD EXPORTS Main; IMPORT IO, Fmt; PROCEDURE GCD(a, b: CARDINAL): CARDINAL = BEGIN IF a = 0 THEN RETURN b; ELSIF b = 0 THEN RETURN a; ELSIF a > b THEN RETURN GCD(b, a MOD b); ELSE RETURN GCD(a, b MOD a); END; END GCD; BEGIN IO.Put("GCD of 100, 5 is " & Fmt.Int(GCD(100, 5)) & "\n"); IO.Put("GCD of 5, 100 is " & Fmt.Int(GCD(5, 100)) & "\n"); IO.Put("GCD of 7, 23 is " & Fmt.Int(GCD(7, 23)) & "\n"); END GCD. GopherCon 2015 // Denver, CO 19

Slide 20

Slide 20 text

CSP CAR Hoare (1978) GopherCon 2015 // Denver, CO 20

Slide 21

Slide 21 text

Aside: Concurrent Prime Sieve Douglas McIlroy (1968) GopherCon 2015 // Denver, CO 21

Slide 22

Slide 22 text

CSP Sieve [SIEVE(i:1..100):: p,mp:integer; SIEVE(i - 1)?p; print!p; mp := p; comment mp is a multiple of p; *[m:integer; SIEVE(i - 1)?m ? *[m > mp ? mp := mp + p]; [m = mp ? skip ||m < mp ? SIEVE(i + 1)!m ] ] ||SIEVE(0)::print!2; n:integer; n := 3; *[n < 10000 ? SIEVE(1)!n; n := n + 2] ||SIEVE(101)::*[n:integer;SIEVE(100)?n ? print!n] ||print::*[(i:0..101) n:integer; SIEVE(i)?n ? ...] ] GopherCon 2015 // Denver, CO 22

Slide 23

Slide 23 text

Newsqueak Rob Pike (1988) GopherCon 2015 // Denver, CO 23

Slide 24

Slide 24 text

Newsqueak counter:=prog(end: int, c: chan of int) { i:int; for(i=2; i

Slide 25

Slide 25 text

Newsqueak sieve:=prog(c: chan of int) { for(;;){ prime:=<-c; print(prime, " "); newc:=mk(chan of int); begin filter(prime, c, newc); c=newc; } }; count:=mk(chan of int); begin counter(10000, count); begin sieve(count); ""; GopherCon 2015 // Denver, CO 25

Slide 26

Slide 26 text

Smalltalk Alan Kay, et al (1976) GopherCon 2015 // Denver, CO 26

Slide 27

Slide 27 text

C, Pascal, & APL Syntax, Semantics & Pragmatics GopherCon 2015 // Denver, CO 27

Slide 28

Slide 28 text

Go Geneology GopherCon 2015 // Denver, CO 28

Slide 29

Slide 29 text

Doing less of the wrong things allows us to do more of the right things. — Anonymous Coward GopherCon 2015 // Denver, CO 29

Slide 30

Slide 30 text

Less is exponentially more. — Rob Pike GopherCon 2015 // Denver, CO 30

Slide 31

Slide 31 text

Thanks Go forth, and build good software! GopherCon 2015 // Denver, CO 31