Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The worst part about terminal programs is that they can’t be deprecated. Or I don’t know of a way to do it. Because once you release something someone might immediately put it into a script somewhere instead of running it interactively. Now what do you do? Display a “hint” about the deprecation? Well no one’s gonna read that because it’s a script which is run non-interactively.

So you just have to design the UI perfectly on the first try. That’s possible for small tools but what about larger ones? Past a certain point it becomes a truism that do-it-once perfectly without iteration is impossible.



how is this different from some library somewhere?


Other programs can use a later version of the library.

This would be analogical, if commands always included their version. For example:

    rm-2.44.287-SNAPSHOT -r /


How is it similar? I get deprecation warnings if I update the library. I can pin the version of the library. A library is something I work with, unlike a terminal program which might be written and forgotten.

Then those terminal programs get upgraded on the next system update because hey, you’re supposed to the get latest version right?

Terminal programs can do the same (`-v1`) in principle. Few do.


A terminal program is quite easy to pin, though, just do this:

    - $package-manager install $program 
    - which $program
    - cp $program ~/my/own/directories
    - $package-manager uninstall $program
done. It won't ever change by accident.


Not quite that simple. You can't just pin the program itself, you also have to pin its dependencies. Which means you have to run ldd to get the libraries it loads (whether directly or transitively), and copy those too, and then you patch the program and its dependencies to set the rpath to $ORIGIN/my/own/directories, then you have to examine all the other more subtle application-level gotchas (e.g. path search order for config files, hard-coded absolute paths, etc.) and port those too. Once you're done, congratulations! You've done 50% of the work of a package manager.


Yeah, I wish this kind of thing[0] were a core POSIX tool which worked reliably on all systems and binaries. Bit of an oversight, that.

[0]: https://github.com/greenpau/statifier


Nice. Then I will not hesitate to break the UI in my upcoming terminal program releases. (... they are quite well designed in my head.)


Good. You shouldn't deprecate interafaces used only directly by users either, if at all possible.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: