Plurrrr

Sat 05 Mar 2022

Safe Pin Projections Through View Types

"Pinning" is one of the harder concepts to wrap your head around when writing async Rust. The idea is that we can mark something as: "This won't change memory addresses from this point forward". This allows self-referential pointers to work, which are needed for async borrowing over await points. Though that's what it's useful for. In practice, how we use it is (generally) through one of three techniques:

  • stack pinning 1: this puts an object on the stack and ensures it doesn't move.
  • heap pinning: using Box::pin to pin a type on the heap to ensure it doesn't move. This is often used as an alternative to stack pinning.
  • pin projections: convert from coarse: "This whole type is pinned" to more fine-grained: "Actually only these fields on the type need to be pinned".

Source: Safe Pin Projections Through View Types, an article by Yoshua Wuyts.

Beginner's Guide to Linkers

This article is intended to help C & C++ programmers understand the essentials of what the linker does. I've explained this to a number of colleagues over the years, so I decided it was time to write it down so that it's more widely available (and so that I don't have to explain it again).

Source: Beginner's Guide to Linkers, an article by David Drysdale.

Exclusive: ‘Mac Studio’ is coming

As Apple gets closer to its deadline for completing the transition from Intel Macs to Apple Silicon, the company is expected to introduce even more computers with its own chips this year. 9to5Mac has learned from sources that in addition to the rumored new Mac mini and Mac Pro, Apple has been developing a brand new “Mac Studio” computer.

Source: Exclusive: ‘Mac Studio’ is coming – is it the pro Mac mini or mini Mac Pro?, an article by Filipe Espósito.