4 ms·
Agree on all points. I'd like to add that it just tends to not punch you in the balls. I originally picked it up trying to solve a simple web hook integration
by gw98 4y ago
Agree on all points.
I'd like to add that it just tends to not punch you in the balls. I originally picked it up trying to solve a simple web hook integration problem. I had a Python Flask app running which received a webhook, did some data transformation and did a POST to an API. After spending a whole morning pissing around trying to get uWSGI, systemd via ansible etc working I went for lunch. Came back, learned enough Go and had it working in a single binary with systemd unit before the end of the day without any 3rd party packages, server mechanisms, dependency management, futzing. It just worked. The same code has been moved into docker, then into kubernetes over the last few years with no change, no bugs and no headaches.
- alyandon 4y agoSimilar experiences with Go vs Java and Python. One thing that has stuck with me to this day was how quickly I was able to write a proxy to distribute keys consistently across a set of Redis servers to break out of a bottleneck in an internal processing pipeline.
- traceroute66 4y ago> I had a Python .... IMHO, the biggest win of Go over anything Python is the single distributable. You write once. Compile (or cross-compile) once. Distribute the binary. Job done. Python you've got the hell of dependencies. Write your script once, but then users have to endure pip hell for the hundreds of libraries you've depended on. And then the potential different dependencies between different Python stuff. Go is awesome for that and the Go stdlib has 80+% of what most people need.
- throwaway894345 4y agoAlso, you can run that Go binary on any Linux system whereas with Python you'll be lucky if you can run on any non-Ubuntu/RHEL Linux system. Moreover, that Go binary will be like 10% of the size of a Python artifact (which amounts to significantly faster deployments and cold start times for things like Lambdas) and it will perform about 2-3 orders of magnitude faster than Python and there will be headroom to optimize (whereas with Python you're usually not going to eek much performance out beyond the naive implementation without substantially overhauling the architecture).
- ColonelPhantom 4y agoI work on a Python/Django project, and frankly, that hasn't been my experience at all. Poetry makes per-project dependency management using venvs a breeze. There are a few deps on native libraries, such as libjpeg, so you do need to make sure those are installed, but the needed libraries are quite easy to find on most systems, and our Dockerfile only lists a dozen or so apt packages. There are also a lot of Mac users on our team, and they don't have any issues either. Sure, it's not as nice or compact as a single binary, but "you'll be lucky if you can run on any non-Ubuntu/RHEL system" is massively overblown.
- greymalik 4y agoAre there reasonable Go alternatives to pandas, numpy, and sklearn?
- traceroute66 4y ago> Are there reasonable Go alternatives to pandas, numpy, and sklearn? You got me there. That is one of the things I keep asking Santa to bring me for Christmas. ;-) I wish someone would come along with a competitive Go ML lib. That would be awesome with a capital A ! There are one or two niche libraries around for specific tasks (e.g. anomaly detection) but there's no broad-scope general ML library.
- Xeoncross 4y agoYes, I would also like better C interop speed and better GUI toolkits for desktop apps/games. But hey, that is why we have Rust.