Go away Python
Go as a scripting language
- Thread centers on a trick that makes
.gofiles directly executable by abusing//comments to smuggle ago run "$0" "$@"command through the shell. - Some like the idea: reuse project code in scripts, get static binaries, type checks, and Go’s “if it compiles, it runs” reliability for deployment and internal tooling.
- Others argue Go’s verbose error handling and multi-file/module bias make it a poor fit for quick-and-dirty scripts compared to classic scripting languages.
Python environments and the rise of uv
- Many comments push back on the blog’s “don’t want to care about pip vs poetry vs uv” premise by pointing out uv + PEP 723 inline metadata largely solves “just run this script with dependencies”:
uv run --script+ a PEP 723 block can install the right Python version and packages on the fly, per-script, with hard‑link deduplication.- Some say uv is “a work of art” and has replaced pip, venv, pyenv, pipx, etc. in their workflow.
- Others are skeptical:
- Python’s history of competing tools and virtualenv confusion has burned them; they see uv as another layer rather than a fundamental fix.
- Using
uv pipstill inherits pip’s quirks around incremental installs and dependency resolution order. - For non‑Python users, discovering uv is non‑obvious, and Python’s overall ecosystem still feels fragmented.
Scripting ergonomics and use‑cases
- Several distinguish between “scripting” (small, single-file, OS-glue tasks) and “shippable software” (tests, pipelines, reproducible builds):
- Bash/Perl/ruby/babashka are praised for shell integration and minimal ceremony.
- Python is described as in the middle: good stdlib, but packaging/env pain, especially for non‑pure‑Python deps (GTK, GUI bindings).
- Go and Rust are seen as better for robust tools than for throwaway one-offs.
Portability, shebangs, and alternatives
- Discussion of portability issues:
env -Ssupport, paths togo, macOS/BSD quirks, exit code propagation fromgo run. - Alternatives to the Go hack:
gorun,yaegifor Go; binfmt_misc for transparentgo run.- uv, pipx, nix-shell for Python; PEP 723 standardizing inline metadata.
- First-class script support in .NET (
dotnet runwith package directives), Erlangescript, babashka (Clojure), Javajbang, Swiftswift-sh, Rust’scargo scriptmode.
- General agreement that many languages can be bent into “scripting,” but ergonomics and tooling maturity vary widely.