Live data from Hacker News

Go 1.9 is released

blog.golang.org

11–20 of 131 posts

Re: Go 1.9 is released

#11

So this new concurrent map? Am I right in understanding it's designed for cases where you have a map shared between goroutines but where each goroutine essentially owns some subset of the keys in the map? So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?

This lightning talk gives some great information on use cases for the new sync.Map: https://youtu.be/C1EtfDnsdDs

Re: Go 1.9 is released

#12
post #2

I am looking forward to 1. runtime/pprof package now include symbol information 2. Concurrent Map 3. Profiler Labels 4. database/sql reuse of cached statements 5. The os package now uses the internal runtime poller for file I/O.

> 4. database/sql reuse of cached statements

!! that wasn't a thing until now?

Re: Go 1.9 is released

#13
post #7

Does anyone know of compile-time benchmarks spanning 1.4 through 1.9, along the lines of [1]? I see there's (more) parallel compilation in 1.9 - so that should improve elapsed time (but not reduce cpu time) of compilation. Would be nice to know if 1.9 is (still) on track catch up to/pass 1.4. [1] https://dave.cheney.net/2016/11/19/go-1-8-toolchain-improvem...

Dave posted one about halfway through the release cycle, showing a small improvement. That was before the parallel-function compilation though, so things might have gotten better since then.

Re: Go 1.9 is released

#14
post #4

t.Helper() is certainly going to be very useful. I often implement functions like: func testServer(t *testing.T, port int) { ...do stuff... if err != nil { t.Fatalf("failed to start server: %+v", err) } } similarly you can have func assertMapEquals(t *testing.T, a, b map[string]int) It lets you hide such helper methods from the test failure's stack trace (where t.Fatal is actually called), making test errors more rea…

Yes indeed this is totally awesome. It’s a problem that occurs on any platform, and not only for testing. I often see this problem with logging as well, where some validation/helper function logs an error separate from the context it occurred in, potentially making it hard to trace without a stacktrace logged as well.

Re: Go 1.9 is released

#15
Nice can't wait to run some of our benchmarks against this. Go has the awesome property of always becoming a little bit faster every release. It's like your code becomes better without doing anything. Love it :)

Re: Go 1.9 is released

#16
I was looking forward to the fix for the dreaded Linux namespace handling problem: https://www.weave.works/blog/linux-namespaces-and-go-don-t-m... which kind of makes Go suck for many important container-related tasks. But apparently the effort has stalled... https://go-review.googlesource.com/c/go/+/46033

Re: Go 1.9 is released

#17
post #16

I was looking forward to the fix for the dreaded Linux namespace handling problem: https://www.weave.works/blog/linux-namespaces-and-go-don-t-m... which kind of makes Go suck for many important container-related tasks. But apparently the effort has stalled... https://go-review.googlesource.com/c/go/+/46033

It doesn't look stalled. It looks targeted towards Go 1.10, not Go 1.9.

Re: Go 1.9 is released

#18
post #16

I was looking forward to the fix for the dreaded Linux namespace handling problem: https://www.weave.works/blog/linux-namespaces-and-go-don-t-m... which kind of makes Go suck for many important container-related tasks. But apparently the effort has stalled... https://go-review.googlesource.com/c/go/+/46033

[deleted]

Re: Go 1.9 is released

#19
post #2

I am looking forward to 1. runtime/pprof package now include symbol information 2. Concurrent Map 3. Profiler Labels 4. database/sql reuse of cached statements 5. The os package now uses the internal runtime poller for file I/O.

> 4. database/sql reuse of cached statements !! that wasn't a thing until now?

It was. That summary is a bit of a simplification.

See https://golang.org/doc/go1.9#database/sql

Go 1.9 adds reuse of statement handles created off an ephemeral transaction too. But all the other statement handle cases have cached from day 1.

Re: Go 1.9 is released

#20

Earlier quoted context omitted.

It could just be one map shared by many goroutines, which normally causes a panic: fatal error: concurrent map writes

i am dealing with this problem right now. also i have a big problem with deepclone, I did a big rewrite of a current project, and clearly it was badly designed :(

[deleted]
Post reply on HN