News for hackers. Stuff that matters.
Re:Bashible: An Ansible-inspired deployment/automation tool ... by kohtatsu on Tuesday March 24, 2020 @01:15AM (#22672172)
Y'all just have bias against the string system.

Writing decent code in bash is just as possible as any other language.

I stick to POSIX sh but same difference.

Re:Bashible: An Ansible-inspired deployment/automation tool ... by unixhero on Tuesday March 24, 2020 @02:12AM (#22672438)
Why POSIX sh? Bash is everywhere. I once in my career had access to and needed jobs performed on a mainframe with AIX running. It had bash, it had ruby, it had day, it had fish shell. I couldn't and can't understand why people insist on asceticism (Korn shell, POSIX sh) when nicer options are available.
Re:Bashible: An Ansible-inspired deployment/automation tool ... by kohtatsu on Tuesday March 24, 2020 @03:38AM (#22672847)
Eh, I simply don't need bash.

Every few dozen scripts or so I'll change the shebang to bash to have more than 1 array, but other than that I seldom pine anything that it has to offer. I believe it's a bloated mess along with most GNU utils, so avoiding it is partially out of spite, but I wouldn't impair my code to do so.

Re:Bashible: An Ansible-inspired deployment/automation tool ... by unixhero on Wednesday March 25, 2020 @02:11AM (#22682361)
*zsh ... Not "day"
Re:Bashible: An Ansible-inspired deployment/automation tool ... by m4r35n357 on Tuesday March 24, 2020 @07:03AM (#22673791)
dash is 10% of the size of bash. You don't need the interactive features when running shell scripts, and the few "extra" features are pretty crap anyway (arrays? yeah right).
Re:Bashible: An Ansible-inspired deployment/automation tool ... by BiteCode_dev on Tuesday March 24, 2020 @04:08AM (#22672955)
"Thirteen Incorrect Ways and Two Awkward Ways to Use Arrays"

http://www.oilshell.org/blog/2016/11/06.html

Re:Bashible: An Ansible-inspired deployment/automation tool ... by kohtatsu on Tuesday March 24, 2020 @05:33AM (#22673290)
Yeah I should clarify; I think it's well past the time of sh.

Still, sh is unrivaled for portability and brevity/velocity; I wouldn't swap virtually any the shell scripts I've written for python scripts. I think sh is a decent and often well-suited tool if you can manage to wield it properly (not a straightforward endeavor).

I look forward to checking out oilshell though, so thank you~

Edit: FWIW for arrays in POSIX sh I generally only use:

  set -- a b c
  echo $#
  echo "$1"
  shift
  echo "$@"
Once in a blue moon "$*" or maybe an unquoted $@. See 2.5.2 of https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V... (My go-to reference)