Hacker News new | ask | show | jobs
by majewsky 2211 days ago
My favorite calculator of all time is units(1). For example, to calculate how long it takes to download a 20 MiB file over a 56 kbit dialup connection:

  $ alias units='units --verbose' # in your shell rc
  $ units
  Currency exchange rates from FloatRates (USD base) on 2019-06-05
  3460 units, 109 prefixes, 109 nonlinear units
  
  You have: 56 kibibit/second
  You want: hour/20 mebibyte
          reciprocal conversion
          1 / (56 kibibit/second) = 0.8126984126984126977077949 hour/20 mebibyte
          1 / (56 kibibit/second) = (1 / 1.23046875) hour/20 mebibyte
Note that if you are on macOS, you want to install a more recent units via homebrew. The one shipping with the base system is positively ancient.