Installing Factor, and making Factor and Exercism play nice
The last stable release of Factor (0.97 released 2 Nov 2014) is too old for use with Exercism.
http://factorcode.org provides nightly binaries under the "Development release" section. These binaries are built from git, but only builds that pass are shown.
(Auto)build from source
If you want the bleeding edge and even nightly is too old for you, then you will need a modern C++ compiler (GCC >=4.8 or Clang >=3.5),
With those simple requirements fulfilled, you can:
buildshell script: here for Unix-likes / POSIX shells or here for Windows. Put it in the directory under which Factor should be installed. A directory called
factorcontaining the codebase will be created.
Run it like
./build.sh install, or
.\build.cmd installon Windows. This will clone Factor's
gitrepository, build it, and download a Factor VM image from http://factorcode.org. This process may take between 2 and 20 minutes, scaling with your link and clock speeds.
You can now run the
factor.exebinary generated inside the
factor --helpfor help. You can also access documentation from the command line, or by pressing F1 in the GUI Listener, which will open the help browser.
In the future, use the
build.cmdon Windows) inside the
factorsubdirectory to pull from git and rebuild in-place, and download a new VM image if needed.
The file structure may now look like this:
. ├── build.sh
You no longer need the top level
build script, as in the future the downloaded one should be used.
Manually build from source (not recommended)
Clone the repository and use
make in that folder.
make fails with an error about a non-present target, try
make factor or, if you can read a Makefile, find the make target for your platform in
If that fails, open an issue on factor/factor containing the error -- the friendly developers will be happy to help.
Stable (not recommended)
Note that Exercism and the
exercism vocabulary for Factor exercises on Exercism both require at least a nightly build.
Only use a stable release if you plan to skip automated testing or thousands of new features and bugfixes, and you do not plan to contribute to Factor exercises on Exercism.
To develop Factor exercises for Exercism, you need to be able to build and run the
Download a Stable release binary for your platform from the "Stable release" section on http://factorcode.org, and run the installer.
Due to limitations like name clashes and filename disagreements, it's rather difficult to use Factor's
tools.test on Exercism exercises out of the box.
Instead, there is a wrapper testing vocabulary for the Factor workflow in an Exercism context. Users and Exercism maintainers alike can write and run tests in a familiar way, with much less overhead.
To test your Factor solutions in your
exercism/factor folder, follow the directions in the README.
For information on using the
exercism.testing vocabulary, refer to the testing documentation, or to
exercism.testing's documentation by running
"exercism.testing" help in Factor, after installing