Setup page for quick reference.
Go
Best take would be to simply use Homebrew:
brew install go
As an alternative, one could download the binaries from golang.org, create a new folder (go
) and export the workspace path to one’s bash profile:
echo "export GOPATH=Users/anirban166/Documents/go" >> .bash_profile
Follow up with a terminal reboot, then verify workspace path using echo $GOPATH
.
This however, could lead to GOPATH entry is relative; must be absolute path: "Users/username/Documents/go".
, as it did for me - but the prime reason I included this is so the reader can resolve this (which isn’t readily mentioned elsewhere) by following the steps I did:
- Remove your profile (must be
/home
or wherecd ~
leads):rm ~/.bash_profile
- Set workspace path to
./go
(gonna create) and export to bash profile:export GOPATH=$HOME/go >> .bash_profile
- Set up the environment path:
go env -w GOPATH=$HOME/go
- Check using
go env GOPATH
:/Users/anirban166/go
Proceed to create directories and files as per the
go/src/foldername/filename.go
idiom:mkdir go cd go mkdir src cd src mkdir worldlines cd worldlines/ touch worldlines.go
Edit via your favourite editor, then use
go run worldlines.go
for running the file.
Rust
Browse through the official documentation, or follow along:
- Cmd C+V:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
Default settings1 apply.
- Reboot terminal, update rustup:
rustup update
- Check version to see if its correctly installed: (just like
go version
/git --version
)rustc --version
And yep, the
c
stands for compiler. - Moving onto the IDE, I’ll be using VSC with the
rust-analyzer
extension or therust language server
/rls
(if its still available as an extension). Don’t forget to set up cargo.
Note that its better to follow the updated docs or have a discussion with the members from the official Rust discord channel, instead of following relevant blog material, since they tend to get outdated with the proceedings of the language.
R
Homebrew again :)
brew install r
Set up RStudio + install.packages("devtools")
and get started with the developmental (github) branch of testComplexity via devtools::install_github("Anirban166/testComplexity")
.
NS-2/3
Follow along: https://anirban166.github.io//NS-setup/