SlideShare a Scribd company logo
1 of 13
Getting started with Go
8/7/2023 #golang 2
Ben Jones
Language invented by:
Rob Pike Ken Thompson
8/7/2023 #golang 3
Rob Pike wrote books like…
8/7/2023 #golang 4
Ken Thompson wrote operating
systems like…
8/7/2023 #golang 5
All the cool new stuff is go...
8/7/2023 #golang 6
golang features
• Keep most of expressiveness of dynamic
languages, gain speed
• C-like, statically linked, garbage collected
• Fast compilation
• Nice build / compile tools
• A reaction to C++ but won converts from
python/ruby devs
8/7/2023 #golang 7
Nice dev environment
• go get libraries
$ go get github.com/mefellows/muxy
$ ls $GOPATH/src/github.com/mefellows/muxy
LICENSE README.md examples main.go
muxy scripts version.go Makefile
command log middleware protocol
symptom wercker.yml
8/7/2023 #golang 8
No unused stuff
8/7/2023 #golang 9
http://tour.golang.org
http://play.golang.org
Run everywhere
• X-Compile is trivial
$ GOOS=windows GOARCH=386 go build -o egroupexpand.exe
egroupexpand.go
$ ls -l
total 19344
-rwxr-xr-x 1 ben staff 5445348 Aug 27 10:33 egroupexpand
-rwxr-xr-x 1 ben staff 4449792 Sep 29 10:44
egroupexpand.exe
-rw-r--r-- 1 ben staff 3075 Aug 27 10:33
egroupexpand.go
• No worrying about dependency versions:
[bejones@aiadm060 ~]$ python -V
Python 2.6.6
8/7/2023 #golang 10
OO without loads of cruft
• types and values instead of classes and
objects
• methods on any user-defined type
• polymorphism with interfaces
• namespacing with exports
• no inheritance
• can extend types by embedding
8/7/2023 #golang 11
Concurrency
• concurrency not parallelism (though
GOMAXPROCS can help with latter)
• “Do not communicate by sharing memory;
instead share memory by communicating”
• Goroutines: function executing concurrently
with other goroutines in same address space
• created by prefixing func or method call with “go”
• Channels - pipes that connect goroutines
8/7/2023 #golang 12
learning resources
• http://tour.golang.org
• https://golang.org/doc/effective_go.html
• https://golang-for-python-
programmers.readthedocs.org/en/latest/
• http://blog.golang.org/concurrency-is-not-
parallelism
• http://www.youtube.com/watch?v=jgVhBThJ
dXc
• https://www.golang-book.com
8/7/2023 #golang 13

More Related Content

Similar to lightning_go.pptx

Similar to lightning_go.pptx (20)

A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
Golang taipei #45 10th birthday
Golang taipei #45 10th birthdayGolang taipei #45 10th birthday
Golang taipei #45 10th birthday
 
Modern PHP
Modern PHPModern PHP
Modern PHP
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
 
Gomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of Android
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
 
Google GO
Google GOGoogle GO
Google GO
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
 
Go programing language
Go programing languageGo programing language
Go programing language
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
 
Why and what is go
Why and what is goWhy and what is go
Why and what is go
 
Golang skills session1: introduction
Golang skills session1: introductionGolang skills session1: introduction
Golang skills session1: introduction
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
Beginning development in go
Beginning development in goBeginning development in go
Beginning development in go
 
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
 
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
Daniele Esposti - Evolution or stagnation programming languages - Codemotion ...
 
AddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based ProgrammingAddisDev Meetup ii: Golang and Flow-based Programming
AddisDev Meetup ii: Golang and Flow-based Programming
 

More from ssuser4ca1eb (8)

go.ppt
go.pptgo.ppt
go.ppt
 
Von Neuman vs Harward.docx
Von Neuman vs Harward.docxVon Neuman vs Harward.docx
Von Neuman vs Harward.docx
 
UNIT I_Introduction.pptx
UNIT I_Introduction.pptxUNIT I_Introduction.pptx
UNIT I_Introduction.pptx
 
12429908.ppt
12429908.ppt12429908.ppt
12429908.ppt
 
13009690.ppt
13009690.ppt13009690.ppt
13009690.ppt
 
UNIT 3.pptx
UNIT 3.pptxUNIT 3.pptx
UNIT 3.pptx
 
Ch01_Intro_to_Embedded_Systems.pptx
Ch01_Intro_to_Embedded_Systems.pptxCh01_Intro_to_Embedded_Systems.pptx
Ch01_Intro_to_Embedded_Systems.pptx
 
Lec01_Course_Overview.ppt
Lec01_Course_Overview.pptLec01_Course_Overview.ppt
Lec01_Course_Overview.ppt
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 

lightning_go.pptx

  • 1.
  • 2. Getting started with Go 8/7/2023 #golang 2 Ben Jones
  • 3. Language invented by: Rob Pike Ken Thompson 8/7/2023 #golang 3
  • 4. Rob Pike wrote books like… 8/7/2023 #golang 4
  • 5. Ken Thompson wrote operating systems like… 8/7/2023 #golang 5
  • 6. All the cool new stuff is go... 8/7/2023 #golang 6
  • 7. golang features • Keep most of expressiveness of dynamic languages, gain speed • C-like, statically linked, garbage collected • Fast compilation • Nice build / compile tools • A reaction to C++ but won converts from python/ruby devs 8/7/2023 #golang 7
  • 8. Nice dev environment • go get libraries $ go get github.com/mefellows/muxy $ ls $GOPATH/src/github.com/mefellows/muxy LICENSE README.md examples main.go muxy scripts version.go Makefile command log middleware protocol symptom wercker.yml 8/7/2023 #golang 8
  • 9. No unused stuff 8/7/2023 #golang 9 http://tour.golang.org http://play.golang.org
  • 10. Run everywhere • X-Compile is trivial $ GOOS=windows GOARCH=386 go build -o egroupexpand.exe egroupexpand.go $ ls -l total 19344 -rwxr-xr-x 1 ben staff 5445348 Aug 27 10:33 egroupexpand -rwxr-xr-x 1 ben staff 4449792 Sep 29 10:44 egroupexpand.exe -rw-r--r-- 1 ben staff 3075 Aug 27 10:33 egroupexpand.go • No worrying about dependency versions: [bejones@aiadm060 ~]$ python -V Python 2.6.6 8/7/2023 #golang 10
  • 11. OO without loads of cruft • types and values instead of classes and objects • methods on any user-defined type • polymorphism with interfaces • namespacing with exports • no inheritance • can extend types by embedding 8/7/2023 #golang 11
  • 12. Concurrency • concurrency not parallelism (though GOMAXPROCS can help with latter) • “Do not communicate by sharing memory; instead share memory by communicating” • Goroutines: function executing concurrently with other goroutines in same address space • created by prefixing func or method call with “go” • Channels - pipes that connect goroutines 8/7/2023 #golang 12
  • 13. learning resources • http://tour.golang.org • https://golang.org/doc/effective_go.html • https://golang-for-python- programmers.readthedocs.org/en/latest/ • http://blog.golang.org/concurrency-is-not- parallelism • http://www.youtube.com/watch?v=jgVhBThJ dXc • https://www.golang-book.com 8/7/2023 #golang 13