4 ms·
The flaw in your reasoning is that a minimal POSIX shell, in the form of dash, compiles to less than 100k bytes on 32-bit x86. None of the other technologies t
by chasil 3y ago
The flaw in your reasoning is that a minimal POSIX shell, in the form of dash, compiles to less than 100k bytes on 32-bit x86.
None of the other technologies that you did or might mention exhibit this property.
Korn features were explicitly excluded to meet this goal in the standard.
- sudosysgen 3y agoMicropython will compile to much less than 100k bytes on x86, too.
- vesinisa 3y agoThere's also the set & setting that is good to consider. For example, I bet lots of the scripts in my current employer's DevOps infrastructure have filename handling bugs that could've been avoided by meticulously following these rules. But these scripts are not meant to be used by customers - the people using these scripts are other developers working on the product wanting to set up the development environment. The script might fail if you do some stupid / unexpected stuff, even as simple as having a space in your Unix user name (i.e. home directory path) or VCS clone directory. I would feel weak from the knees if someone exposed these scripts on a web server and let them process input from untrusted external parties. Yet, I don't care if the scripts aren't 100% perfect if they work as long as the user doesn't do something silly. Plus, many of them are portable meaning you can run them out of the box on Linux, MacOS or WSL (Windows) without installing any extra software.
- wodenokoto 3y agoI have literally never worked on a computer where that would make a noticeable difference. I am however struggling with those footguns regularly.
- chasil 3y agoI actually used Microsoft Xenix on 80286 "minis" early in my career. The 64k limit for the text segment of a compiled C program is likely a large factor in the POSIX shell standard; it seems designed to fit architectures similar to this. The Korn shell was included in later versions of Xenix, but I understand that the source code was an unmaintainable mess, hence the removal of features in the final standard for the shell language.
- aragilar 3y agoMost home routers have < 16MB of space.