Can these types of programs exist in every Turing language?

In each Turing-Complete language, you can create a working

  • A compiler for itself that first runs on an interpreter written in some other language and then compiles its own source code? ( Bootstrapping )

  • Compiler Standard-Compilant C ++, which displays binary files for, for example: Windows?

  • Regular analyzer and evaluator?

  • Clone of World of Warcraft? (Assuming the language gets the necessary API bindings, such as OpenGL and the WoW source code)

(Everything here is theoretical)

Take Brainf * ck as an example.

+7
language-agnostic turing-complete
source share
8 answers

In each Turing-Complete language, you can create a working ...

If one of the Turing-complete languages ​​can do this, then everyone can. In this sense, they are all equally "powerful." Since everything you described already exists in at least one language with full Turing, any of these programs can be written in any other Turing language.

However, simply because something is possible does not mean that it is easy or even possible. This is a very important difference, and that is the essence of why different programming languages ​​exist. They are not all equally good at creating certain types of software — if they were, we only need one language!

+8
source share

Turing-Complete only expresses the ability to calculate , nothing about the I / O capability!

+8
source share

No, Turing's completeness has nothing to do with I / O and hardware. However, you can pretend to be I / O, hardware systems, and graphics systems that exist when using variables (or "memory tapes"). In BF, you can use the first 2 cells (x, y) for the "fake" screen resolution, then another x times y cells for all the pixels on the screen, then the next cell (n) for the size of the "fake" file system, then the next n cells for file system content ...

+5
source share

Yes, of course, all this. What “Turing-complete” means, after all: it can calculate everything that can be calculated.

+2
source share

All that really requires Turing is that you can do simple math, have some variables, and execute a while loop. Or any number of equivalent things. If you want to make real programs, you need a little more (especially for system calls), and you also need to worry about efficiency (training machines can be very slow ...) There is theoretically no difference between equivalent systems, but in practice there is.

If someone makes a WoW client in BF, I will be very impressed!

+1
source share

Any algorithm that can be implemented in one Turing-Complete language can be implemented in any other. Your questions are more related to the services of the operating system and API, which should be available through the appropriate language.

In short, the answer is given to all of the above from a formal language point of view.

0
source share
Theoretically, yes. But a much more interesting question is that this would be practically possible given a certain "esoteric" programming language.
0
source share

Each Turing-Complete language can compute the same set of functions. That way, a language filling the wording can do everything you wrote, because these things compute with other languages ​​that complement turing.

-2
source share

All Articles