4 ms·
Well, at least I will be able to run my bash scripts in 5 years
by kh_hk 8mo ago
Well, at least I will be able to run my bash scripts in 5 years
- gf000 8mo agoFor some quality of "run", because I'm hella sure that it has quite a few serious bugs no matter what, starting from escapes or just a folder being empty/having files unlike when it was written, causing it to break in a completely unintelligible way.
- deleted 8mo ago[deleted]
- kh_hk 8mo agoI guess we have wildly different expectatives of what a language is responsible for and what not.
- pzmarzly 8mo agoFair. My bash scripts only broke 3 times over the years: - when ls started quoting filenames with spaces (add -N) - when perl stopped being installed by default in CentOS and AlmaLinux (had to add dnf install -y perl) - when egrep alias disappeared (use grep -E)
- greener_grass 8mo agoBash is not a great cross-platform choice. Too many subtle differences. The best way is a scripting language with locked-down dependency spec inside the script. Weirdly .NET is leading the way here.
- Imustaskforhelp 8mo agoPython with uv seems decent in here too.
- kh_hk 8mo agopython does EOL releases after 5 years. I guess versions are readily available for downloading and running with uv, but at that point you are on your own. bash is glue and for me, glue code must survive the passage of time. The moment you use a high-level language for glue code it stops being glue code.
- oguz-ismail2 8mo ago>Too many subtle differences. Such as?
- hiccuphippo 8mo agoThis entire list: https://www.shellcheck.net/wiki/ https://www.shellcheck.net/wiki/
- oguz-ismail2 8mo agoHow is any of that a subtle difference between platforms?
- greener_grass 8mo agoThe tools you will call from your bash script differ in subtle ways between Linux, macOS, MinGW. One good example is `uuidgen`
- 8mo ago
- g947o 8mo agoI don't know Ruby, but chances are that your Python/JavaScript scripts are going to run in 5 years as well, if you stick to standard library.
- ChrisGreenHeur 8mo agoand then your mamba changes
- nilamo 8mo agoWhat's that even mean
- g_delgado14 8mo agono one knows what it means, but it's provocative!!
- ChrisGreenHeur 8mo agohttps://github.com/mamba-org/mamba https://github.com/mamba-org/mamba
- dmix 8mo agoJust don't use any NPM libraries (if possible) and you'll be fine. I personally wouldn't use typescript for this sort of thing.
- sroussey 8mo agoWhy not? You can have bun or even node these days run it directly.
- dmix 8mo agoI've been using node for a decade now and I've had to update NPM libraries a number of times as Node itself upgraded. I have a feeling it will get a lot more stable with ESM and the maturity of the language but if you're writing something you need to run 5-10yrs from now I wouldn't touch a library unless it's simple and has few of it's own dependencies.
- norir 8mo agoI consider luajit a much better choice than bash if both maintainability and longterm stability are valued. It compiles from source in about 5 seconds on a seven year old laptop and only uses c99, which I expect to last basically indefinitely.