I’m talking about programs that can’t be improved no matter what. They do exactly what they’re supposed to and will never be changed.

It’ll probably have to be something small, like cd or pwd, but does such a program exist?

  • kibiz0r@midwest.social
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    2 months ago

    Is there a perfect building?

    Probably not, since they exist in an environment — which is constantly changing — and are used by people — whose needs are constantly changing.

    The same is true of software. Yes, programs consist of math which has objective qualities. But in order to execute in the physical world, they have to make certain assumptions which can always be invalidated.

    Consider fast inverse sqrt: maybe perfect, for the time, for specific uses, on specific hardware? Probably not perfect for today.

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 months ago

    For software to be perfect, can not be improved no matter what, you’d have to define a very specific and narrow scope and evaluate against that.

    Environments change, text and data encoding and content changes, forms and protocol of input and output changes, opportunities and wishes to integrate or extend change.

    pwd seems simple enough. cd I would already say no, with opportunities to remember folders, support globbing, fuzzy matching, history, virtual filesystems. Many of those depend on the environment you’re in. Typically, shells handle globbing. There’s alternative cd tools that do fuzzy matching and history, and virtual filesystems are usually abstracted away. But things change. And I would certainly like an interactive and fuzzy cd.

    Now, if you define it’s scope, you can say: “All that other stuff is out of scope. It’s perfect within it’s defined target scope.” But I don’t know if that’s what you’re looking for? It certainly doesn’t mean it can’t be improved no matter what.

  • thingsiplay@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    2 months ago

    I don’t think such thing as perfect software exist, only abandoned software. If the environment changes, then the software needs changes too.

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 months ago

      ugh, no way. It might do a fine job with typesetting, but the user experience is utterly awful and that’s very unlikely to change because of design choices over 40+ years. If you don’t think so, give typst a real try.

      • grue@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 months ago

        TeX will be perfect after Knuth dies and the version number is incremented to π.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    2 months ago

    Yeah you probably can’t do to much more to pwd or yes or whatever (yeah I know about the silly optimisations). I think once you get much beyond that there are always more features you can add. Even for something like cd, people have made fancier versions with fuzzy matching and so on.

  • kryptonianCodeMonkey@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    Depends on your definition of “perfect” and “improved”. Is it perfect because it does one fundamental thing really well? Is it improved by adding new features?

    I think what you’re meaning is, is there a program that is ubiquitous (or at least works anywhere), will basically remain used forever because it does a fundamental job that will always need to be done, and it does that job in the most straightforward way possible that can’t be made any algorithmically simpler, faster, etc. Probably plenty, honestly. Bitwise operations, arithmetic, fetch/store, etc. Though ubiquity/working anywhere gets rarer the higher you go from hardware. Even your suggestion of cd, for example, has to interface with an OS’s file system, of which there are several common types. What it’s doing is simple in concept, but will always be dependent on other programs for the file system.