Go 1.5 is released
blog.golang.org
blog.golang.org
We had some weird corruption of memory issues late in the 1.5RC cycle.
It's possible that https://github.com/golang/go/commit/3ae17043f7f29f0d745aa35b... fixed it, but each test for bisection cost us 4 hours, and the bug didn't always show. (When it did show, it definitely showed without -race mode on, contrary to the comments in the patch)
Anyway, if you have a large memory usage highly concurrent go app, I would still tread lightly and carefully with this release; we spent a goodly amount of time blaming our own code before realizing that 1.4.2 did not exhibit the problem.
The new GC, default GOMAXPROCS > 1, and changes to the scheduler may well expose latent bugs in code that worked fine in Go 1.4.
Honestly, I could have seen rebranding 1.5 to 2.0; there are major under the hood changes you guys have made.
I've learned not to even ask about type improvements. :(
This is really cool. Writing a compiler in the language that you're compiling seems kind of meta. The language has evolved to a point to where it can consume and build itself. Far out mannnnn.
Thanks Go team!
https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thomp...
Unless you think Ken somehow backdoored the original C compilers to backdoor every C compiler in the world to backdoor the Go compilers that came about decades later. :-)
https://groups.google.com/forum/#!msg/golang-dev/6obxRcm-rqc...
Those tools do not use the Go compiler. They're using go/ast or go/types. So the translation of gc from C to Go can't have affected them.
It's been done before, for more than one language, IIRC.
The technique by which they make an executable of a compiler for language L on platform B, using an existing executable of the same compiler for L on platform A, together with the source code of the compiler for L on A, is also cool. I forget the full details right now. Maybe someone else will pitch in and explain. It's called bootstrapping. It's also related to cross-compiling.
Update: Looked it up in Google:
https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
https://en.wikipedia.org/wiki/Cross_compiler
Also see Canadian Cross under above article - this is like the cool technique I talked about above, but more complex.
Or is that something that isn't really possible?
https://go-review.googlesource.com/#/c/10923/
Go 1.5 vendor proposal:
If there is a source directory d/vendor, then, when compiling a source file within the subtree rooted at d, import "p" is interpreted as import "d/vendor/p" if that exists.
When there are multiple possible resolutions, the most specific (longest) path wins.
The short form must always be used: no import path can contain “/vendor/” explicitly.
Import comments are ignored in vendored packages.
Anyone interested can learn more at https://github.com/Masterminds/glide or where I posted about it at http://engineeredweb.com/blog/2015/glide-0.5-go-vendor-suppo....
I'm hopeful for this brave new vendor world.
http://dave.cheney.net/unofficial-arm-tarballs
No 1.5 (yet), but if, like me, you do ARM stuff, you might want to bookmark this.
And of course the cross-compiler works, but still.
(edit: moved mention of ARM to first line)
PS: If you want to benefit from 1.5 improvements don't forget to recompile your go programs ;)
go install -buildmode=shared std
go build -linksharedThroughput hasn't changed and average performance is about the same for us (slightly faster actually)
So no, printf is not good enough. That's why people have created debuggers.
But it is true that for some types of bugs a step debugger is damn handy. And for some types, mostly a distraction.
Good tools matter, there's nothing more painful then a platform where your only debugging is printf.
There are some problems that can't be solved by printf debugging. They include:
-GPU Performance profiling: All your commands are async and appear immediate, teasing out performance characteristics takes a massive suite of tests and may not even reproduce your issue.
-Thread concurrency issues: Adding a printf can actually make these bugs disappear as printf usually has some sort of memory fence or flush semantics that change behaviour.
-Platforms that can't handle large amounts of trace logging: Sony PSP was one of these where each printf() required the tcp ack before the buffer would clear after a trivial amount of logs.
One of the core tenants of comp sci and technology in general is building on what came before. That's where our productivity gains come from. Not taking that approach is a dangerous mentality that can have serious implications on your velocity and agility and is not a choice to be made lightly.
You must have only worked on toy applications before.
Because debuggers are essential on any non trivial application.
Real programmers don't need an assembler; ed(1) is sufficient and if you can't write a program without anything else, you shouldn't be allowed near computers.
Recently I was working on an embedded platform which had no debugger support at all. There was some On-Chip debugger option, but it required some soldering and hacking some jtag cable, still too lazy.
Despite the laziness, I ended up implementing gdb support for that platform, over it's normal serial port: https://blog.cesanta.com/esp8266-gdb
Go at least has stack traces with no extra tooling, which is a big deal. Anyway, the more tools the better; you're gonna miss them when you need them most.
Contrast your response to Russ Cox's answer: "We are well aware of the hole, though, and we'd like to plug it, but other work took priority this release cycle".
See BUGS.
I've been anticipating the change and had already updated my .travis.yml file in my stats package[2] which would fall back to tip.
Also glad to see wide adoption in Chinese consumer internet running at gargantuan scale: Tencent, WeChat, Didi Kuaidi and many more. Are you guys at all surprised to see it take off on the mainland?
I have no idea about windows support.
edited summary:
- Go code linked into, and called from, a non-Go program
In the Go 1.5 release this mode is implemented, using a .a file, for most Unix systems.
- Go code as a shared library plugin with a C style API
In the Go 1.5 release this mode is implemented for linux-amd64, linux-arm, darwin-amd64, and darwin-arm. When using gccgo it is implemented for any supported target.
- Go code as a shared library plugin with a Go style API
This is not implemented in the Go 1.5 release.
- Go code that uses a shared library plugin
This is not implemented in the Go 1.5 release.
- Building Go packages as a shared library
In the Go 1.5 release this is implemented for the linux-amd64 target only. When using gccgo it is implemented for any supported target.
- A Go program built as a PIE
This is not implemented in the Go 1.5 release.
It's been done, but the best use I'm aware of is under NDA.
Is the compiler go gettable?