42 Astoundingly Useful Scripts and Automations for the Macintosh

Padmath in Ventura

Padmath stops working in Ventura because bc, which it relies on, now has a built-in abs function.

Jerry Stratton, September 27, 2023

macOS Ventura logo: Apple’s logo for macOS Ventura.; macOS Ventura

I apologize for putting this off for so long; I’ve been expecting to see more changes that need to be made in scripts after upgrading to Ventura, because this is hardly worth a post. But it could be very annoying if you’re relying on padmath.

Padmath stopped working after upgrading to Ventura. I noticed that very quickly—it’s one of my most commonly-used Services. But it’s a simple fix. The version of bc on Ventura now has an abs function. This means that abs is now a reserved word, and cannot be used to create a custom function.

Since the custom function was just a means of adding an abs function anyway, delete the lines that define the custom abs function and padmath will start working again.

[toggle code]

  • define abs(value) {
    • if (value < 0) {
      • return -value
    • } else {
      • return value
    • }
  • }

I haven’t yet noticed any other issues with using the scripts under Ventura.

  1. <- Monterey