Waduzitdo

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

Waduzitdo (What does it do?), originally spelled in all caps (WADUZITDO) as many programming languages were at the time, is a non-Turing complete derivative of PILOT. It was created by BYTE Magazine contributor Larry Kheriaty in the late 1970s as a way to put together quick and dirty demonstrations for friends not familiar with the functions of computers, and is most useful for simple question-and-answer quiz and game programs.

Commands

The one-letter commands are as follows, and the colons are part of the commands:

  • T: Output text; this command is immediately followed by the text, no quotation marks.
  • A: Accept one character of input. This command appears on a line by itself and does not have a value after it.
  • M: Character matching. Often put before a command with a branch flag, so M:x means "if the x key is pressed".
  • Y is put on the same line, with no spaces, immediately before another command, usually a text output or jump, to perform that command only when the previous character match is true, so often you will see YT:insert text here.
  • N is put on the same line, with no spaces, immediately before another command, usually a text output or jump, to perform that command only when the previous character match is false, so often you will see NT:insert text here.
  • * is put before another command, usually a text output, to indicate that it is a command that can be jumped to, also known as a section marker or program marker.
  • J: Followed by a number, this command jumps that many * section markers, so J:6 jumps to the sixth section marker from the current point. J:0 is a special case which jumps backwards to the most recent A command. Outside of this one special case, Waduzitdo cannot jump back.
  • S: This command stops execution.

User:Star651 has devised a mnemonic for remembering the list of commands; NASTY star MJ, where the star is a way of pronouncing the * symbol. The mnemonic can also be turned into a sentence, like "MJ is a nasty star", to make it even easier to remember.

Computational class

Waduzitdo is capable of implementing all deterministic finite-state transducers, but cannot implement any program other than a finite-state transducer – because it can branch based on input and has fully arbitrary jumps, it can implement a deterministic finite-state transducer pretty much directly, but has no operations that would allow for more power.

Examples

Hello, World!

T:Hello, World!
S:

Nim Game

T:Nim for Waduzitdo, exactly how it appeared in 1978! Except for this line!
T:LET'S PLAY NIM WITH 7 PEBBLES.
T:WE TAKE TURNS TAKING 1,2 OR 3.
T:THE LAST ONE TO TAKE ONE LOSES.
T:THERE ARE 7, HOW MANY ?
A:
M:1
YJ:1
M:2
YJ:2
M:3
YJ:6
T:YOU CAN TAKE ONLY 1,2, OR 3.
J:0
*T:THAT LEAVES 6, I TAKE 1 LEAVING 5.
T:HOW MANY ?
A:
M:1
YJ:5
M:2
YJ:4
M:3
YJ:3
T:YOU MUST TAKE 1,2 OR 3.
J:0
*T:THAT LEAVES 5, I TAKE 1 LEAVING 4.
T:HOW MANY ?
A:
M:1
YJ:3
M:2
YJ:2
M:3
YJ:1
T:YOU MUST TAKE 1,2 OR 3 ONLY.
J:0
*T:THAT LEAVES THE LAST ONE.
T:I TAKE IT ... YOU WIN!
J:5
*T:THAT LEAVES 2, I TAKE 1 LEAVING 1.
J:3
*T:THAT LEAVES 3, I TAKE 2 LEAVING 1.
J:2
*T:THAT LEAVES 4, I TAKE 3 LEAVING 1.
*T:HOW MANY ?
A:
M:1
NT:YOU HAVE NO CHOICE BUT TO TAKE 1.
NT:HOW MANY ?
NJ:0
T:YOU JUST TOOK THE LAST ONE ... I WIN.
*T:TO PLAY AGAIN TYPE THE DOLLAR SIGN.
S:

Historical impact

Despite Waduzitdo having been around since 1978, it has had very little historical impact, and it is obscure enough that even long-time members of the esolang community, let alone the rest of the programming community, have never heard of it. Despite this, occasionally a computer history buff would find the old BYTE magazines, hence the Waduzitdo 2001 specification (see external resources), and despite this very Esolang Wiki article being around since 2006, for many years it was only in the stubs category, not even in the languages category or list, let alone the languages from before 1993 category. Once in a while it would pop up on a programming forum where someone was trying to remember the exact name of the language, and some people admitted to building a Waduzitdo interpreter on their blogs when they wanted to test their skills at writing an interpreter of a programming language in their favorite programming language. However, the language never caught on, even within the esolang community. However, a reference to Waduzitdo has appeared in an unexpected place; in the Wikipedia article about barcodes, in the section about uses for barcodes that are not common anymore, there is a sentence about barcodes for source code distribution, including Paperbyte, a barcode system invented by the same company that publishes BYTE magazine, and the citation linked to a random Paperbyte barcode example that just happened to be in Waduzitdo.

See also

  • EWaduzitdo, a 2024 language that is a compatible superset of Waduzitdo with variable and math features, though Turing completeness is still uncertain.

External resources