Vishnu's Digital Dreaming

Mar 24, 2006 00:13

People in general know nowadays that computers come in two major parts -- hardware and software. You can touch hardware. You can see hardware. You can throw hardware to the back of the truck and pull an Office Space on it in the middle of a lonely field.

Software on the other hand is different. You can't see it, but you can interact with it. Somehow, magically, software brings what I'm typing to your eyes. Underneath the hood, it is obvious something is going on -- the hardware gets hotter, sometimes you hear the disk thrashing around ... yet if you opened up the box with a screwdriver and pry open the harddrive, you wouldn't see much. The software are encoded as numbers which the CPU executes ... but how exactly does the hardware know what that instruction is?

Each instruction is actually a code number. The hardware matches the code number with what it needs to do, and then does it. (That's not actually how it happens, but it is close enough). This code number is called "machine code". Digital numerology.

There's a much more interesting question: by what magic do software engineers use to create the software in the first place? I'll tell you why this is more interesting. Software engineers use software to create software. Software engineers first edit human-readable series of code in a software called an "editor", which is then turned into code the hardware can understand ... by another software called a "compiler". There are many different kinds of computer languages, each of them have their own compiler, translating that specific language into machine language. You would think that these special software were hand-written in machine code but compilers these days are not. Most compilers these days are written in a computer language called "C". And generally speaking, C compilers are written in C.

How do you get a software compiler written in C if there were no C compiler in the first place?

That's a logical paradox, a chick-in-the-egg problem. Another example of this -- how do the people running the snow sweepers get to work to sweep the streets when their houses are snowed in? In more mystical language, it is the snake biting it's own tail. It amazes me that the human mind can express this sort of a logical paradox...

The answer: they cheated. The original C compiler was written in machine code (it might have been assembly, but that's nearly the same thing). Then, that C compiler was then rewritten in the C language. Then the old, hand-written, machine-code C compiler was used to compile the new C compiler. This generated a series of machine code -- one that the hardware understands -- called a "binary" in the jargon. This new binary is used to compile itself.

This is called "Self-Hosting".

Self-hosting is an important property of modern compilers. It proves that the compiler is robust enough to be able to compile itself. If the compiler was compiled by a different compilers (there are many different C compilers), its first act is to compile itself again. Sounds viral doesn't it? Use the host's resources to create itself, then use itself to recreate itself. The Dreaming God Vishnu dreams himself into the Maya. Enki spreads his seeds, from which springs creation. Ibidem.

The most prolific C compiler known to the world is the GNU C Compiler, or "gcc" for short. gcc by itself is incapable of compiling itself. It requires a collection of tools called "binutils" and a collection of software routines called the "GNU C Library" -- all written in C. Build environments today, such as Gentoo, provide a pre-compiled gcc, which is then used to to compile itself, the C library, then binutils. In other words, the entire ecology of the gcc toolchain replicates itself.

Do we control technology, or does it use our computers as hosts for its own ends?

Is rationality self-hosting?

Is Consciousness Self-aware?

Namaste
Previous post Next post
Up