Getting started with Isis

Isis was created at the MIT Media Lab by Stefan Agamanolis, and he is continuing its development at Media Lab Europe, the European research partner of the MIT Media Lab.


The core of the Isis language can be built on any platform that has a standard C compiler. However, because interfaces for audio, video, and graphics vary greatly between operating systems, and because we have limited staff, we have only been able to create full implementations of Isis on a few platforms. At the moment, the Linux operating system is the preferred platform for running Isis.

Installing Isis

Information on setting up a Linux-based machine to run Isis is available on the Linux info page.

Editing Isis programs

We highly recommend the GNU Emacs text editor for editing Isis programs. To start emacs, just type emacs at your shell prompt.
% emacs
An editor window will appear and you can click on Help and Emacs Tutorial to learn how to use Emacs.

If Isis was installed on your machine according to our procedure, a special Isis mode will be available in Emacs that provides helpful features like automatic indentation, parenthesis matching, and key word highlighting. By convention, any file containing an Isis program should be named with the .isis extension, such as myprogram.isis or test.isis. The special Isis Emacs mode will be turned on automatically whenever you edit a file with this extension. Or, to enter Isis mode manually, you can type M-x isis-mode.

Running Isis

In general, you can always start an Isis interpreter by simply typing isis at your shell prompt. You will see something like this:
% isis *** Isis 8 ->
The -> is Isis's prompt, letting you know that it is ready for you to enter expressions. Read the
Isis primer for an introduction to the Isis language and the kinds of expressions you might enter at this prompt.

If you see a message such as "command not found", something is wrong with the installation or with the software on your computer. Check the troubleshooting section of the Isis Linux information for some commonly experienced problems.

Quitting Isis

You can quit Isis at any time by simply hitting control-C.

Running Isis on a file

You can run Isis on the contents of a particular file by passing the name of the file as an argument, like this:
% isis test1.isis ...
Only one file name is allowed.

Passing command-line arguments to Isis programs

You may pass arguments to a program by entering those arguments after the file name on the command line. These arguments are accessible in Isis as a list of strings bound to the variable command-line-args. Consider this example Isis program:
(print "There are " (length command-line-args) "things to add." newline) (print "The argument strings are: " command-line-args newline) (set number-args (map eval command-line-args)) (print "The actual numbers are: " number-args newline) (set sum (apply + number-args)) (print "The sum is: " sum newline)
If this program is saved in a file called "addnums.isis", then we can pass arguments to the program like this:
% isis addnums.isis 23 34 65
And the output of this command will be this:
There are 3 things to add. The argument strings are: [ "23" "34" "65" ] The actual numbers are: [ 23 34 65 ] The sum is: 122
Only the arguments that follow the program file name are put into the command-line-args variable. The program file name MUST be present, UNLESS the -s flag is used as described below, in which case no file name should be entered.

Automatically loading programs

When it starts up, Isis automatically loads a "bootstrap" file located at scripts/bootstrap.isis in your root Isis software directory. This file contains important definitions that are necessary for many of the Isis software libraries to work properly.

You can override this default behavior by defining an environment variable $ISIS_BOOTSTRAP to be the name of the file you would like Isis to automatically load when it starts up. Usually you will want to add to what is done in the default bootstrap file, so you should manually load it at the beginning of your private bootstrap file like this:

(load (append (get-env "ISIS_ROOT") "/scripts/bootstrap.isis"))
To suppress the loading of the bootstrap files, use the -b flag when starting Isis, as described below.

Command line flags

When running an Isis interpreter, the first (and only the first) argument may contain a combination of flags preceded by a hyphen:

-q Turn on quiet mode. When quiet mode is engaged, the automatic printing of values and other extraneous output (such as prompts) is suppressed. Quiet mode is useful when writing shell scripts or cgi scripts.
-d Turn on debug mode. Debug mode is helpful for finding errors in your program. It is described in more detail in the debugging primitives section of the manual.
-b Ignore bootstrap scripts. Using this option prevents the bootstrap scripts (described above) from being loaded at start-up.
-s Read from standard input. This flag causes the interpreter to read the program from the standard input, which means a file name should not be entered and the rest of the command line will be treated as arguments for the program.

Note that when passing flags to the interpreter, you must combine all of the flags into the first argument. For example, to engage quiet mode AND debug mode, you would enter this:

% isis -qd ...

If you intend to write your own libraries of C routines to use inside of Isis, read the information about how to create your own private version of the Isis interpreter.