About Turing in Turing

What is it?

Turing in Turing is a reimplementation of the Turing language, within itself. It includes many new features including dynamic typing and non-annoying block endings.

Why Should I Care?

Turing has problems, this fixes them. One annoying thing is the difference between procedures and functions. My code at least is littered with code like:

var dummy := A_Function_With_A_Result_I_Don't_Care_About()

In Turing in Turing procedures are the same thing! You can call a function and not care about the result. since Turing in Turing is dynamic you can avoid declaring the return type by using procedures.

Another annoying thing is block ending restatements. In regular Turing, you have to type "end if","end for" and even
"end Long_Function_Name_That_I_Don't_Want_To_Type_Ever_Again"

Yes, I know you can press Ctrl+Enter to complete it. But what if you change the name of the function? You change the name, click run and, lo and behold, an alert pops up "ERROR: Ending doesn't match, fix it moron" (slightly dramatized.)

Yah, that is pretty annoying.

- Richard Perryman

What Does it Do?

The Execution Process

First, the code is saved to a file. The program then uses Sys.Exec to run the java program that parses the file. The java program takes the file, parses it and translates it in to an easier to parse syntax. You can view the output in the file ast.txt.

The Turing program takes this text file and parses it into a data structure called an AST (Abstract Syntax Tree.) Then the interpreter gets to work. It uses complex recursion to walk down the tree. When It encounters a node, it performs the action associated with it.

Features

These are just some of the many features that are included in Turing in Turing

  • Functions as variables
  • Dynamic records
  • Dynamic typing
  • A built in code editor
  • Helpful tour
  • Tons of demo programs.

Testimonials

That's totally hax.

- Jason Luo

A major project within a major project. It's like inception.

- Marco Paggoto

Around the same number of lines of good code as Adam Bielinski's Forces.

- Tristan Hume (with help from linecount.sh)