Hacker News new | ask | show | jobs
by VexorLoophole 2211 days ago
As the typical SysAdmin who likes to automate stuff, I have to agree. I am not experienced enough to talk about language designs. But I can say, that writing some small CLI application and deploying it onto some server is way less work with go. Simply because you can crosscompile the application and generate a standalone binary.

Everytime I deploy some Python3.7 Flask Application on RHEL7 I start to scream.

You were talking about long running applications and broken goroutines: What is the best alternative? I liked to stumble around in Elixir but I feel bad about deploying some application probably nobody at my office will ever be able to 'fix/update'. Python feels too "sluggish". Since I am no Python Pro I have often the feeling, that I am doing something wrong because the language doesn't show any borders.

2 comments

Alternative: I'd say Java (or similar), since it has the language abilities and sophisticated static analysis tools are readily available. But startup time is still not interactively-fast, so for CLIs it's sorta a no. For long-running processes tho I mostly like it, and stuff like compacting GCs keeps it running healthier much more easily than Go.

Beyond that, dunno - I usually reach for Python since I've written it professionally for a few years and it's pleasantly terse. But it's a fair bit of work to make actually fast and I don't generally think it's worth that effort. Go is much easier there... as long as it's kept simple.

I have some strong hope for Rust, but I think it's fair to label it as "still maturing", though it's already very far of ahead many langs in some areas. And I just don't have much experience with it yet, so have no real conclusions ¯\_(ツ)_/¯

Java has made some strides with startup time. It's still a little bit slower than python when loading the full vm.
> But startup time is still not interactively-fast, so for CLIs it's sorta a no

They're working on it, for example: https://openjdk.java.net/jeps/310

They've been working on it for quite a while, yeah :) I appreciate it and they've made quite a lot of progress... but it's still nowhere near Go, and I mostly doubt it ever will be.

    # time ./hellogo 
    hello world
    
    real 0m0.005s
    user 0m0.001s
    sys  0m0.005s
It's probably "good enough" for many cases nowadays tho, yes, e.g.: https://cl4es.github.io/2019/11/20/OpenJDK-Startup-Update.ht...
You might want to check out: https://quarkus.io/
go is great for long running programs. in fact a large portion of the modern cloudstack is written in it. think of k8s, docker, nomad, etcd...

of course one needs to understand how go routines work in order to use them correctly, but thats probably true for everything, right?

> go is great for long running programs

golang's gc is non-compacting. I wouldn't be surprised if there are cases where fragmentation becomes too much for a golang service to continue behaving properly. This becomes more likely in long running services.