Compilers are often written in the language they are compiling. This creates a chicken-and-egg problem that leads users and distributors to rely on opaque, pre-built binaries of those compilers that they use to build newer versions of the compiler.
@nasser Same, that's why I have to maintain multiple assemblers at once..
@technomancy @neauoire it's a bit of a challenge but technically possible I suppose. We originally bootstrapped off of ClojureCLR, but it was a pain in the ass because of the circular dependency introduced by spec and semantic differences in how MAGIC deals with types.
@neauoire I was going to mention GuixSD's incredible efforts in this space until I saw the website footer. the site is written in Guile and therefore almost certainly a Guix community/devs project itself
but anyway, they've got some pretty robust reproducibility principles for anything that makes it into the main repos. notably I believe they're aiming for the entire toolchain to be bootstrapped off a few hand written hex binaries, and then upwards from there? been a minute since I read it
@neauoire Reminds me of Ken Thompsons "Reflections on Trusting Trust" https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf
@neauoire wasn't it a sign that the language works? And people write a compiler in that language that should be able to compile itself?
@sirjofri yup! that's what the website talks about :)
@neauoire
yes
yes
yes
yes
- A former LFS contributor
@neauoire This is one reason why I like GNU autoconf and automake: It only needs m4 and a shell as dependency — m4 which is a much simpler language.
They pay the price for getting the bootstrap working. That’s one of many reasons I nowadays prefer autotools over other build tools. Despite their also existing problems.
@neauoire this is actively on my mind as I return to maintain the clojure compiler I wrote in clojure. self-hosting creates all kinds of headaches and yes the compiler depends on precompiled binaries from previous versions of itself... not great...