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
77
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
70
Rewriting Rack: A Functional Approach
alexwheeler
2
100
Man Computer Symbiosis
alexwheeler
0
81
Flipper
alexwheeler
0
85
Transducers
alexwheeler
0
52
Character Encodings
alexwheeler
0
94
Featured
See All Featured
Atom: Resistance is Futile
akmur
260
25k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
Making Projects Easy
brettharned
109
5.5k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
How STYLIGHT went responsive
nonsquared
92
4.8k
Making the Leap to Tech Lead
cromwellryan
125
8.6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
7k
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
RailsConf 2023
tenderlove
9
580
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
The Mythical Team-Month
searls
217
42k
Designing for humans not robots
tammielis
247
25k
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