Enigma: A programming language

Enigma logo

Enigma is an interpreted programming language. With it you can create computer software. Enigma is not recommended for industrial use. It does work, however.

An Enigma interpreter along with a few tests can be downloaded here. It's relatively stable. I had to write it in Java, as I had to do an exam project in Java and I didn't want to create a programming language and a random Java program at the same time. I would've liked to write it in C otherwise (for the experience and for a FFI).

Documentation

Documentation is also included in the program download.

But before you do anything, here's an example of a program:

{/num/
    1 = res;
    {/n,r/
        r n ! multiply;
        n 1 ! subtract;
        n 1 ! greater = return;
    } = facfunc;
    facfunc num res ! loop;
    res = return;
} = factorial;

5 ! factorial | stdout "5! =" temp "\n" ! write;
7 ! factorial | stdout "7! =" temp "\n" ! write;

This is a factorial program. It will output this:

5! = 120
7! = 5040

So, while the syntax may be different than eg. C, it's not completely incomprehensible.


Note for people who are unable to not understand Danish:

Hvis du forstår dansk, kan du se min (anonymiserede) aflevering her.

Title:Enigma
Modified:Tue, 02 Aug 2011 23:08:13 +0200
Created:Tue, 02 Aug 2011 23:08:13 +0200
Revision:0 (local), 20 (global)
Summary:A backwards programming language with interpreter.
License:Creative Commons Attribution-ShareAlike 3.0 Unported (or any later version) (page)
License:GNU General Public License, version 3 (or any later version) (interpreter)

View source