Please note that the installing Arc instructions at Arc Forum | Install are currently out of date. Disregard that and any instructions that come together with the specification that Arc can be run only on MzScheme v. 372. The current version of Arc, version 3.1, runs on the latest versions of MzScheme. MzScheme is a legacy component of Racket Lisp (itself formerly known as PLT Scheme), and is automatically installed with Racket.
Also note that the command line for starting Arc has changed with current versions of MzScheme as against what was necessary for v. 372: Currently the -m flag must be dropped from the command line.
Windows XP (An Arc Forum thread with instructions primarily covering Windows XP; Mac OS is also covered to an extent.)
1) Install Racket
Usually installation via the above methods also updates paths to the installed program. After installation is complete, racket, drracket, gracket, mzscheme, etc. should all be callable from the command line without requiring specific path references. If that's not the case for you, at the command line you can invoke 'racket -v' or 'mzscheme -v' to check the version installed (especially if you have multiple installs of Racket), and 'which racket' or 'which mzscheme' to determine the location of those executables in your system.
2) Install Arc
There are three versions of Arc that we will cover here: Arc itself, Arc/Nu, and Anarki (an extension of Arc open to community contribution without moderation).
Arc/Nu: If you want a quick, no fuss, easily installed Arc REPL on which to play right away, with built-in Readline support, Arc/Nu is perfect.
And that's it. You should have a fully functioning Arc REPL. There is no need to run MzScheme or configure its flags as Arc/Nu call the Racket runtime directly. (quit) or Ctrl-D to exit the REPL.
Anarki: For a bleeding-edge version of Arc, try Anarki, the community 'wiki' codebase.
You should now have an Arc repl running on Anarki code. Anarki is bleeding edge and adds to the functionality of Arc - check out the /anarki/lib folder and read the source files to explore these additions. Submit a pull request to receive commit privileges.
Arc: To run Paul Graham and Robert Morris' pure Arc:
3) Simplify start up
The above configurations are bare bone. You will want to set up Arc with scripts to simplify the start up process and shorten path references when running your Arc programs.
a) To get around having to enter path references in the repl, you can start Arc with these commands:
Running Arc/Nu and Anarki Arc the above way, (load "foo.arc") will work within the repl as '/path/to/myarc' operates as the current working directory. At present pure Arc 3.1 appears to require /path/to/arc as the working directory, thus requiring a full path specification for loading foo.arc. [This will be explored further and updated.]
b) The process can be eased further by placing the above command lines in a shell script, one each for arc, arc-nu and anarki.
c) If you plan to run multiple implementations of Arc, it may be helpful to create a single folder entitled arc, with arc3.1, arc-nu, anarki (perhaps as an-stable and an-master) installed in their own sub-folders. The release of newer versions of these Arc variants can be conveniently installed in this one folder, with your shell scripts being adjusted for each version.
4) Adding Readline functionality
If you are running the Arc repl from a standard terminal, Readline support may not be available (ie. you have to key in every command in the repl without recourse to a command line history). This can quickly be a bummer, except in the case of Arc/Nu which has built-in Readline support. To work around this for pure Arc and Anarki, you can install rlwrap and then update your start up scripts to wrap the command line with rlwrap:
You can then scroll through your command history with the up/down arrow keys.
If you are undecided about which editor to use, Gnu Emacs is still a great choice, with an excellent Lisp pedigree. Install and run Emacs, M-x (ie. press Alt-x), and key in 'shell' to get the command prompt. Start Arc as described above, and you will have Alt-p and Alt-n to scroll through the previous/next commands in your command history. No need for rlwrap, plus Emacs comes with customisable modes which highlight and indent text automatically in conformity with Lisp standards, in addition to many really powerful built in features.
Finally, do note that there will be differences in the Arc/Nu and Anarki implementations of Arc. In fact Paul Graham has said that Arc itself will not guarantee backward compatibility from version to version. At this stage of its development Paul wants to ensure that Arc is built on a strongly axiomatic framework, in much the same way that John McCarthy designed or rather, discovered, the original Lisp. In order to do that he reserves the option to change anything, and asks of you your tolerance. So keep that in mind - Arc is very much a work in progress.
Happy hacking. May your Arc-fu be strong!
Getting Started >