physical-cpu-count is a lovely example of small packages on npm doing one thing well. It's a cross-platform solution with clearly discussed limitations and design decisions regarding hyperthreading.
https://www.npmjs.com/package/physical-cpu-count
Related Posts
One nice feature of cargo that I wasn't previously aware of: you don't need to do anything after updating your Cargo.toml.
In npm, you need to remember to `npm i` after changing package.json. It's not declarative and the state can get out of sync.
TIL Advent of Code and Project Euler will deliberately look for puzzles where the naive solution is worse than quadratic.
This ensures that people can solve them with any programming language. You don't want fast languages to be able to use the naive solution.
The games console market is fascinating: there's incentive to *not* provide upgraded models.
You want the guarantee that a game for $X just works on any $X purchased.
E.g. the Switch OLED has a bigger screen, and a better CPU than the original, but it's downclocked to match the original Switch's CPU.