News for hackers. Stuff that matters.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by ironmagma on Thursday June 25, 2020 @03:28PM (#23644524)
Python with type annotations can actually be pretty safe. There are also typechecked Python variants being developed. At any rate, I’d say the defect rate in Bash is incredibly higher than it is in Python, and 90% of that is due to unquoted string expansion. Try putting spaces in your paths and you’ll quickly see how 75% of the Unix stack breaks.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by effie on Friday June 26, 2020 @04:49AM (#23650000)
Somehow that is not a real problem in practice. Maybe whitespace is not needed in paths that much. If a need to store a random byte string in a file name appears once in a year, one can encode it into hexadecimal or base64 with % replacing /.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by ironmagma on Friday June 26, 2020 @01:39PM (#23654681)
That's sort of like saying, lack of pointer safety is not a real problem in practice. Yes, you can work around it, but when it's a problem for production systems dealing with sensitive or untrusted data it's a huge problem.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by effie on Saturday June 27, 2020 @05:34AM (#23660610)
I don't see how the two compare. As a programmer, you need pointers for dynamic allocation. You don't need to use whitespace in paths, ever. It is a convenience for the user.
Re:Show HN: Aviary.sh – A tiny Bash alternative to Ansible by ironmagma on Thursday July 02, 2020 @12:37AM (#23710053)
Whitespace in paths occur, similar to how buffer overflows occur. It's the job of the programmer to understand this and guard against it; but many don't. And all you need is one bash script that does something like this

  rm -rf $path
to go from working one day to having deleted an entire directory tree just because someone named their file

  "foo ."