Hacker News new | past | comments | ask | show | jobs | submit login

Except it does all the time. There are innumerable differences between the OSX, BSD, GNU, and other versions of common command line tools. There are plenty of cases where `jq` will or will not be available. Finally there are differences in how `/bin/sh` will interpret things (which there shouldn't be) depending upon underlying shell is running ksh, zsh, bash, dash, etc.



> There are plenty of cases where `jq` will or will not be available.

Sure. The argument is that it's a lot easier for the user of the program to read an error message that says "jq is required. Run apt-get install jq or homebrew install jq" than to fuck around with the python or ruby ecosystem, especially if they don't work in those languages.

> Finally there are differences in how `/bin/sh` will interpret things (which there shouldn't be) depending upon underlying shell is running ksh, zsh, bash, dash

Do you have an example of code that is written to the POSIX standard of shell that runs differently? I only write POSIX shell, and use https://github.com/koalaman/shellcheck to verify that to prevent that exact thing.


And if you cannot install jq because you're not root, you can still wget it somewhere, it's a static binary.


It's not a static binary, at least on my Mac. It dynamically links against Oniguruma.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: