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
90
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
86
Rewriting Rack: A Functional Approach
alexwheeler
2
160
Man Computer Symbiosis
alexwheeler
0
130
Flipper
alexwheeler
0
140
Transducers
alexwheeler
0
70
Character Encodings
alexwheeler
0
120
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
770
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
110
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
How to Talk to Developers About Accessibility
jct
2
150
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
970
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Facilitating Awesome Meetings
lara
57
6.8k
Fireside Chat
paigeccino
42
3.8k
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