Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Golang Concurrency
Search
Alex Wheeler
November 16, 2017
0
88
Golang Concurrency
Alex Wheeler
November 16, 2017
Tweet
Share
More Decks by Alex Wheeler
See All by Alex Wheeler
Running Rings Around Rack
alexwheeler
0
84
Rewriting Rack: A Functional Approach
alexwheeler
2
140
Man Computer Symbiosis
alexwheeler
0
120
Flipper
alexwheeler
0
130
Transducers
alexwheeler
0
66
Character Encodings
alexwheeler
0
120
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Designing for humans not robots
tammielis
253
25k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Rails Girls Zürich Keynote
gr2m
95
14k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
Scaling GitHub
holman
462
140k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
The Pragmatic Product Professional
lauravandoore
36
6.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Transcript
Golang The Future of VTS
• Yes, there will be Vim.
Background • Developed at Google • Born out of frustration
• 1. efficient compilation • 2. efficient execution • 3. ease of programming
Background • make programming fun again • feel of dynamic
language with type safety • run-time that supports GC, concurrency • lightweight flexible type system
Hello, World
Syntax
implicit typing
Concurrency
BUT FIRST… • Concurrency != Parallelism • Concurrency is about
dealing with lots of things at once. • Parallelism is about doing lots of things at once
goroutine • lightweight thread managed by the go runtime •
little memory (~2kb stack space), can spawn millions if you want • go f() starts function f in a new groutine
None
• “Don't communicate by sharing memory; share memory by communicating.”
- Golang • Communicating Sequential Processes - Tony Hoare
<- channels <- • typed structure through which you can
send/receive values using the channel operator • first class values • block by default
sending to channel
receiving from channel
Time for some code
None
None
Vim Support • https://github.com/fatih/vim-go
Further Learning • https://tour.golang.org • brew install go -- cross-compile-common
• #go-nuts on freenode • @askwheeler