| ▲ | danbruc 2 days ago | |||||||||||||||||||||||||||||||||||||
How did we end up with printf - within a loop - being Turing-complete? Was it designed that way from the beginning? Were new features added over time until we got there? | ||||||||||||||||||||||||||||||||||||||
| ▲ | marmakoide 2 days ago | parent [-] | |||||||||||||||||||||||||||||||||||||
Having something Turing-complete is surprisingly easy, and it hides everywhere. The repository have a small document that explains how you can use printf() as a computer : it can performs additions, logical union and negation, which is enough. It was unintentional, but Ken Thompson being Ken Thompson, can't be 100% sure. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||