September 2015: gorename and FFI

Please RSVP at Meetup or Google+.

Food at 6:30 pm, sponsored by Bellstone.

News and Talks at 6:45.

Talks

gorename - how the sausage is made

@MatthiasStone explained how Go tooling is built, using the gorename command as the hook. He walked the compiler-analysis pipeline: lexical analysis with go/scanner and go/token, syntactic analysis with go/parser and the go/ast package, and traversing the resulting tree with ast.Walk and visitor types — noting that Go's syntax and its standard lexer, parser, and type checker were deliberately designed to make tools easy to write. He then toured existing tools: gofmt, goimports, gorename (precise, type-safe identifier renaming across $GOPATH), go list, the coverage-guided fuzzer go-fuzz, and errcheck for unchecked errors. The message was that building custom tools is approachable and a productivity win.

Key points:

  • Go's standard library ships a lexer, parser, and type checker for Go source.
  • Analysis pipeline: tokens (go/token, go/scanner) then AST (go/parser, go/ast).
  • ast.Walk with visitor types makes AST traversal straightforward.
  • gofmt/goimports rewrite and tidy source automatically.
  • gorename does type-safe, semantically sensitive renaming across $GOPATH.
  • go-fuzz finds crashes with coverage-guided random input.
  • errcheck flags unchecked errors (e.g. Write calls).

Matthias Stone (slides)

Embedding Go into C

Scott Brooks

News and Articles

Inside Go

Community

Go Adoption

Technology

Events

  • Monthly Hack Day - October 3 (RSVP required)
  • Edmonton Startup Week - October 19-22
  • Edmonton Go Meetup - October