1.3 Running Jacal

If you successfully executed one of the installations of the previous section, then typing ‘jacal’ or clicking an icon will begin an interactive session.

To manually start jacal, start your Scheme implementation with SLIB. This may involve setting up that implementation’s initialization file or LOADing a ‘.init’ file from the slib directory. Then type:

(slib:load "/usr/local/lib/jacal/math")

where /usr/local/lib/jacal/ is a path to the JACAL directory. JACAL should then print:

JACAL version 2a1, Copyright 1989-2026 Aubrey Jaffer
JACAL comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `(terms)' for details.
;;; Type (math); to begin from Scheme session.

Do as it says:

(math)
⇒
type qed; to return to scheme, type help; for help.
(%0000)

And you are ready to try the commands described in the rest of the manual.

Demonstrating Jacal

There are several demonstration files in the jacal directory. To run, use the batch command batch.

batch("demo");

Demonstrates a variety of JACAL features.

batch("rw.math");

Demonstrates tensors and The Robertson-Walker Cosmology Model.

Recovery from Errors

JACAL tries to catch any errors it encounters and print an informative message before returning to the prompt. If there are unmatched parentheses or missing delimiters in your typed command, type semicolons (followed by newline) until it returns to the prompt:

(%0000) ({adf;
          ^ "mismatched delimiter" #\; expecting #\} 
;
^ "mismatched delimiter" #\; expecting #\) 
;
%0000: adf
(%0001) 

As JACAL is a complicated program there are bugs which will occasionally cause the program to stop with some sort of error reported by the underlying Scheme system. In interactive implementations (such as SCM) you can usually continue your session by typing (math). The expression which was input to JACAL just before the error will be lost but you should be able to otherwise continue with your session.

If you define identifiers which have already been used in formulas, the earlier uses are not updated. You can restore a name to its unassigned status by defining it to itself:

(%0001) a: 5/7;
a: 5/7
(%0001) a+3;
       26
%0001: --
       7
(%0002) a:a;
a: a
(%0002) a+3;
%0002: 3 + a

If the underlying scheme implementation supports a (restart) command, then typing restart(); in JACAL will re-initiate the session, forgetting all the commands and formulas you entered previously:

(%0003) restart();
..............
JACAL version 2a1, Copyright 1989-2026 Aubrey Jaffer
JACAL comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `(terms)' for details.
;;; Type (math); to begin from Scheme session.
Type qed; to return to Scheme, type help; for help.
(%0000)

Stopping Jacal

The command quit(); will end your JACAL session.

With non-interactive Scheme implementations the JACAL command qed(); or typing the end-of-file character (C-z on MS-DOS and VMS, C-d on others) will end your JACAL session.

The command qed(); will return to the interactive Scheme session. Typing (math) will return to the JACAL session.

From the interactive Scheme session (exit) or possibly an end-of-file character will terminate the session.