Thursday, May 20, 2021

The golang tutorials

 I started learning Google's computer language "go" (also called golang, likely due to how easy it is to search for "go" in Google) about three years ago. I run Linux, so I downloaded "go" and started the tutorials. I think i got pretty far into it because i wrote a couple of the benchmarks i've written in other languages: c, fortran, perl, java, guile (scheme), php. These are the matrix multiply and the prime number sieve. It took a while, but i found the "go" sources on my system. They even work.

However, i had upgraded my Linux operating system to Linux Mint 19 (Mint is derived from Ubuntu, which is derived from Debian). I needed "go" again, so i installed it from the repository. Really easy. I got go version 1.10. The current version is 1.16.

I started the tutorials again, thinking i'd breeze through them, just as a refresher. However, bits from the tutorial stopped working pretty quickly. I did a bunch of Google searches. Frankly, it was frustrating. Eventually, concentrating on this one problem all day, i stumbled across something that suggested that the command "go mod tidy" was introduced in go version 1.14. I told the Linux package manager to remove go, downloaded the version 1.16 tarball and installed it.

That's what i get for trying to learn a new fast changing language. Hopefully, i'll use it often enough that i won't have to go through the tutorial again. At least my benchmarks still work.