jeudi 1 février 2018

Go for the beginners

Because I might not be the only newbie in the Go world this year, I've decided to document here all the information I gathered.

Install Go

Go installation is pretty well documented on the  official Golang page but it can be summarized to:
  • Downloading the binary matching your OS and architecture from the golang download page
  • Extracting the software (/usr/local/go seems to be the recommended location)
    tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz
  • Creating your Workspace
    Go workspace is the place where you put your source code and where the go packages/tools will be downloaded.
    mkdir $HOME/go
    In this directory, create a src subdirectory where you'll place all your code.
    mkdir $HOME/go/src
  • Setting the environment variables
    Setting  GOPATH (export GOPATH=$HOME/go) to point to your workspace.
    Then your path PATH (export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
    • For a system-wide configuration:
      in /etc/profile
    • For a per user configuration:
      in ~/.profile

Editor configuration

If you use vim as I do, you might want to use vim-go or vim-polyglot and read the vim-go tutorial.
But if it's not your case, your solution is probably on the page about the IDEs and editor plugins for Go.

So much more to explore

With this (basic) setup I'm now ready to go further 
  • Setting up Go in docker
  • Do some datascience
  • Unleashed goroutines/channels power
  • ...
But that will be in another post :-)


There are of course many more useful resources to start with.
But I hope the following ones will be as useful to you as they were to me.

mardi 9 janvier 2018

2018 a new year to go

First let me wish you, dear reader, the very best for 2018:
May you have health, success, fun and love in abundance!

For some years now, I've started learning/using a new computer language every year.
2018 will be no exception: This year I'll learn and use the Go language.

Why Go?

  • Because I like the (clean and simple) syntax
  • Because the tooling/ecosystem is mature enough for me
  • Because of the performance (even if it's not my primary concern)
  • Because the goroutines / channels look like neat tools to tame concurrency
  • Because I like the interface concept
  • Because I subscribe to  Eric S. Raymond opinion that Go could be the next C

As usual I'll try to post about my discovery of the Go world.
So stay tuned, and don't hesitate to comment and give advice.

vendredi 15 septembre 2017

Rewriting my .vimrc from scratch

"From time to time, I review my tools/processes to keep what’s useful, ditch what is no longer necessary or even convenient, and improve what can be improved. As a developer, I spend a lot of time using the Vim text editor, so in this article I’ll spend some time rewriting my .vimrc."

The full article on Medium.