Weeknotes 3

  • The lack of genuine next-gen titles for the Series X has kept me playing Apex Legends (albeit now at an impressive 4K 60fps), bringing my total time spent playing over the last two years to just over 500 hours. I put that down to the terrific job Respawn do of making the game feel fresh and new with regular season updates without ruining the core of the game. Thankfully 10,000 hours is a myth, so I might be well on my way to mastery.

  • My brief foray into Go proved to be lots of fun (mostly due to the excellent Go By Example), so I was on the lookout for similar language introductions when I found rustlings.

    Rustlings is a guided set of rust exercises packaged with command-line tools for watching, compiling and providing hints as you work. It’s been a joy to work through the exercises without having to leave my terminal. I’ve been incredibly impressed by how friendly the error messages are:

error[E0596]: cannot borrow *vec as mutable, as it is behind a & reference
  --> exercises/move_semantics/move_semantics2.rs:21:5
18 | fn fill_vec(vec: &Vec<i32>) {
   |                  --------- help: consider changing this to be a mutable reference: &mut Vec<i32>
21 |     vec.push(66);
   |     ^^^ vec is a & reference, so the data it refers to cannot be borrowed as mutable

error: aborting due to 3 previous errors

For more information about this error, try rustc --explain E0596.

Running rustc --explain E0596 tells me:

This error occurs because you tried to mutably borrow a non-mutable variable.

Erroneous code example:

let x = 1;
let y = &mut x; // error: cannot borrow mutably

In here, `x` isn't mutable, so when we try to mutably borrow it in `y`, it
fails. To fix this error, you need to make `x` mutable:

let mut x = 1;
let y = &mut x; // ok!
  • The second season of ‘Blown Away’ is new to Netflix, making for excellent weekend binge-watching. The glass blowing process is pretty fascinating – it’s just so primitive. The style is typical over-the-top weekly elimination, but it’s tolerable.

  • There has been no response from Apple on my bug report yet, but it’s still showing as ‘Open’, which I guess is something.🤞🏼