• Baŝto@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 months ago

    There are many fun ways of calculating stuff.

    echo $((5+8)) or abusing REPL mode of python3 or node.

    My colleagues once made fun of me using galculator with a tiling wm:

    • Marxism-Fennekinism@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Call me a plebian but I still open up Python when I want to do calculations in the command line because I don’t know how to in Bash.

      • Baŝto@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        10 months ago

        It’s complicated.

        $((5+8))

        doesn’t support floats. For float you need bc and I always have to look up how to use it. You have to tell it how many numbers it should show scale=2;5/8, by default it also only does integer.