News for hackers. Stuff that matters.
Re:The Deletion of gcj by masklinn on Monday October 03, 2016 @06:28AM (#12626338)
Wouldn't a good cross-compilation story work for bootstrapping? Once you've got the system to run on platform A, you can cross-compile for B and use those artefacts to bootstrap B.
Re:The Deletion of gcj by Nullabillity on Monday October 03, 2016 @06:47AM (#12626392)
That doesn't really work for a system like Nix (or derivatives like Guix), where binary packages are only considered an optimization, and packages are always rebuilt without having the old version, or other user state, available.
Re:The Deletion of gcj by kryptiskt on Monday October 03, 2016 @07:15AM (#12626505)
How do they handle GHC or Rust which must have a compiler to build?
Re:The Deletion of gcj by Ericson2314 on Monday October 03, 2016 @08:32AM (#12626917)
Binaries. But we could in principle go back to them being written in other languages.
Re:The Deletion of gcj by masklinn on Monday October 03, 2016 @08:49AM (#12627040)
The initial installation becomes ridiculously painful though, and even that might not work if the original language as itself self-bootstrapped, or cross-compiled with something not available anymore (e.g. something on a different architecture)
Re:The Deletion of gcj by oneplane on Monday October 03, 2016 @07:09AM (#12626480)
But Nix and Guix need a base compiler to start with, right?
Re:The Deletion of gcj by vertex-four on Monday October 03, 2016 @07:55AM (#12626696)
Indeed, though the goal is to keep the closure of base dependencies as small as possible. They don't really want to be depending on anything other than a C/C++ compiler and a shell.
Re:The Deletion of gcj by Ericson2314 on Monday October 03, 2016 @08:34AM (#12626930)
Actually, criss compiling is a solution here. Hydra should be able to deal with packages on one platform depending on packages from another.
Re:The Deletion of gcj by davexunit on Monday October 03, 2016 @10:07AM (#12627501)
How does cross compiling help? How do you build the first Java from source?
Re:The Deletion of gcj by JoshTriplett on Monday October 03, 2016 @11:37AM (#12628256)
Cross-compiling allows you to just have one binary of the compiler, for a fast architecture like x86-64, and then bootstrap binaries for every architecture from there. Without cross-compiling, you need to have a bootstrap binary of the compiler for every architecture you want to support.
Re:The Deletion of gcj by davexunit on Monday October 03, 2016 @01:15PM (#12629325)
That's a different and less important problem.
Re:The Deletion of gcj by mitchty on Monday October 03, 2016 @02:54PM (#12630254)
As someone that has done this to get ghc building on an unsupported platform, it really is the only sane way to approach this chicken/egg problem. I'm slightly surprised that .net doesn't have a cross compilation option.
Re:The Deletion of gcj by davexunit on Monday October 03, 2016 @08:30PM (#12632489)
The sane way is to write a bootstrapping compiler, like some language implementations do.
Re:The Deletion of gcj by mitchty on Monday October 03, 2016 @09:34PM (#12632732)
ghc can compile to c to do bootstrapping, or a more standard 3 stage bootstrap.

There are pros/cons to both approaches.

Re:The Deletion of gcj by davexunit on Tuesday October 04, 2016 @10:16AM (#12635659)
Machine-generated C is not source code, so this doesn't solve the reproducibility problem.
Re:The Deletion of gcj by mitchty on Wednesday October 05, 2016 @11:33AM (#12644709)
So for languages like Haskell, or lets have fun and throw Idris in the mix too as its implemented in Haskell, what/how should they be changed to not have to bootstrap the way they do now so that reproducibility is preserved?

For languages that have effectively abandoned that route, what would satisfy your requirements? Which languages specifically handle things in a way you consider correct? Is the effort involved worth it if only reproducibility is the end goal?

I don't think its safe to say that a bootstrapping compiler is the only sane way. Even if System F is a fairly simple language and what GHC compiles to, having to keep a bootstrapping compiler around just for bootstrapping purposes seems like mostly wasted effort IMO.

Re:The Deletion of gcj by justincormack on Monday October 03, 2016 @06:45AM (#12626385)
Yes that's very useful. Go has that, NetBSD has that, its getting more common at last. It doesn't solvevall the problems but has other benefits.