by daveFNbuck · 7y ago · 0 comments
In other words, if sed is turing complete, this means you could run any other turing complete program on it.
Producing a GUI is also just telling your CPU (a sophisticated turing machine) to format data and how to send the formated data to a display.
EDIT: what justifies the downvotes? Sure the display is not part of the turing machine, but the display is also not part of the GUI. The GUI is a software component that can be created by a turing machine. You wouldn't disagree with me for stating a GUI can be created through a C or Java program.
You can change the definition and add those devices, or you can simulate those devices on your tape, but simulation is not reality.
I'm not saying it's easy, efficient or even desirable to do so, but if sed is turing complete this means we could write a compiler to run any other turing complete program on it. That this process might need basically recompiling a whole operating system might be true, but it doesn't contradict the theory.
I don't understand the downvotes here. I might very well be wrong, but your answer isn't giving an explanation for that.
Nor do processors these days. To the cpu, keyboards, networks, and displays are just electronic signals and the cpu drives a logic to interpret and control those signals. The logic could as well be driven by a program running on a Turing machine, albeit awkwardly of course.
You could also argue that a Unix tool that reads stdin and writes to stdout doesn't have displays or keyboards, and is limited in what it can do. Yet the input/output streams are an abstraction: if we hook the output stream to drive a display and connect the input stream to keyboard event generator the program can certainly drive a graphical interface even if particular Unix tool itself has absolutely no notion of a keyboard nor a display. It just sees bytes in, bytes out, as programmed.
They have an infinite tape and compute (partial) functions from input words to output words, written on that tape. There are many things you can do that a TM can't do. Interactive computing is one of them.
Turing machine is a theoretical model of a computing machine as far it goes to reality itself, but the model does involve the bare essentials to do meaningful work such as input and output. And it is that input and output are what would allow it to be hooked into something that is real.
Given the realism of that we don't actually have infinite tapes either, any hypothetical application of a Turing machine would obviously manipulate the tape to give the program initial input and interpret the tape to read output in order to have the program do useful work.
The notation of an infinite tape is just Turing machine's only way to handle input and output, but it is really an abstraction for any input and output.
The Turing machine doesn't care where the data on the tape came from or if the output is interpreted as letters, pixels, or audio.
For inputs one could introduce memory-mapped peripheral registers, like the M68K does.
The original definition of TM can be preserved if you consider that you are introducing the notion of an outside world that would look at the tape at the end of the TM run (for display etc.) and feed another tape with different initial cell states (peripheral register values) for the next run.
> simulation is not reality.
Virtual machines and emulators are however quite useful ; and it seems that for some people, simulating human intelligence is the Graal.