#+title: Enigma
#&summary
A backwards programming language with interpreter.
#&
#+license: bysa, page
#+license: gpl 3+, interpreter

* Enigma: A programming language

#&img;url=art/enigma-logo-small.png, alt='Enigma logo',\
#&width=400, height=200, float=right, medlink=art/enigma-logo.svg

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
[[enigma-0.1.tar.gz][*here*&large]]. 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

+ [[doc/enigma-0.1.pdf][PDF]]
+ [[doc/enigma-0.1-html/][HTML]]
+ [[doc/enigma-0.1.xml][DocBook]]
+ [[doc/enigma-0.1.texinfo][Texinfo (source)]]

Documentation is also included in the program download.

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


#+BEGIN_SRC
{/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;
#+END_SRC

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.

#&line
*** Note for people who are unable to not understand Danish:
Hvis du forstår dansk, kan du se min (anonymiserede) aflevering [[doc/enigma-rapport-da.pdf][her]].

