From Esolang
Jump to navigation Jump to search

Are the Unicode double quotes (“” as opposed to "") part of the syntax, or are they unintentional? LegionMammal978 (talk) 13:13, 3 April 2020 (UTC)

They were unintentional. I will fix that. PythonshellDebugwindow (talk) 14:55, 14 April 2020 (UTC)

Computational class

A 1-register minsky machine program can be simulated:

start with: import 0
increment: + 1
decrement and check if 0: put the entire thing so far in parenthesis and type:
  == 0 ? (jump1) : (jump2)
multiply by constant: * (constant)
divide by constant: put the entire thing so far in parenthesis and type:
  % (constant) == 0 ? (jump1) : (jump2)
Jump1 should start with the operation, decrementing or division

The major problem with this approach is that expression data will not be carried over to the jumped file. But you could write the entire expression again inside of a print statement and ask the user to reinput that number if that counts. (You would also need input to detect numerics and put them in as numbers for that to work.)

Long story short: If user interaction is allowed to be used for Turing-completeness, and numerical input is available, then 2KWLang is Turing-complete. Otherwise, 2KWLang loses all data whenever looping is used, and cannot emulate all finite-state automata.

BoundedBeans (talk) 02:51, 27 August 2022 (UTC)

This post is inaccurate in recent times since the language was radically altered in 2024 (in a really good way). 2KWLang now actually has the potential for true Turing-completeness without input since you can store data in files. Although the data would have to be code itself that would be executed when it needs to be read, Underload shows this to not be a barrier to Turing-completeness. BoundedBeans (talk) 15:42, 2 June 2024 (UTC)
Actually, I don't think there's a need for the Underload strategy. As I think the Finite Looping Counter example demonstrates, we can use redirection followed by an import to make eval, then eval a file read, math, then redirection to get consistent access to numerical data. Then we can use more eval to generate file names on the fly with an integer parameter, positive or negative. From there we have the mechanism for a Turing-machine tape. BoundedBeans (talk) 15:52, 2 June 2024 (UTC)