Factor/Getting started

Once you have downloaded a binary package or built from source, you can start Factor as follows:

  • Mac OS X: Double-click Factor.app or run open Factor.app in a Terminal to start the UI; run ./factor in the Terminal to start a command-line listener
  • Windows: Double-click factor.exe, or run .\factor.com in a command prompt, to start the Factor UI
  • Unix: Run ./factor in a shell to start the Factor UI if $DISPLAY is set, otherwise start a command line listener

The Factor UI runs by default if it can; to start a command-line listener on Windows or Unix, pass -run=listener. On Mac OS X, the factor binary at the top level of the source tree cannot run the Factor UI, only Factor.app can. However, the latter can be used in place of the former; to run Factor.app in command-line mode, issue the following in the Terminal:

./Factor.app/Contents/MacOS/factor -run=listener


The Factor environment includes extensive reference documentation and a short "cookbook" to help you get started. The best way to read the documentation is in the UI. You can also browse the documentation online at http://docs.factorcode.org. Important subsections on the above site:

First steps

Explore further

You might want to look at some Examples.

The FAQ will answer the most common questions.

Chris Double maintains a collection of Factor articles covering various advanced topics.

A great way to get started with Factor is to join the Concatenative IRC channel and introduce yourself. We are a friendly community and we like to help beginners. We also have a Mailing list for Factor discussion.

Difference between factor.exe and factor.com

On Windows, factor.exe is the preferred executable to use when launching Factor from Windows Explorer, whereas factor.com should be used from the command prompt.

Running factor.exe from the command prompt will suppress standard input and output, and running factor.com from Windows Explorer will open a console window, even if the Factor UI is running.

On other platforms, the same Factor VM binary is able to be used in both command-line and graphical modes, but on Windows, whether or not a program can use the console is a property of the executable file itself, and not of the program's runtime. Two executables are needed; building solely as a console application is unacceptable, because even if a hack is added to the VM's main() function to hide the console as soon as the program starts in graphical mode, it would still flicker on the screen. There is no way around this with the Win32 API.

This revision created on Wed, 26 Aug 2009 10:45:26 by slava