Should I change the letter commands to symbols ($, %, &, etc.) or leave them as letters?
Leave as letters
 0%  [ 0 ]
Change to symbols
 100%  [ 2 ]
Total Votes : 2

Most recent update here http://www.cemetech.net/forum/viewtopic.php?p=173154#173154

First off, esolang is short for esoteric programming language.
Spyrodecimal is an esolang where most of the commands are numbers.

Here are all the commands:

0 - Pauses the program for 1/10 second.
1 - Prints the ASCII equivalent of the number in memory.
n - Prints the actual number in memory.
2 - Increases the number in memory.
3 - Decreases the number in memory.
4 - Gets one character of input, and stores it in memory.
5 - Prints a new line.
6 - Generates a random number between 1 and 256 and stores it in memory.
7 - Moves the program reader back for the amount in memory. For example, if 5 is in memory, it will move back 5 spaces.
8 - Erases the memory.
9 - Same as 7, except moves the reader forward instead of backward.
q - Quits the interpreter.
x - quits the program, but not the interpreter.
s - Stores the current memory value into one of six variables (a, b, c, d, e, f). Variables are not affected by 8. Syntax (s<var> example: sa)
r - Recalls the value stored into one of six variables (a, b, c, d, e, f) and stores it in memory. Syntax (r<var> example: ra)

I'm currently working on the interpreter (in C++).
Any ideas are welcome!
Hrrrrm... Doesn't seem turing complete, seeing as the only way to move around in the program is with 7s, and those are mainly comments.
seana11 wrote:
Hrrrrm... Doesn't seem turing complete, seeing as the only way to move around in the program is with 7s, and those are mainly comments.
You actually have a good point for once. Is there only one memory address? Can you not move the memory pointer?
seana11 wrote:
Hrrrrm... Doesn't seem turing complete, seeing as the only way to move around in the program is with 7s, and those are mainly comments.

I'm not sure what turing complete means. I looked on Wikipedia, but I just got more confused Sad

KermMartian wrote:
Is there only one memory address?

I'm working on adding more memory addresses.
Spyro543 wrote:
seana11 wrote:
Hrrrrm... Doesn't seem turing complete, seeing as the only way to move around in the program is with 7s, and those are mainly comments.

I'm not sure what turing complete means. I looked on Wikipedia, but I just got more confused Sad

KermMartian wrote:
Is there only one memory address?

I'm working on adding more memory addresses.
As long as you have more memory addresses, a memory pointer, and the ability to move the pointer to point to different parts of memory, you're probably in the clear as far as vague Turing completeness goes.
MORE UPDATES!!!

Source:

Code:
#include <iostream>
#include <string>
#include <stdlib.h>
#include <windows.h>
using namespace std;
int loopstart = 0;
int main()
{
    cout << "Spyrodecimal Interpreter\nBy Spyro543 -- Type 'q' to exit\n------------------------\n";
    string prgm;
    signed int mem = 0;
    int pos = 0;
    char data;
    signed int a = 0;
    signed int b = 0;
    signed int c = 0;
    signed int d = 0;
    signed int e = 0;
    signed int f = 0;
    char var;
    while (true)
    {
        cout << ">>> ";
        cin >> prgm;
        for (int i=0;i < prgm.length();i++)
        {
            data = prgm[i];
            switch (data)
            {
                case '0':
                Sleep(100);
                break;
                case '1':
                cout << (char)mem;
                break;
                case '2':
                mem++;
                break;
                case '3':
                mem--;
                break;
                case '4':
                char inp;
                mem = 0;
                cin >> inp;
                mem = (int)inp;
                break;
                case '5':
                cout << "\n";
                break;
                case '6':
                mem = rand() % 256 + 1;
                break;
                case '7':
                i -= mem;
                break;
                case '8':
                mem = 0;
                break;
                case '9':
                i += mem;
                break;
                case 'q':
                return 0;
                break;
                case 'n':
                cout << mem;
                break;
                case 'x':
                goto end;
                break;
                case 'r':
                var = prgm[i+1];
                if (var=='a') mem = a;
                else if (var=='b') mem = b;
                else if (var=='c') mem = c;
                else if (var=='d') mem = d;
                else if (var=='e') mem = e;
                else if (var=='f') mem = f;
                break;
                case 's':
                var = prgm[i+1];
                if (var=='a') a = mem;
                else if (var=='b') b = mem;
                else if (var=='c') c = mem;
                else if (var=='d') d = mem;
                else if (var=='e') e = mem;
                else if (var=='f') f = mem;
                break;
                default:
                break;
            }
        }
        end:
        cout << "\nProgram finished.\n";
    }
}

Look at the first post, 1n is now n, s and r commands are added, and 7 and 9 are changed.
Download links:
Source: http://anova.57o9.org/junk/spd/spyrodec.cpp
EXE: http://anova.57o9.org/junk/spd/spyrodec.exe

This update takes Spyrodecimal one step further to becoming Turing complete!
Hello, I'm just going to ask and be informed. Can someone educate me what it means to be "Turing Complete"?
wikipedia wrote:
In computability theory, a system of data-manipulation rules (such as an instruction set, a programming language, or a cellular automaton) is said to be Turing complete or computationally universal if and only if it can be used to simulate any single-taped Turing machine and thus in principle any computer.
Basically, a language is Turing complete if it can simulate a Turing Machine, and therefore can solve any computable problem.

Spyro: Can you give us a sample program and sample output?
JoeYoung wrote:
Hello, I'm just going to ask and be informed. Can someone educate me what it means to be "Turing Complete"?


Also, a Turing Complete language is described by a Class-0 grammar in the Chomsky Hierarchy.


Spyro, I'd recommend you aim for a more solid grasp of formal grammars and the differing classes of automata before you muck about too much with language creation.
The TI-Basic version is coming along, commands X, Q, N, 2, 3, 7, 8, and 9 are added. (I also added the 0 command, but instead of freezing execution, it shows a "Press Enter" Pause command.) However, I'm stuck with the 1 command. How could I change the value in memory to a printable character?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement