If you need a compiled compiler to compile compilers, how do you know that there's no spyware secretly propagating itself?
hex0 is "a hex assembler written in hex" -- basically several bytes of raw machine code "with a shitload of comments" which translates text to bytes
hex0 translates hex1
which translates M0
which assembles M1/hex2
which assembles M2-Planet
which assembles mes
🆕 which compiles tinycc
which compiles gcc
which compiles the OS!
https://github.com/oriansj/mescc-tools/blob/master/test/test1/hex0.hex0
@pho4cexa ken thompson feelin' real called out right now
@pho4cexa Back in the GOOD OL DAYS people would sit down and assemble a Pascal compiler by hand, or so I hear tell.
Back when beards had men attached, women kept nanoseconds in their purses, and we had rooms filled with computer instead of a room filled with computers.
@pho4cexa Though that's frankly for machines and this is a pretty awesome bootstrap setup.
@pho4cexa What if they're ahead of you and put a backdoor somewhere else (the kernel? The CPU?) That detects when GCC or something else is running and inserts the backdoor there?
@onf 🤔 yeah i can think of a few ways to defeat it on one system, but now that we have everything needed to bootstrap a compiler from "nothing," we can get a load of people all doing it on different machines and comparing notes (and cryptographic hashes). Check out http://bootstrappable.org/benefits.html !
@pho4cexa Well, that's certainly a good idea, but this "nothing," if I'm not mistaken, looks a lot like an ELF binary containing x64 code, which would limit it at least to running on 64-bit (somewhat recent) Intel and AMD and similar CPUs, and on modern 64-bit operating systems like Linux distros. And how much can these systems be trusted not to all have a backdoor somewhere deep?
@onf @pho4cexa 64bit is just the start. I'm not fully up-to-date on all things bootstrappable.org, but one of the real-life applications is to make GNU Guix and GuixSD build completely from source, ridding it of the bootstrap binaries. We have some intersections of people between bootstrappable, reproducible-builds, and Guix.
More architectures are planned, and being not OS/distro specific iirc.
@onf @pho4cexa there's a mailinglist, as well as an IRC channel for more questions/answers - all should be listed somewhere on http://bootstrappable.org
@pho4cexa This was vaguely mentioned by @rrix, but something like this actually happened in the early days of UNIX, described in Ken Thompson's turing award speech. https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf
@pho4cexa wow, that's hallucinating. 8 compilers, wherein 3 of them are complex and POSIX-only, just to bootstrap a free software system, is bad imho
I mean, even bootstrappable.org says there must be as few layers as possible
@pho4cexa Wait. What? I was aware of mes and the further stages. But not these earlier ones. I need to sit down and look at this. [scratches head dumbfoundedly]