Тёмный

Learn The Basics of Google's Go Lang in About 15 Minutes (using a Raspberry Pi) 

Gary Explains
Подписаться 310 тыс.
Просмотров 31 тыс.
50% 1

Go is an open source programming language supported by Google. It is easy to get started and fun to learn. In this video I will cover the basics of Go including installation, variables, functions and loops - all in about 15 minutes!
---
Let Me Explain T-shirt: teespring.com/gary-explains-l...
Twitter: / garyexplains
Instagram: / garyexplains
#garyexplains #golang

Опубликовано:

 

17 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 89   
@DK-ox7ze
@DK-ox7ze Год назад
Nice short video. Please do another one covering arrays, objects, classes, etc!
@Ihavetoreturnsomevideotapes
No classes in go
@Flankymanga
@Flankymanga Год назад
Thank you - i did have a little experimenting with Go couple of months back. I found it very easy to learn the basics.
@uajoku
@uajoku Год назад
A brilliant way to introduce this language. Excellent overview of the basic concepts. Please can you do a simple GUI app in GO!
@sexysensation
@sexysensation Год назад
Hi Gary, Great video nice and concise. Thank you for sharing.
@dixztube
@dixztube Год назад
Business project is keeping me in node land but I have started a go project for what I think is a cool game and been learning and working in go when I can and I love it!
@hermanstokbrood
@hermanstokbrood Год назад
It's always interesting seeing big companies taking already existing parts of programming languages to a different level. Of course it should always be clear why this new language deserves a chance. Besides C I see also influences from Pascal in this short demonstration. I would like to see some more videos on this subject. Especially how it compares to Python or even general purpose programming languages.
@BboyKeny
@BboyKeny Год назад
Go is very popular for its concurrency capabilities with better speed than most garbage collecting language. I'd say the better alternative for these features would be Rust, but Rust is considerably harder to learn and slower to develop in.
@SmallSpoonBrigade
@SmallSpoonBrigade Год назад
Python is fine if you actually know what you're doing, but it's a garbage language to start with. It's like if somebody saw C and was like, I don't think this language maims enough innocent people, so I'll create one with semantic white space and dynamic typing and a bunch of natural language just to try and lure in unsuspecting newbs.
@4rumani
@4rumani 5 месяцев назад
​@@SmallSpoonBrigade Oh please, the white space? Who cares
@LampJustin
@LampJustin Год назад
Haha give it a go, nicely done :D Gimme more ^^
@Private-GtngxNMBKvYzXyPq
@Private-GtngxNMBKvYzXyPq Год назад
Thank you for posting this.
@muddyexport5639
@muddyexport5639 Год назад
Thanks Prof! and can and will do.
@schizoidman9459
@schizoidman9459 Год назад
Thanks, Gary, for pushing Go to SBCs. That's something I have been vindicating for quite a long time. I haven't jumped to SBCs yet (I explain why below), but I did try compiling and executing GO programs with VSCode. It is a great language, very suitable for large systems, and it is quite easy to learn even though it has many advanced features built-in. I used to program in C/C++ for many years and I switched to Java 12 years ago. I feel Go is my next language. The package structuring is pretty similar to Java, which is cool. Go also allows object-oriented programming and polymorphism (using Interfaces) although it doesn't allow inheritance (I rarely use inheritance in Java myself. I try to avoid it.) I'm also very interested in SBCs but I didn't yet decide to go for them because I am waiting for a low cost SBC with an 8-core ARM processor to efficiently take advantage of multithreading in these processors. In my experience with parallel processing in memory shared machines in the mid 90's, parallel processing really starts to become more interesting in terms of performance from 8 processors forward. I think this still holds nowadays, or it's maybe much worse (meaning, maybe the optimal performance start with more than 8 processors) because of the highly parallel architectures these days, where multiple instructions can be executed in a single cycle, thus benefiting single thread performance more than in multiple threads. Even though Go is excellent for the purpose I just mentioned, what really attracted me to this language was the fact it has support for vector graphics. This is another similarity with Java that explicitly supports vector graphics in Graphics2D (JRE). This allows to develop portable and quite fancy GUIs even on Android. Therefore, since Go is a compiled language (thus, faster than Java), one way to be able to afford complex vector GUIs with lots of animations, etc. in SBCs would be using parallel processing. Go also allows using SIMD instructions available on ARM processors as well, which is quite interesting in vector graphics because one can execute transformations in several points at the same time. This configuration would work efficiently even with quite basic graphics output on board. Combining these features with future support for vector graphics on GPUs would be a quite interesting use of SBCs even outside the embedded software universe. Therefore, I would suggest more multithreading applications in GO using several cores in ARM SBCs in this channel. I think it could encourage many people to produce interesting and efficient applications using cheap ARM SBCs. It was a great idea to propose Go on SBCs and I can only encourage you to go deeper in this way. And again, Gary. Thank you very much for this video. I think this is the only channel to propose such contents. Good choice!
@kioshiki4519
@kioshiki4519 Год назад
Nice quick intro to Go and use of a Pi.
@MrVipulLal
@MrVipulLal Год назад
Great introduction to the language
@wisteela
@wisteela 8 месяцев назад
I started learning it a while ago. I like it. It reminds me of a cross between C and Python. I'll be getting back into learning more soon.
@user-vk9vc8kb1b
@user-vk9vc8kb1b Год назад
thank you for sharing. good course 👍
@chriscauwelier
@chriscauwelier Год назад
Thanks, you've got me started in go!
@GaryExplains
@GaryExplains Год назад
Rock on!
@stephenelliott7071
@stephenelliott7071 Год назад
A nice concise video on go. You might have covered how to break out of an infinite loop in code though rather than panic button pressing ;-) . Using 'if/break' and maybe cover 'continue' too.
@oladunk9986
@oladunk9986 Год назад
Thanks for a very good introduction to the Go language. How can we access IO pins on the RPi?
@SofianMW
@SofianMW Год назад
great!
@chrisschene8301
@chrisschene8301 Год назад
I really like the feature that returns multiple items
@user-vr2rq5hl6l
@user-vr2rq5hl6l Год назад
I have been using Go for over a year. As a long time C programmer, I was unsure about Go at first. I changed my mind after using it extensively. Now, I prefer Go to both Perl and C.
@guilherme5094
@guilherme5094 Год назад
Thanks👍
@1MarkKeller
@1MarkKeller Год назад
*GARY!!!* *Good Morning Professor!* *Good Morning Fellow Classmates!* Stay safe out there everyone!
@GaryExplains
@GaryExplains Год назад
MARK!!!!
@ganswijk
@ganswijk Год назад
Hey Gary, I usually love your video's (and wanted to know about GO, because our below stairs neighbor programs in it), but in this case you only explain how it's different from C but you don''t explain why it has to be different and why it's better and why we should use it! Btw I hate Python for similar reasons. And Ruby even more...
@GaryExplains
@GaryExplains Год назад
True, that it is a weakness of the video, but to be fair the video is about learning Go, not why you should learn it. If the title was "3 reasons to learn Go" then it would be a very different video.
@mayank8387
@mayank8387 Год назад
Let's GO!!
@zer0b0t
@zer0b0t Год назад
looks fun
@luxusAI
@luxusAI Год назад
nice short video, great..
@chuckmuckamuck8001
@chuckmuckamuck8001 Год назад
Excellent presentation, about the language not some cleverly contrived problem like some short tutorials.
@esra_erimez
@esra_erimez Год назад
4:18 folder called "cobol"
@no_rubbernecking
@no_rubbernecking Год назад
"Keep on going!" Saw what you did there
@virtuallifeform
@virtuallifeform Год назад
I see you're modeling your "Polar Bear in a Snowstorm" T-shirt, but I don't see it in the store. ❄🐻‍❄❄
@JohnPMiller
@JohnPMiller Год назад
Docker is written in Go.🐓Thanks for the video.
@knofi7052
@knofi7052 Год назад
...give it a go! 😂
@test40323
@test40323 Год назад
Thank you for the intro. There are so many languages base on C, almost like a corner stone language. What would you say the advantage over python3 or Rust?
@jcfawerd
@jcfawerd Год назад
faster than python3, easier than Rust to write
@santosvella
@santosvella Год назад
Go's philosophy is meant to be simple to learn most functions. A minimal set of base functions. Without so many options for doing the same thing makes it easy to know what to choose. Go has excellent web server support from the std lang. Concurrency is very easy.
@stephenlee5929
@stephenlee5929 Год назад
Not sure but it also feels like its very similar to Basic, which was developed about 8 years earlier. And is still usable. I think it is normally slower than C.
@raianmr2843
@raianmr2843 Год назад
Learn all three and you'll find your answer. Trust me, all three are worth your time. Preferably follow this track if you're only starting to learn programming now: Python -> Go -> Rust.
@mgbrown09
@mgbrown09 Год назад
@@stephenlee5929 BASIC was developed in 1964 go didn't appear till 2009 that makes the difference 45 years.
@PrabhatXLR8
@PrabhatXLR8 Год назад
I want to see, will it accept below in same program or does it set the data type in very first value assignation j:=7 j:="hello"
@GaryExplains
@GaryExplains Год назад
Give it a try at go.dev/play/ and come back and tell us what you discover.
@PrabhatXLR8
@PrabhatXLR8 Год назад
@@GaryExplains So I tried and found, Go Lang sets the type of variable during declaration and assigning of value and doesn't let it change. func main() { j := "Hello World" fmt.Println(j) j := 7 //even tried with just j = 7 fmt.Println(j) } Error: ./prog.go:12:7: cannot use 7 (untyped int constant) as string value in assignment
@petehall1900
@petehall1900 Год назад
Thank you, maybe one about rust?
@GaryExplains
@GaryExplains Год назад
I did Rust already, two videos in fact.
@petehall1900
@petehall1900 Год назад
@@GaryExplains sorry I missed those, thank you, will view
@JamesTJoseph
@JamesTJoseph Год назад
Why don't you reuse the already launched terminal? use ctrl+`
@fuddyduddy
@fuddyduddy Год назад
Thanks, nice video. Just wonder why the title is "about 15 minutes", not "in 17 minutes" ?
@GaryExplains
@GaryExplains Год назад
🤣
@jfdd43
@jfdd43 Год назад
Odd there isn’t a repo for Go. It would make sense to use apt-get
@amitaimedan
@amitaimedan Год назад
I remember writing c like that in the 80's. Basically it's just c/java programming. Why should I use this?
@GaryExplains
@GaryExplains Год назад
Obviously multiprocessing and multithreading have been around for a long time, even before the 80's, but goroutines are more than that, plus they are built into the language directly, not via some OS specific API.
@AbrahimSabir
@AbrahimSabir Год назад
it would have been useful if you could hv highlighted some features of the language which are not already available in languages like C or Pascal... going thru the pains of learning a new languages for cosmetic gains isn't really worth it
@GaryExplains
@GaryExplains Год назад
The video isn't called "Why use Go"
@inomo
@inomo Год назад
Hi @Gary it seems that you covered 2 (Go and Rust) out of 3 (Go, Rust and Julia) of the languages of this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6qCH7Y2rc_w.html ... perhaps you can cover Julia as well in a future video? 🙂
@eduardoandrescastilloperer4810
Now do one for rust
@GaryExplains
@GaryExplains Год назад
Eh? I did already.
@23o8idlnqdolkqd
@23o8idlnqdolkqd Год назад
Would have been nice if you mentioned structures and methods
@GaryExplains
@GaryExplains Год назад
Yes, but then the video would be too long for an intro video.
@ashwith
@ashwith Год назад
Please do one on rust. I can't make sense of it :-/
@GaryExplains
@GaryExplains Год назад
I have done two videos on Rust already. Try this one for starters ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-a8abW3RlOn8.html
@ashwith
@ashwith Год назад
@@GaryExplains oops, I should have searched before commenting. Sorry about that and thank you for the link!
@nosuchthing8
@nosuchthing8 Год назад
Like C and Pascal
@GaryExplains
@GaryExplains Год назад
Just because it uses := it doesn't make it like Pascal at all. := has a special meaning in Go.
@nosuchthing8
@nosuchthing8 Год назад
@@GaryExplains no, also the order of types in a function, etc. And having a var statement to list out variables. And explicitly writing out func to represent a function
@GaryExplains
@GaryExplains Год назад
True, but all of those things are just cosmetic, the language itself bares little resemblance to Pascal.
@zrodger2296
@zrodger2296 Год назад
Helloord!
@brookestephen
@brookestephen Год назад
I think Visual Basic wants it's language syntax returned...
@FirstLast_Nba
@FirstLast_Nba Год назад
I guess if Google says it's the next big thing then it's the next big thing.
@maximsNotes
@maximsNotes 8 месяцев назад
give it a GO was actually funny
@gg-gn3re
@gg-gn3re Год назад
your installation.. apt install go
@GaryExplains
@GaryExplains Год назад
Hmmm... No, they tend to be old versions. Google recommends the method I showed.
@malcolmhutchison
@malcolmhutchison Год назад
There no such thing as if-loops
@GaryExplains
@GaryExplains Год назад
LOL 😂 I don't know what you're referring to specifically, I guess I misspoke at some point in the video, I don't know. But the point is in fact all loops are if loops, you do something then you compare the condition and then if it is true/false you jump back again. So in machine code or even in some programming as you just do a jump back to the top of the loop.
@critical_always
@critical_always Год назад
WHY!
@tubeDude48
@tubeDude48 Год назад
*WHY!?* We *DON'T* need another language!!! Personally I don't have anything to do with google!!
@mikeg9b
@mikeg9b Год назад
You just watched a RU-vid video. RU-vid is owned by Google (Alphabet).
@tubeDude48
@tubeDude48 Год назад
@@mikeg9b - I know! I just DON'T use google search engine!!
@nitsanbh
@nitsanbh Год назад
Focuses too much on installation, and zero seconds on the main idea of go: channels and goroutines
@GaryExplains
@GaryExplains Год назад
Which is why there are more videos in the series 🤦‍♂️ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-rQQcIGqp0OU.html
@GaryExplains
@GaryExplains Год назад
And also you can't learn about channels and goroutines if you can't install it or know about basic things like variables.
@maartentoors
@maartentoors Год назад
you had me at GO. import "fmt" func add (x int, y int) int { return x +Y } func main () { fmt.PrintIn(add(add(42,3))
Далее
The One BIG Reason to Learn Google's Go Language
17:55
Просмотров 155 тыс.
Learn Go in 12 Minutes
13:34
Просмотров 942 тыс.
Go: 1 Thing I Would Change
15:02
Просмотров 55 тыс.
5 Tips to Help You Learn Windows PowerShell
18:34
Просмотров 41 тыс.
I'm Coming Around To Go...
21:33
Просмотров 104 тыс.
Beginners Should Think Differently When Writing Golang
11:35
I Can Save You Money! - Raspberry Pi Alternatives
15:04