My first golang program (and my first project written entirely in neovim)

Finally decided to get around to learning Go, so together with these two tutorials

and a lot of googling, I produced my first go program.

It’s a small terminal game where you try and move the X away from the E (enemy) which starts moving faster and faster as the game progresses. The movements are mapped to the HJKL keys, which mean this game servers a dual purpose of teaching me go, and making me better at navigating neovim

Repl:
https://replit.com/@InvisibleOne/My-First-Go#main.go

3 Likes

Very cool! Nice game! H+J+K+L Caught me by surprise, I didn’t know how to move until I looked at the code lol :smile: I learnt Go… and a lot of other languages on an app called Sololearn which I thought was pretty good. Haven’t ever really used Go or those other languages I learnt though so…

1 Like

Nice, im also learning Golang!

1 Like

yeah HJKL takes a bit to learn, but I feel like it’s a really efficient way to move around as it keeps my fingers on the home row and in a typing position, if I use WASD or the arrow keys I move my hands away and then have to move them back when I want to type.
So far I’m loving Go. It has a syntax that works really well for me, it’s incredibly fast and I love the idea of built in concurrency

1 Like

Nice I’m having fun learning it so far

2 Likes

Yes, I’m loving go, it’s just so fun!

3 Likes

Normal People: learn “Hello World,” loops, conditionals, etc. in language first
Chad Invis: First he watches: Concurrency & advanced threading in go

1 Like