Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: ee1ed6637a
Fetching contributors…

Cannot retrieve contributors at this time

188 lines (103 sloc) 2.821 kB
Go is Awesome
(and you should be using it)
Caleb Spare
Ooyala
caleb@ooyala.com
* This talk will not teach you Go
But I hope you're interested to learn more afterwards.
This talk will include:
- A brief intro to the language and tools
- Code
- Demos
- Gophers
* Overview
* A brief history
- Developed at Google starting in 2007.
- Open-sourced in 2009.
- Original creators: Robert Griesemer, Rob Pike, and Ken Thompson.
- Go now has many contributors both inside and outside of Google.
- March 2012: Go 1 released.
.image images/gopherbw_small.png
* The language
- Statically typed, with type inference
- Generates fast native code
- Compiles _really_ quickly
- Simple and fun
- Has pointers (but none of the dangerous stuff)
- Concurrent
- Garbage-collected
.image images/run.png
* Go is opinionated
- Public/private is determined by initial upper-case letters
- Error handling
- No classes/inheritence
- Aggressive focus on language simplicity and orthogonality of features
- Built to help software engineers, not advance PL research
.image images/talks.png
* Go on everything
Go has a spec, and two separate compilers that implement it.
gc:
- The original Go compiler
- So fast
- (x86, x64, ARM) × (Linux, OS X, Windows, FreeBSD, OpenBSD, NetBSD, Plan 9)
gccgo:
- A GCC frontend for Go
- Included in GCC 4.7.1 (released in June)
- Sometimes generates more optimized code
- Supports additional architectures (PPC, MIPS, SPARC, ...) and OSes (Solaris, IRIX, ...)
* Dat tooling
- go
- go get
- gofmt
- gofmt -r
- go test
- gofix
- go vet
- godoc
- gdb
- profiling
.image images/project.png
* Code Examples
* Our hello world is a server
.play hello_net.go
* Concurrency
.play concurrency.go /START OMIT/,/END OMIT/
* Demos
* Building go code
Build and run:
go run mycode.go
Just build an executable:
go build mycode.go
Oh, your server is a different platform?
GOARCH=amd64 GOOS=linux go build
.image images/pkg.png
* Your deploy script
#!/bin/bash
scp myserver root@prod-server1.us-east-1.ooyala.com:/opt/awesome_server/
.image images/help.png
* Go in the industry
- Google (golang.org, youtube, dl.google.com, ...)
- Canonical
- Heroku
- SoundCloud
- Stathat
- Bitly
- Nokia
- BBC Worldwide
- ...
.image images/ref.png
* ...Ooyala?
- Docs: yard-doc.ooyala.com
- hastur-go
- go-ooyala-headers
- Go is already in production! (almost)
.image images/frontpage.png
* Get started!
.link http://tour.golang.org/ Go Tour
.link http://golang.org/doc/effective_go.html Effective Go
.link https://gobyexample.com/ Go by Example
.link http://golang.org/doc/codewalk/ Code Walks
.link http://golang.org/pkg/ Stdlib docs
.link http://go.pkgdoc.org GoPkgDoc
.link http://play.golang.org/ Go Playground
.image images/appenginegopher_small.jpg
Jump to Line
Something went wrong with that request. Please try again.