3 ms·
> The entire point... https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_what_it_does https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_wha... Pr
by xelxebar 5y ago
> The entire point...
https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_what_it_does https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_wha...
Prescriptivism is perhaps helpful when starting out on a project and you need to prune down a vast tree of possibilities, but once you already have a thing, prescriptivist declarations are pretty impotent at helping you understand how that thing works.
If your bash script has some tight loop, calling out to external tools can incur a huge performance overhead. Rewriting in bash can aleviate that. How do you re-write it in bash? Well... this article provides good fodder for thought!
> like a bar of soap that never gets wet.
Here are some uses of soap that would be hampered by it getting wet:
- Make-shift lubricant on that sticky cabinet drawer
- Draw temporary markings, like a crayon
- Potpourri alternative
- Fragrant seal on your letters
- Deterrent to puppies chewing on your chair legs
- chasil 5y agoWindows is your foil. On the same hardware, Windows is 100x slower at forking an external process. When you are using a (POSIX) shell on Windows, don't cause a fork, especially in a loop. Do everything internally in a POSIX shell on Windows, unless an enormous time penalty is acceptable.
- jrm4 5y agoSure. I mean, I'm not being pure prescriptivist here; always good to explore and mess about with things. But if I'm getting a tad meta, I think there is generally enough of what you're doing (experts really hacking at things to push their limits) and not enough of what I think Bash/scripting could provide -- namely non-experts discovering "coding" NOT through the typical "start with a real language and do hello world" and instead through, "Here's bash; it's for stringing together other programs to do stuff."