18 ms·
Go 1.8 Release Notes
- Ice32 10y agoWhy is the latest stable version on their website still 1.7.5? Where can I download 1.8 installation for linux (not source code)? I've just removed my previous version and then I realize there's no 1.8 on their website.
- bradfitz 10y agoIt's not released yet. The release machine is running.
- AsyncAwait 10y agoWhat linux distro are you on? Most people on Linux tend to use their package managers to get updates, or is your distro too far behind on Go?
- Ice32 10y agoI'm using xubuntu, how do I manage go through package manager?
- purak 10y agoyou can use 'godeb' to install the latest version of golang. it transforms upstream tarballs for the Go language in deb packages and installs them.
- Ice32 10y agoTy
- jerf 10y agoI use godeb: https://github.com/niemeyer/godeb https://github.com/niemeyer/godeb It packages the go release into .deb files, which you then can manage using standard Debian tools. Note that since it scrapes the release page for what releases are available, it won't be able to download 1.8 until it, you know, has actually been released, and sometimes the release page changes format upon a new release and it may take a bit for godeb to be updated.
- sfifs 10y agoI'd encourage you to look at building from source[1] rather than using package managers or binaries. It's quite simple, let's you upgrade/downgrade at will and importantly makes cross compiling to other architecture/OS trivial. https://golang.org/doc/install/source https://golang.org/doc/install/source
- stevekemp 10y agoThere are a few packages I always install directly from source, to avoid lagging. Golang is one of them. If you're using Debian, or some similar system, chances are your package manager will never deploy something beneath /opt. So in my case I configure golang to install in /opt/golang/ On this particular host I have only three packages here: $ ls /opt/ arduino-1.8.0 calibre go-1.8
- eknkc 10y agoDraft release notes: https://beta.golang.org/doc/go1.8 https://beta.golang.org/doc/go1.8
- sctb 10y agoThanks, we've updated the link from https://github.com/golang/go/releases https://github.com/golang/go/releases.
- rshetty10 10y agoHurray, Finally
- 0xmohit 10y agoWhat is new in Go 1.8: http://www.slideshare.net/huazhihao1/what-is-new-in-go-18-72210978 http://www.slideshare.net/huazhihao1/what-is-new-in-go-18-72...
- matt4077 10y agoBest text version I found: https://github.com/golang/go/blob/master/doc/go1.8.html https://github.com/golang/go/blob/master/doc/go1.8.html
- sslalready 10y agoAlso new: callback for client cert selection during TLS handshake. https://github.com/golang/go/issues/16626 https://github.com/golang/go/issues/16626
- jbergstroem 10y agoI reckon h2 push (https://beta.golang.org/doc/go1.8#h2push https://beta.golang.org/doc/go1.8#h2push) support will be big for web servers like caddy and traefik. Caddy already has a few interesting ideas on how to use this: https://github.com/mholt/caddy/pull/1215#issuecomment-256360674 https://github.com/mholt/caddy/pull/1215#issuecomment-256360...
- modeless 10y agoI see stop-the-world garbage collection pause times have been reduced to microseconds which is great. But for many applications the pause times for single threads still matter. Any numbers for that?
- schmichael 10y agoLinking to the Github release seems more like a grab for fake Internet points than a useful post. A useful post would be waiting for golang.org to be updated and linking to the official release notes. Edit: Thanks to whoever updated the link to point to something useful at least. Still would have preferred this came down until the release was actually posted.
- deleted 10y ago[deleted]
- randyrand 10y agoFor people that use Go, this is a useful PSA since they could grab it right now. for those that don't, this is uninteresting haha.
- flukus 10y agoIf only there was some kind of list that enthusiasts could join to get notifications like this.
- petercooper 10y agoAn unfair, groundless projection on your part. Thanks for spreading a little more negativity today :-) From the HN guidelines: Please don't submit comments complaining that a submission is inappropriate for the site.
- grey-area 10y agoIt still hasn't actually been released yet though, 3 hours after your post, so it was a little premature :)
- schmichael 10y agoI'm as excited as the next gopher about Go 1.8's release, but for all practical purposes it hasn't been released yet. It's actually an incredibly frustrating submission for those of us excited to get the official binaries.
- tempw 10y agoA little not so related question, what is/are the most used stack for web applications in Go? How common if at all would be a Go backend & React for instance frontend stack?
- jagger27 10y agoThat's the beauty of Go. The "most used" stack is just net/http in the standard library. Other toolkits implement and extend its interfaces and work together quite well for the most part. Your choice of front end framework is really a matter of taste.
- tempw 10y agoCool, thank you for the insight!
- oelmekki 10y agoI can't tell about "how common", but a react web client with a go backend API is exactly what I do on my main product, currently. It still has a few problems I haven't managed to solve, though (but not related directly to go). For example, given the visible routing is handled by react-router, I haven't find a way yet to issue proper 404 status (I have a catchall route that renders web client page, then client router displays a "not found" page, but it will be a 200 status). Not that a big deal, because the web client is an application behind auth, and not some public facing pages.
- artursapek 10y agoI suggest you adopt a 3rd party router, rather than using pure Go standard library for this. https://github.com/julienschmidt/httprouter https://github.com/julienschmidt/httprouter is the most popular one. It supports a custom 404 handler https://github.com/julienschmidt/httprouter/blob/master/router.go#L147 https://github.com/julienschmidt/httprouter/blob/master/rout...
- oelmekki 10y ago
- prodigal_erik 10y agoIf Go were to dramatically improve (now with generics! exceptions! nil == nil!), that would be interesting to people who don't currently use it.
- geodel 10y agoWith the significant risk of becoming less interesting for large number of current users.
- Dobbs 10y agoAs a daily user of Go, I wish so much it had some tools in its toolbox for simple boxed generics. Things like `Stack<T>(a T)`, `Max<T>(a T, b T)`, and other data structures and basic functions. Then for `err == nil` we need some type of syntactic sugar to simplify this. I don't know what it would look like, but so many copies of that simple if statement get written that it is a bit ridiculous.
- geodel 10y agoMy experience working with Java all these years is this: 1) Java is not suitable at all the task at hand. I am just trying to solve something far more suitable for different type of language. 2) Java is working fine for the purpose and it leaves me with time to think how about Java fix its longstanding issues. Ideally Java should fix that stuff but I come to conclusion 2) is possible only when Java works fine for me and fixing those issues is either impossible or very low priority. I think same will apply to Go or any other language.
- camus2 10y ago> With the significant risk of becoming less interesting for large number of current users. There is no data demonstrating that statement. I don't think you are talking for the majority of people using Go. Choice is good. Generics in the language wouldn't change anything for you as you wouldn't be forced to use them. I don't understand people who hate generics. They are just types and they are here to help the developer write compile time type safe code. interface {} everywhere isn't compile time type safe. The biggest argument against generics, is that it would increase compilation times. Well, the compiler would be still faster than the developer copying and pasting code manually, or rewriting the same algorithm for each type variation again and again. Isn't programming about automating stuff? For those who complain generics are too complicated to understand, I don't know what kind of developer you are frankly if you can't understand something as basic as generics yet pretend like you can work with a language that has pointers,channels and threads and mutexes... What do you think is more complicated? generics or concurrency? While the argument itself is pointless (it's unlikely one can retrofit generics in a backward compatible way with Go), there is no need to answer with these bad faith arguments. It really sound stupid.
- clumsysmurf 10y agoI'm wondering if "The Go Programming Language 1e" (Donovan / Kernighan) is still relevant enough to be used as a first book for self teaching. https://www.amazon.com/Programming-Language-Addison-Wesley-Professional-Computing/dp/0134190440 https://www.amazon.com/Programming-Language-Addison-Wesley-P...
- AsyncAwait 10y agoAbsolutely it is. Go, the language, changed very little since 1.0, most of the improvements have been done on the runtime, GC latency and such.
- rckrd 10y agoThe answer is yes. This is the go version 1 compatibility promise [0]. The maintainers have been very careful to not break compatibility, even if it means bug fixes. [0] https://golang.org/doc/go1compat https://golang.org/doc/go1compat
- alpb 10y agoI personally learned Go about 3.5 years ago myself by following tutorials on tour.golang.org, reading the Effective Go document and other blog posts here and there. Then I bought the book last year just out of curiosity. Honestly I find that the experience you gain by reading/writing Go code and consuming online content is more beneficial than the book. The book has some good parts, but I don't think it’s as practical as online resources.
- sotojuan 10y ago> Honestly I find that the experience you gain by reading/writing Go code and consuming online content is more beneficial than the book. This applies to almost all languages and technologies!
- krylon 10y agoYes, but sometimes it is much easier to get moving with a good textbook. With Go, a few online tutorials and the documentation that comes with Go itself, were all I needed to get going. I am not sure if that was an explicit design goal, but I found the language very easy to learn.
- wyager 10y agoNot really, since there's a risk of new people deciding to use it whenever it comes up. It would be silly to say "alright, we get it, cigarettes are bad for you, can we stop harping on this please?"
- mratzloff 10y agoCigarettes kill people. Go is a programming language. There's no need to relitigate the issue in every Go-related post.
- coldtea 10y ago>Cigarettes kill people. Very very slowly. Time spent fighting lacking programming languages also kind of kills people (steals time off of their lives).
- deleted 10y ago[deleted]
- AsyncAwait 10y ago> there's a risk of new people deciding to use it whenever it comes up. And? They're free to do so, if they think it can fit their needs. Also, while Go isn't great, it isn't as terrible as some people make it. It mostly just isn't in any way exciting.
- wyager 10y ago> They're free to do so, if they think it can fit their needs. Which is why people need to be here every thread explaining the problems with Go.
- bsg75 10y agoEquating lung cancer and the lack of programming language features? You might be in the wrong business.
- pjmlp 10y ago
- speps 10y ago> The DefaultTransport.Dialer now enables DualStack ("Happy Eyeballs"[1]) support, allowing the use of IPv4 as a backup if it looks like IPv6 might be failing [1] https://tools.ietf.org/html/rfc6555 https://tools.ietf.org/html/rfc6555
- jraedisch 10y agoI am just leaving the release party in Hamburg, Germany and looking forward to simpler sorting and all the other improvements. Awesome stuff and awesome people!
- enahs-sf 10y agorandom question here, but what are people using in the way of ORM/sql access with go? Just database/sql or are there any other good packages worth checking out. I don't expect a full-blown activerecord style ORM, but something that takes a bit of the pain out of mapping structs to records.
- n0w 10y agoI've been looking forward to 1.8 to solve this problem. I wrote a small tool using the new `ColumnType` info that takes my SQL queries and generates code to query the database and unmarshal rows into an array of structs.
- cenanozen 10y agoI would love to see that tool
- edcastro 10y agohttps://github.com/jinzhu/gorm https://github.com/jinzhu/gorm is quite ok
- sethammons 10y agoCheck out https://github.com/vattle/sqlboiler https://github.com/vattle/sqlboiler. I prefer the STD lib usually. Also, look at https://github.com/jmoiron/sqlx https://github.com/jmoiron/sqlx for easier struct mapping.
- KAdot 10y agoOfficial release blog post https://blog.golang.org/go1.8 https://blog.golang.org/go1.8.
- claudiug 10y agohttp://www.slideshare.net/huazhihao1/what-is-new-in-go-18-72210978 http://www.slideshare.net/huazhihao1/what-is-new-in-go-18-72... so go is becoming more and more better for lower GC tasks
- grey-area 10y agoOK, so now this is out, how about we discuss what is actually in this release! The sort pkg now has a convenience for sorting slices, which will be a nice shortcut instead of having to define a special slice type just to sort on a given criteria, you can just pass a sorting function instead. HTTP/2 Push is now in the server, which is fun, but like context might take a while for people to start using in earnest. Likewise graceful shutdown. Is anyone experimenting with this yet? Plugins are here, but on Linux only for now - this will be interesting long term for things like server software which wants to let other compile plugins for it and distribute them separately, presently that has to be compiled in to the main binary. Performance: GC times are now down to 10-100 microseconds, and defer and cgo are also faster. Compilation time improving but still not close to 1.4. GOPATH is optional now, but you still do need a path where all go code is kept, perhaps eventually this requirement will go away - GOPATH/pkg is just a cache, GOPATH/bin is just an install location, and GOPATH/src could really be anywhere, so I'm not sure if long term a special go directory is required at all if vendoring takes off, then import paths could be project-local. There's a slide deck here with a rundown of all the changes from Dave Cheney: https://talks.godoc.org/github.com/davecheney/go-1.8-release-party/presentation.slide#1 https://talks.godoc.org/github.com/davecheney/go-1.8-release... Finally, as someone using Go for work and play, thanks to the Go team and everyone who contributed to this release. I really appreciate the incremental but significant changes in every release, and the stability of the core language.
- AsyncAwait 10y ago> Compilation time improving but still not close to 1.4. It's worth noting that this is mostly the result of an automatic translation from C to Go, which made the compiler slower, but also a lot more accessible to outside contributions.
- _ph_ 10y agoAnd also, that in the meantime, the compiler got much better at analyzing and optimizing the program. So the compiler got faster and better. So while it is still slower than 1.4, it does produce better code.
- 10y ago
- 0xdeadbeefbabe 10y agoYay Mips32!
- watbe 10y agoFinal release notes: https://golang.org/doc/go1.8 https://golang.org/doc/go1.8
- bitmapbrother 10y agoDoes anyone know the roadmap for Go 1.9?
- grey-area 10y agoThere's some stuff at the end of these slides https://talks.godoc.org/github.com/davecheney/go-1.8-release-party/presentation.slide#1 https://talks.godoc.org/github.com/davecheney/go-1.8-release...
- gribbly 10y agoHere's a thread were the developers discuss what they intend to work on for the next release: https://groups.google.com/forum/#!msg/golang-dev/Dn-pfWETUrM/r-QmNZXMAQAJ https://groups.google.com/forum/#!msg/golang-dev/Dn-pfWETUrM...
- rem7 10y agowow an official dependency manager. Didn't see that coming. Makes me happy.
- gravelc 10y agoI'm seeing significant performance increases in my app (small RNA aligner). Haven't profiled yet, so not sure where the gains are coming from, but happy all the same.
- old-gregg 10y ago1.7 release was great for finally addressing the issue of ever-growing size of produced binaries. [1] Moreover, some additional improvements were promised in 1.8 which I was looking forward to. But after upgrading to 1.8 I am now observing 3-4% binary increase vs 1.7, so the trend is again reversed back to fatter binaries. :( [1] https://blog.golang.org/go1.7-binary-size https://blog.golang.org/go1.7-binary-size
- OrangeTux 10y agoYou can use upx[1] to compress the binaries. I usually can shrink my binaries by 75%. Read more on this[2] blog post. 1: https://upx.github.io/ https://upx.github.io/ 2: https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/ https://blog.filippo.io/shrink-your-go-binaries-with-this-on...
- perseusprime11 10y agoWhat is the best place to start if I want to learn Go? Any books? Tutorials?
- sethammons 10y agoTake the tour on their site. Check out gobyexample after that. Then read effective go.
- dyu- 10y agoLooking at the c ffi improvements posted, I thought I'd check if there were improvements. Time in ms to call a c function 2 billion times (lesser is better). 95536 - go 1.1.2 130105 - go 1.8.0 It is a rather crude example: // plusone is the ffi int x = 0; while (x < 2000000000) x = plusone(x); Here's the source https://github.com/dyu/ffi-overhead https://github.com/dyu/ffi-overhead With other programming languages: c: 4778 nim: 4746 rust: 5331 java7: 17922 java8: 17992 go: 130105 (edited for formatting)
- dpc_pw 10y agoSmall stacks used for goroutines don't play well with calling C functions which assume huge stacks. That's price you pay for having nice scalability story. There might be other issues, which come from the fact that Go has elaborated runtime.
- dyu- 10y agoYea it was a toy example. Still the overhead is steep for applications that call c ffi often. The workaround is usually to batch your computations on the c-side (micro-rpc) and minimize the calls (like cockroachdb is doing)
- michaf 10y agonim is faster at calling c routines than c? That seems interesting... But probably the measurement errors are larger than 1%?
- dyu- 10y agoThey're basically the same (its just a measurement error as you said). Afterall, nim generates c files. What's interesting is the nrvo optimizations that nim generates under the hood without much effort from the developer (on non-trivial codebases).
- tandr 10y agoFolks, can someone enlighten me on how new Argument Liveness https://golang.org/doc/go1.8#liveness https://golang.org/doc/go1.8#liveness works ? I mean, so now if you are in the middle of a long function, you cannot be sure anymore if parameters passed to that function are not GC'd? Or compiler does some hinting on "ooh, this param is not used after that point in function, lets mark it as `ready for GC`?