←back to thread

Fun with uv and PEP 723

(www.cottongeeks.com)
619 points deepakjois | 7 comments | | HN request time: 1.285s | source | bottom
1. rednafi ◴[] No.44374530[source]
> Before this I used to prefer Go for one-off scripts because it was easy to create a self-contained binary executable.

I still do because:

- Go gives me a single binary

- Dependencies are statically linked

- I don’t need any third-party libs in most scenarios

- Many of my scripts make network calls, and Go has a better stdlib for HTTP/RPC/Socket work

- Better tooling (built-in formatter, no need for pytest, go vet is handy)

- Easy concurrency. Most of my scripts don’t need it, but when they do, it’s easier since I don’t have to fiddle with colored functions, external libs, or, worse, threads.

That said, uv is a great improvement over the previous status quo. But I don’t write Python scripts for reasons that go beyond just tooling. And since it’s not a standard tool, I worry that more things like this will come along and try to “improve” everything. Already scarred and tired in that area thanks to the JS ecosystem. So I tend to prefer stable, reliable, and boring tools over everything else. Right now, Go does that well enough for my scripting needs.

replies(3): >>44374741 #>>44374806 #>>44380003 #
2. 7bit ◴[] No.44374741[source]
Good for you. I dont See how this is relevant to this topic.
replies(1): >>44375076 #
3. deepakjois ◴[] No.44374806[source]
(author of post here)

I still use both Go and Python. But Python gives me access to a lot more libraries that do useful stuff. For example the YouTube transcript example I wrote about in the article was only possible in Python because afaik Go doesn't have a decent library for transcript extraction.

replies(1): >>44375091 #
4. rednafi ◴[] No.44375076[source]
> Before this I used to prefer Go for one-off scripts because it was easy to create a self-contained binary executable.

Here's how it's relevant :)

5. rednafi ◴[] No.44375091[source]
Yeah that's a fair point. I still do a ton of Python for work. The language is fine; it's mostly tooling that still feels 30 years old.
6. istjohn ◴[] No.44380003[source]
I needed to process a 2 GB xml file the other day. While my Python script was chugging away, I had Claude translate it to Go. The vibe-coded Go program then processed the file before my original Python script terminated. That was the first time I ever touched Go, but it certainly won't be the last.
replies(1): >>44380817 #
7. rednafi ◴[] No.44380817[source]
Go is pretty awesome. I’m sure that spending some time with the script would have made it at least 50 times faster than Python.