News for hackers. Stuff that matters.
Re:“This change deletes the C implementations of the Go comp... by justincormack on Monday February 23, 2015 @06:00PM (#9097623)
So what is the bootstrap process going to be? Other than already have a Go compiler I mean. Or is it have a Go cross compiler?

Maybe it matters less, you used to always assume bootstrap from C but that more or less died with C++ based compilers, although you can do a multistage bootstrap from the last gcc before C++ still.

Re:“This change deletes the C implementations of the Go comp... by yiyus on Monday February 23, 2015 @06:05PM (#9097645)
It is explained in the design document: https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdw...

Basically, you start from the last C version, and every version is supposed to be able to compile the next one.

Re:“This change deletes the C implementations of the Go comp... by cperciva on Monday February 23, 2015 @08:06PM (#9098126)
So if you want to avoid trusting trust, you need to audit not only a C compiler and the source code for the Go compiler you plan on using, but also every past Go compiler as well?
Re:“This change deletes the C implementations of the Go comp... by sesutton on Monday February 23, 2015 @09:51PM (#9098447)
You could audit the Go source and then use the diverse double compiling technique[0] to verify that the binary you're using corresponds to that source code.

[0] http://www.dwheeler.com/trusting-trust/dissertation/html/whe...

Re:“This change deletes the C implementations of the Go comp... by cperciva on Monday February 23, 2015 @10:46PM (#9098565)
You mean, audit a large number of independently-written Go compilers?
Re:“This change deletes the C implementations of the Go comp... by indians_pro on Monday February 23, 2015 @11:00PM (#9098602)
Nicely done. To be fair though, Go is just 6 years old and still evolving.
Re:“This change deletes the C implementations of the Go comp... by cperciva on Monday February 23, 2015 @11:12PM (#9098637)
Exactly. Which is why I think it's important to keep the option of compiling its compiler from a language which has a large diversity of compilers.
Re:“This change deletes the C implementations of the Go comp... by crawshaw on Tuesday February 24, 2015 @04:33PM (#9103679)
I don't believe it has been tried yet, but it seems entirely possible to use gccgo as the bootstrap compiler.
Re:“This change deletes the C implementations of the Go comp... by f2f on Monday February 23, 2015 @08:26PM (#9098199)
You can't avoid trusting trust. "Ken was here" :)
Re:“This change deletes the C implementations of the Go comp... by sanxiyn on Monday February 23, 2015 @09:13PM (#9098350)
You actually can. Proof here: http://www.dwheeler.com/trusting-trust/
Re:“This change deletes the C implementations of the Go comp... by f2f on Monday February 23, 2015 @09:32PM (#9098395)
I was alluding to Ken being the author of the old, as well as one of the authors of the new compiler. In jest :)
Re:“This change deletes the C implementations of the Go comp... by cperciva on Monday February 23, 2015 @09:29PM (#9098387)
You can. You just have to bootstrap all the way up.
Re:“This change deletes the C implementations of the Go comp... by fugyk on Wednesday February 25, 2015 @05:27AM (#9106120)
What if any intermediate version is found to contain the violation of trusting trust? Every go maintainer has to build every version sequentially from that version to current version.
Re:“This change deletes the C implementations of the Go comp... by justincormack on Monday February 23, 2015 @06:11PM (#9097668)
Ah ok, so there will be a pretty long chain from 1.2 eventually, but hopefully it will be part of the test suite...
Re:“This change deletes the C implementations of the Go comp... by enneff on Monday February 23, 2015 @06:17PM (#9097694)
You should always be able to build a Go 1.x compiler with just the 1.4 tool chain binaries. We have committed to sticking to the Go 1.4 language and libraries for the compiler tool chain.
Re:“This change deletes the C implementations of the Go comp... by TheLoneWolfling on Monday February 23, 2015 @08:50PM (#9098288)
Where is this fact documented? Are patches tested against 1.4 tool chain binaries?
Re:“This change deletes the C implementations of the Go comp... by enneff on Tuesday February 24, 2015 @12:04AM (#9098822)
> Where is this fact documented?

http://tip.golang.org/doc/install/source#go14

> Are patches tested against 1.4 tool chain binaries?

The builders build the tool chain with Go 1.4, so the build dashboard will show failures if a patch incompatible with 1.4 is submitted. (We have pre-commit trybots that do the same.)

Re:“This change deletes the C implementations of the Go comp... by madhusudancs on Monday February 23, 2015 @11:05PM (#9098616)
Re:“This change deletes the C implementations of the Go comp... by jlouis on Monday February 23, 2015 @06:15PM (#9097681)
Usually you don't keep the chain. You just keep a working compiler. You can also bootstrap from another implementation of the language, e.g., gccgo.

A common trick is to keep a highly portable interpreted version of the target language and then use this for bootstrapping, but often you attack new architectures by cross-compilation instead. It all depends.

Also, it is common for self-hosting languages to require themselves to build.

Re:“This change deletes the C implementations of the Go comp... by ori_b on Monday February 23, 2015 @06:02PM (#9097635)
Either cross compile, or get the last C-based Go compiler, and use that to build the more recent Go releases.
Re:“This change deletes the C implementations of the Go comp... by cbd1984 on Monday February 23, 2015 @10:20PM (#9098508)
> So what is the bootstrap process going to be? Other than already have a Go compiler I mean. Or is it have a Go cross compiler?

What's the bootstrap process for the C compiler part of the compiler?

Re:“This change deletes the C implementations of the Go comp... by 4ad on Tuesday February 24, 2015 @03:06AM (#9099358)
The is no C code in the compilers anymore.
Re:“This change deletes the C implementations of the Go comp... by burnte on Monday February 23, 2015 @08:49PM (#9098283)
But if one has access to the Go compiler source, is it not a reasonable guess that one would be able to access a go compiler binary from the same trusted source? I just don't see this as a problem since it is impossible to build a computer from the ground up without trusting a lot of software first.
Re:“This change deletes the C implementations of the Go comp... by dmm on Monday February 23, 2015 @09:33PM (#9098400)
Probably gccgo, which is included in gcc.
Re:“This change deletes the C implementations of the Go comp... by dmm on Wednesday February 25, 2015 @09:58AM (#9106979)
For the purposes of bootstrapping.