|
|
|
|
|
by thaumasiotes
330 days ago
|
|
> Golfing in shell can be a pipeline of tools: lately "curl | jq | awk" does a lot of lifting for me in a one-liner. > As soon as you say "switch to (favorite decent scripting environment)", you're committing to (a) many megs of its base install, (b) its package management system, (c) whatever domain packages you need for $work, and (d) all the attendant dependency hells that brings along. OK, but isn't jq just an example of a favorite scripting environment with a multi-meg install and a dependency system? What are you doing that's different from what you're advising everyone else not to do? > Golfing in a scripting environment is composing a bunch of builtin operations. Neither curl nor jq is a builtin operation. |
|
No? jq is a single binary a little over half a MB with no runtime dependencies. You can simply download it and use it. And you only need that if it’s not already included in whatever system you’re using, which it likely is. It even comes with macOS these days, which is more than what you can say for Python.
https://news.ycombinator.com/item?id=44408432
> Neither curl nor jq is a builtin operation.
Pretty sure they meant it as in builtin with the system, not the language. As per their first paragraph:
> Even a minimal image like busybox will have enough to do serious work.