home.social

#expr — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #expr, aggregated by home.social.

  1. I think programming languages should implement placeholder syntax as a formal part of the language.

    For instance, you could say <#EXPR#> is an expression. Then, when people give code examples where they leave a placeholder for an expression, using <#EXPR#> is going to be parseable and syntax-highlighted, instead of only sometimes being usable.

    For instance:

    <#TYPE#> get_<#IDPART#>(<#FNARGS#>) {
    <#ID#> = 7;
    }

  2. Working with Numbers: Sandra Henry-Stocker explains how to use expr and other helpful commands on the Linux command line fosslife.org/math-linux-comman

  3. CW: Rosetta Code

    And now I did #zsh :

    rosettacode.org/wiki/Modular_e

    But really it is #GNU #expr doing the work. I had considered using GNU #bc instead. Basically anything that can do the calculation. Unix-users in the old days often liked hoc; maybe there is a hoc implementation you could use. :)

    #zshell #RosettaCode