In computer programming, self-hosting is the use of a program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger systems. Other programs that are typically self-hosting include kernels, assemblers, command-line interpreters and revision control software. Operating systems An operating system is self-hosted when the toolchain to build the operating system runs on that OS. For example, Windows can be built on a computer running Windows. However, operating systems don't start out as self-hosted. When developing for a new computer or operating system, you need a system to run the development software, but you need development software to write the operating system. This is called a bootstrapping problem or, more generically, a chicken or the egg dilemma. A solution to this problem is the cross compiler (or cross assembler when working with assembly language). A cross compiler allows you to use one computer to develop software for a different machine or operating system, making it possible to create an operating system for a machine for which one does not yet exist. Once written, software can be deployed to the target system using the usual means: an EPROM, floppy diskette, flash memory (such as a USB thumb drive), or JTAG device. This is similar to the method used to write software for gaming consoles or for handheld devices, like cellular phones or tablets, which do not host their own development tools. Once the software is mature enough to compile its own code, the cross-development dependency ends. At this point, an operating system is said to be self-hosted. Compilers Software development using compiler or interpreters can also be self hosted when the compiler is capable of compiling itself. Since self-hosted compilers suffer from the same bootstrap problems as operating systems, a compiler for a new programming language needs to be written in an existing language. So the developer may use something like assembly language, C/C++, or even a scripting language like Python or Lua to build the first version of the compiler. Once the language is mature enough, development of the compiler can shift to the compiler's native language, allowing the compiler to build itself. History The first self-hosting compiler (excluding assemblers) was written for Lisp by Hart and Levin at MIT in 1962. They wrote a