Live data from Hacker News

Go 1.5 Release Notes

tip.golang.org

11–20 of 66 posts

Re: Go 1.5 Release Notes

#11
post #2

Quite significant that Bell Labs Unix alums don't want to put up with C any more and actively purge it from their tree?

Bell Labs alums have never had a specific penchant for C, per se, though their languages have mostly had C-like ALGOL syntax.

Re: Go 1.5 Release Notes

#13
post #7

The release notes mention the new Go compiler is about 2x slower than the old C based one. It also mentions there's ongoing work to improve this. I wonder if there are any estimates on how close to the original performance they think they can get. Do they expect to reach parity by, say, 1.6 or will it always be slower? For my tiny hobby projects, compile times aren't an issue at all so I'm asking purely out of curios…

[deleted]

Re: Go 1.5 Release Notes

#14
post #7

The release notes mention the new Go compiler is about 2x slower than the old C based one. It also mentions there's ongoing work to improve this. I wonder if there are any estimates on how close to the original performance they think they can get. Do they expect to reach parity by, say, 1.6 or will it always be slower? For my tiny hobby projects, compile times aren't an issue at all so I'm asking purely out of curios…

They automatically translated C code to Go code. The objective was to produce correct Go code, speed was not an immediate concern - the auto-translated code mostly is very bad Go code, speed wise. Optimizing the Go code base of the compiler is the next step, planned to happen in subsequent releases.

Re: Go 1.5 Release Notes

#15
post #2

Quite significant that Bell Labs Unix alums don't want to put up with C any more and actively purge it from their tree?

I don't have the link handy right now, but IIRC there was a mention of some system level differences in how Go might like to change things in the toolchain under the language level which could move in a fundamentally different direction from the C toolchain. An example was in the area of how stacks were created and operated.

I think one could foresee making more changes in the future in that area. It's sort of exciting to think that these fairly low level foundational details which much of programming relies on, could be rethought and maybe get us to a different place than we are now.

Re: Go 1.5 Release Notes

#17
post #2

Quite significant that Bell Labs Unix alums don't want to put up with C any more and actively purge it from their tree?

> Quite significant that Bell Labs Unix alums don't want to put up with C any more and actively purge it from their tree? Go is quite literally written by the people who invented C, wrote C, and made it what it is today. (Ken Thompson wrote one of the first commits to the language). The reason for purging C from the Go toolchain is that it makes it harder for Go developers to contribute. Go developers already all kno…

> Furthermore, mixing C code with Go code can cause performance issues if not done right. While you can expect the official project to "do it right", this still raises the bar for people who know Go and want to contribute, but don't know C as well.

This is why Go was maintaining it's own C compiler -- They had it modified to work well with Go, as far as I am aware[1].

Removing it means one less compiler to maintain.

[1] From Go 1.4, the source for the Go C compiler: https://github.com/golang/go/tree/883bc6ed0ea815293fe6309d66...

Re: Go 1.5 Release Notes

#19
> In Go 1.5, the order in which goroutines are scheduled has been changed. The properties of the scheduler were never defined by the language, but programs that depended on the scheduling order may be broken by this change.

Are there any more details about the change to goroutine scheduling? Is this more than the just change to the GOMAXPROCS' default value?

Re: Go 1.5 Release Notes

#20

Anyone know how to cross compile with cgo?

In go 1.4, you need to build the go tools for a given target beforehand. In go 1.5, you'll only have to set some environment variables before you call go build, that's it, but unfortunately this doesn't include cgo:

    env GOOS=linux GOARCH=arm GOARM=7 go build hello.go
This link is a good summary of the situation now and in future:

http://dave.cheney.net/2015/03/03/cross-compilation-just-got...

This one talks about cgo:

https://medium.com/@rakyll/go-1-5-cross-compilation-488092ba...

Post reply on HN