M by N Code Explosions - oils-for-unix/oils GitHub Wiki

Back to Perlis-Thompson Principle

Some concrete examples:

  • Linux distros!
    • I know this from Oil. It is annoying to have 10 different distros! You have M applications and N packaging tasks. There are some tools that try to ameliorate this.
  • Language package managers {Python pip, JavaScript npm, Rust cargo, ...} x {Linux, Windows, OS X, ...}. This partly explains the XKCD comic -- Python packaging is messy and hard to test.
  • Build systems likewise have a (M languages) x (N operating systems) problem, e.g. Zig https://lobste.rs/s/cykija/zig_build_system#c_eizab2
  • Shell Completion
    • M applications to write completions for, and N shells.
    • This is what Shellac (Shell Autocompletion) was supposed to solve! However I think most shells including bash are too weak to support it at the "user level"
  • NUL terminated vs lines of text
    • 2 formats x N operations
    • xargs -0 and grep -z, sort -z, head -z
    • compare with QSN
  • Google's cluster management: You're using 3.5 distributed operating systems / cluster managers when you use Kubernetes
  • Google service turnup (Broccoli Man, etc.)
  • Protobuf generated code.
    • {types ... } x {copy, assign, serialize, deserialize, DebugPrint, ...}
  • Some parts of Windows? Well COM reduces the code explosion, just like Unix pipes do. It's dynamic / runtime software composition, not static / compile time.
  • Docker
    • duplicates push and pull
    • duplicates remote storage -- i.e. with the registry

Non-open source

  • The "Send To" functionality in iOS and Android operating systems.

Perlis-Thompson Problems

These are like Mx N code explosions, but it's often 2x2 or 2x N. There are 2 things instead of 1.