Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on Golang

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The package main tells the Go compiler that the package should compile as an executable program instead of a shared library. The main function in the main package is the entry point of the program.

Install the Latest Version of Software on Ubuntu

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Using PPA

Using snap

The snap version of a software is usually more up-to-date than the version installed using apt-get. For example, NevoVim (installed using apt-get) on Ubuntu 20.04 is …

Send and Sync in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips and Traps

  1. Send and Sync are 2 thread-safty related marker traits in Rust.

  2. A type is Send if and only if it can be transferred across thread boundaries. A type is Sync if and only if &T