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.
10 - Compiling the Factor VM
11 - Libraries needed for compilation
12 - Bootstrapping the Factor image
13 - Running Factor on Unix with X11
14 - Running Factor on Mac OS X - Cocoa UI
15 - Running Factor on Mac OS X - X11 UI
16 - Running Factor on Windows
24 Factor supports the following platforms:
38 MS Windows/x86 (XP and above)
41 Please donate time or hardware if you wish to see Factor running on
42 other platforms. In particular, we are interested in:
49 * Compiling the Factor VM
51 The Factor runtime is written in GNU C99, and is built with GNU make and
54 Factor requires gcc 3.4 or later. On x86, it /will not/ build using gcc
55 3.3 or earlier. If you are using gcc 4.3, you might get an unusable
56 Factor binary unless you add 'SITE_CFLAGS=-fno-forward-propagate' to the
57 command-line arguments for make.
59 Run 'make' (or 'gmake' on *BSD) with no parameters to see a list of
60 targets and build options. Then run 'make' with the appropriate target
63 Compilation will yield an executable named 'factor' on Unix,
64 'factor-nt.exe' on Windows XP/Vista, and 'factor-ce.exe' on Windows CE.
66 * Libraries needed for compilation
68 For X11 support, you need recent development libraries for libc, Freetype,
69 X11, OpenGL and GLUT. On a Debian-derived Linux distribution (like Ubuntu),
72 sudo apt-get install libc6-dev libfreetype6-dev libx11-dev glutg3-dev
74 to grab everything (if you're on a non-debian-derived distro please tell us
75 what the equivalent command is on there and it can be added :)
77 * Bootstrapping the Factor image
79 The boot images are no longer included with the Factor distribution
80 due to size concerns. Instead, download a boot image from:
82 http://factorcode.org/images/
84 Once you have compiled the Factor runtime, you must bootstrap the Factor
85 system using the image that corresponds to your CPU architecture.
87 Once you download the right image, bootstrap the system with the
88 following command line:
90 ./factor -i=boot.<cpu>.image
92 Or this command for Mac OS X systems:
94 ./Factor.app/Contents/MacOS/factor -i=boot.<cpu>.image
96 Bootstrap can take a while, depending on your system. When the process
97 completes, a 'factor.image' file will be generated. Note that this image
98 is both CPU and OS-specific, so in general cannot be shared between
101 * Running Factor on Unix with X11
103 On Unix, Factor can either run a graphical user interface using X11, or
106 If your DISPLAY environment variable is set, the UI will start
111 To run an interactive terminal listener:
113 ./factor -run=listener
115 If you're inside a terminal session, you can start the UI with one of
116 the following two commands:
121 The latter keeps the terminal listener running.
123 * Running Factor on Mac OS X - Cocoa UI
125 On Mac OS X 10.4 and later, a Cocoa UI is available in addition to the
126 terminal listener. If you are using Mac OS X 10.3, you can only run the
127 X11 UI, as documented in the next section.
129 The 'factor' executable runs the terminal listener:
133 The 'Factor.app' bundle runs the Cocoa UI. Note that this is not a
134 self-contained bundle, it must be run from the same directory which
135 contains factor.image and the library sources.
137 * Running Factor on Mac OS X - X11 UI
139 The X11 UI is available on Mac OS X, however its use is not recommended
140 since it does not integrate with the host OS. However, if you are
141 running Mac OS X 10.3, it is your only choice.
143 When compiling Factor, pass the X11=1 parameter:
145 make macosx-ppc X11=1
147 Then bootstrap with the following switches:
149 ./factor -i=boot.ppc.image -ui-backend=x11
151 Now if $DISPLAY is set, running ./factor will start the UI.
153 * Running Factor on Windows XP/Vista
155 If you did not download the binary package, you can bootstrap Factor in
158 factor-nt.exe -i=boot.x86.32.image
160 Once bootstrapped, double-clicking factor.exe starts the Factor UI.
162 To run the listener in the command prompt:
164 factor-nt.exe -run=listener
168 The Factor FAQ lives online at http://factorcode.org/faq.fhtml
172 The Factor VM supports a number of command line switches. To read
173 command line usage documentation, either enter the following in the UI
178 * Source organization
180 The following two directories are managed by the module system; consult
181 the documentation for details:
183 core/ - Factor core library and compiler
184 extra/ - more libraries
186 The following directories contain additional files:
188 misc/ - editor modes, icons, etc
189 vm/ - sources for the Factor runtime, written in C
190 fonts/ - TrueType fonts used by UI
191 unmaintained/ - unmaintained contributions, please help!
195 The Factor homepage is located at <http://factorcode.org/>.
197 Factor developers meet in the #concatenative channel on the
198 irc.freenode.net server. Drop by if you want to discuss anything related
199 to Factor or language design in general.
203 :tabSize=2:indentSize=2:noTabs=true: