1 The Factor programming language
2 -------------------------------
4 This file covers installation and basic usage of the Factor
5 implementation. It is not an introduction to the language itself.
9 - Compiling the Factor VM
10 - Libraries needed for compilation
11 - Bootstrapping the Factor image
12 - Running Factor on Unix with X11
13 - Running Factor on Mac OS X - Cocoa UI
14 - Running Factor on Mac OS X - X11 UI
15 - Running Factor on Windows
21 * Compiling the Factor VM
23 Factor supports various platforms. For an up-to-date list, see
24 <http://factorcode.org>.
26 The Factor VM is written in C++ and uses GNU extensions. When compiling
27 with GCC 3.x, boost::unordered_map must be installed. On GCC 4.x, Factor
28 uses std::tr1::unordered_map which is shipped as part of GCC.
30 Run 'make' ('gmake' on *BSD) with no parameters to build the Factor VM.
32 * Bootstrapping the Factor image
34 Once you have compiled the Factor VM, you must bootstrap the Factor
35 system using the image that corresponds to your CPU architecture.
37 Boot images can be obtained from <http://factorcode.org/images/latest/>.
39 Once you download the right image, bootstrap Factor with the
40 following command line:
42 ./factor -i=boot.<cpu>.image
44 Bootstrap can take a while, depending on your system. When the process
45 completes, a 'factor.image' file will be generated. Note that this image
46 is both CPU and OS-specific, so in general cannot be shared between
49 * Running Factor on Unix with X11
51 On Unix, Factor can either run a graphical user interface using X11, or
54 For X11 support, you need recent development libraries for libc,
55 Pango, X11, and OpenGL. On a Debian-derived Linux distribution
56 (like Ubuntu), you can use the following line to grab everything:
58 sudo apt-get install libc6-dev libpango-1.0-dev libx11-dev
60 If your DISPLAY environment variable is set, the UI will start
65 To run an interactive terminal listener:
67 ./factor -run=listener
69 * Running Factor on Mac OS X - Cocoa UI
71 On Mac OS X, a Cocoa UI is available in addition to the terminal
74 The 'factor' executable runs the terminal listener:
78 The 'Factor.app' bundle runs the Cocoa UI. Note that this is not a
79 self-contained bundle, it must be run from the same directory which
80 contains factor.image and the library sources.
82 * Running Factor on Mac OS X - X11 UI
84 The X11 UI is also available on Mac OS X, however its use is not
85 recommended since it does not integrate with the host OS.
87 When compiling Factor, pass the X11=1 parameter:
91 Then bootstrap with the following switches:
93 ./factor -i=boot.<cpu>.image -ui-backend=x11
95 Now if $DISPLAY is set, running ./factor will start the UI.
97 * Running Factor on Windows XP/Vista
99 The Factor runtime is compiled into two binaries:
101 factor.com - a Windows console application
102 factor.exe - a Windows native application, without a console
104 If you did not download the binary package, you can bootstrap Factor in
105 the command prompt using the console application:
107 factor.com -i=boot.<cpu>.image
109 Once bootstrapped, double-clicking factor.exe or factor.com starts
112 To run the listener in the command prompt:
114 factor.com -run=listener
118 The Factor FAQ is available at the following location:
120 <http://concatenative.org/wiki/view/Factor/FAQ>
124 Factor supports a number of command line switches. To read command line
125 usage documentation, enter the following in the UI listener:
129 * Source organization
131 The Factor source tree is organized as follows:
133 build-support/ - scripts used for compiling Factor
135 core/ - Factor core library
136 basis/ - Factor basis library, compiler, tools
137 extra/ - more libraries and applications
138 misc/ - editor modes, icons, etc
139 unmaintained/ - unmaintained contributions, please help!
143 The Factor homepage is located at <http://factorcode.org/>.
145 Factor developers meet in the #concatenative channel on the
146 irc.freenode.net server. Drop by if you want to discuss anything related
147 to Factor or language design in general.
151 :tabSize=2:indentSize=2:noTabs=true: