News for hackers. Stuff that matters.
Re:More powerful Go execution traces by Xeoncross on Thursday March 14, 2024 @07:46PM (#39710389)
For good reason, the JVM has a ton more knobs that need adjusting. You can't just run Java code. The JVM has a lot of tricks you have to customize for based on your workload.

For years until 1.19 the Go GC has had only one tuning parameter (GOGC).

Re:More powerful Go execution traces by rileymichael on Thursday March 14, 2024 @08:35PM (#39710764)
I don't see the connection you're making between knobs that adjust runtime behavior and tooling. As an aside, "you can't just run java code" is a bit hyperbolic, plenty of people "just run" java apps and rely on the default ergonomics. The modern JVM also offers more automated options, such as ZGC which is explicitly self tuning.
Re:More powerful Go execution traces by iamcalledrob on Friday March 15, 2024 @05:48AM (#39713779)
With Go, you never spend hours/days debugging broken builds due to poorly documented gradle plugins. As an example :)

You really, truly, just run.

Re:More powerful Go execution traces by pjmlp on Friday March 15, 2024 @07:51AM (#39714499)
That is the problem right there, using Gradle without having learned why no one uses Ant any longer.

As for Go, good luck doing just run when a code repo breaks all those URL hardcoded in source code.

Re:More powerful Go execution traces by philosopher1234 on Friday March 15, 2024 @11:10AM (#39716627)
That’s not a real issue:

* the go module proxy ensures repos are never deleted, so everything continues to work

* changing to a new dep is as easy as either a replace directive or just find and replace the old url

Re:More powerful Go execution traces by pjmlp on Friday March 15, 2024 @02:17PM (#39718947)
It requires work to keep things working, exactly the same thing.
Re:More powerful Go execution traces by philosopher1234 on Saturday March 16, 2024 @04:53AM (#39724317)
The module proxy is used by default and requires no work. I don’t think what you’re saying makes much sense.
Re:More powerful Go execution traces by pjmlp on Saturday March 16, 2024 @08:28AM (#39725331)
So there is some magic pixie dust that will fix url relocations for the metadata used by the proxy, without having anyone touch its configuration?
Re:More powerful Go execution traces by philosopher1234 on Saturday March 16, 2024 @01:20PM (#39727701)
I think I’m missing something, because I’m pretty sure you understand the go module proxy (having seen you around here before) but I really don’t understand what problem you’re talking about.

If a module author deletes or relocates their module, the old module is not deleted or renamed from the module proxy. It is kept around forever. Code that depends on it to not break does not break.

If they relocated and you want to update to the new location, perhaps for bug fixes, then you do have to do a bit extra work (a find and replace, or a module level replace directive) but it’s a rare event and generally a minor effort, in my opinion, so I don’t think this is a significant flaw.

For most users most of the time they don’t need to think about this at all.

Re:More powerful Go execution traces by badrequest on Friday March 15, 2024 @03:19PM (#39719655)
> good luck doing just run when a code repo breaks all those URL hardcoded in source code

You're on a tear in this thread being wrong about how Go works, but I'm really curious what extremely specific series of events you're imagining would have to happen to lead to this outcome. If I use a dependency, it gets saved in the module proxy, I can also vendor it. You would have to, as a maintainer, deliberately try to screw over anybody using your library to accomplish what you describe.

Re:More powerful Go execution traces by pjmlp on Friday March 15, 2024 @03:55PM (#39719993)
Not when one git clones an existing project, only to discover the hardcoded imports are no longer valid.

Being a mantainer has nothing to do with some kind of gentlemens code of condut.

Re:More powerful Go execution traces by tsimionescu on Friday March 15, 2024 @01:53AM (#39712444)
Note that Go needs those knobs just as much as the JVM does, at least some of them. They just didn't want to expose them.
Re:More powerful Go execution traces by philosopher1234 on Friday March 15, 2024 @11:11AM (#39716638)
Which knobs does go need?
Re:More powerful Go execution traces by tsimionescu on Friday March 15, 2024 @12:01PM (#39717245)
Fine-grained control over various GC phases and decisions (such as the level of parallelism, max pause times). Until Go 1.19, it was even missing a max memory limit, and even now it only has a soft memory limit.

Additionally, of course it would be nice to have more GC options, such as choosing between a throughput-oriented GC design and a latency-oriented one, having the option of a compacting GC of some kind to avoid fragmentation, or even having a real time GC option.

Go has chosen a very old-fashioned GC design with very few tuning parameters possible, but even so it only exposes a very basic form of control.

Re:More powerful Go execution traces by cwbriscoe on Friday March 15, 2024 @07:29PM (#39721765)
I would rather just write code and trust the existing GC than mess around with knobs all day. I suppose there are < 1% of projects that may see some benefit in messing with the GC.
Re:More powerful Go execution traces by kbolino on Saturday March 16, 2024 @11:34AM (#39726799)
I agree with most of your points but how is it "old-fashioned"? To me, that means things like reference counting or long stop-the-world pauses, neither of which are true of Go.
Re:More powerful Go execution traces by Ironlink on Friday March 15, 2024 @02:03AM (#39712483)
> You can't just run Java code. The JVM has a lot of tricks you have to customize for based on your workload.

This sounds like something you would hear 10 years ago in relation to the CMS garbage collector. Since Java 9, G1 has been the default gc for multi core workloads and is self-tuning. The CMS gc was removed 4 years ago. If you do need to tune G1, the primary knob is target pause time. While other knobs exist, you should think carefully before using them.

We run all of our workloads with vanilla settings.