]> gitweb.factorcode.org Git - factor.git/blob - README.txt
extra.redis: Replace 'redis-assoc' with the more general 'redis' type (now in the...
[factor.git] / README.txt
1 The Factor programming language
2 -------------------------------
3
4 This file covers installation and basic usage of the Factor
5 implementation. It is not an introduction to the language itself.
6
7 * Contents
8
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
16 - Command line usage
17 - The Factor FAQ
18 - Source organization
19 - Community
20
21 * Compiling the Factor VM
22
23 Factor supports various platforms. For an up-to-date list, see
24 <http://factorcode.org>.
25
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.
29
30 Run 'make' ('gmake' on *BSD) with no parameters to build the Factor VM.
31
32 * Bootstrapping the Factor image
33
34 Once you have compiled the Factor VM, you must bootstrap the Factor
35 system using the image that corresponds to your CPU architecture.
36
37 Boot images can be obtained from <http://factorcode.org/images/latest/>.
38
39 Once you download the right image, bootstrap Factor with the
40 following command line:
41
42 ./factor -i=boot.<cpu>.image
43
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
47 machines.
48
49 * Running Factor on Unix with X11
50
51 On Unix, Factor can either run a graphical user interface using X11, or
52 a terminal listener.
53
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:
57
58     sudo apt-get install libc6-dev libpango-1.0-dev libx11-dev
59
60 If your DISPLAY environment variable is set, the UI will start
61 automatically:
62
63   ./factor
64
65 To run an interactive terminal listener:
66
67   ./factor -run=listener
68
69 * Running Factor on Mac OS X - Cocoa UI
70
71 On Mac OS X, a Cocoa UI is available in addition to the terminal
72 listener.
73
74 The 'factor' executable runs the terminal listener:
75
76   ./factor
77
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.
81
82 * Running Factor on Mac OS X - X11 UI
83
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.
86
87 When compiling Factor, pass the X11=1 parameter:
88
89   make X11=1
90
91 Then bootstrap with the following switches:
92
93   ./factor -i=boot.<cpu>.image -ui-backend=x11
94
95 Now if $DISPLAY is set, running ./factor will start the UI.
96
97 * Running Factor on Windows XP/Vista
98
99 The Factor runtime is compiled into two binaries:
100
101   factor.com - a Windows console application
102   factor.exe - a Windows native application, without a console
103
104 If you did not download the binary package, you can bootstrap Factor in
105 the command prompt using the console application:
106
107   factor.com -i=boot.<cpu>.image
108
109 Once bootstrapped, double-clicking factor.exe or factor.com starts
110 the Factor UI.
111
112 To run the listener in the command prompt:
113
114   factor.com -run=listener
115
116 * The Factor FAQ
117
118 The Factor FAQ is available at the following location:
119
120   <http://concatenative.org/wiki/view/Factor/FAQ>
121
122 * Command line usage
123
124 Factor supports a number of command line switches. To read command line
125 usage documentation, enter the following in the UI listener:
126
127   "command-line" about
128
129 * Source organization
130
131 The Factor source tree is organized as follows:
132
133   build-support/ - scripts used for compiling Factor
134   vm/ - Factor VM
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!
140
141 * Community
142
143 The Factor homepage is located at <http://factorcode.org/>.
144
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.
148
149 Have fun!
150
151 :tabSize=2:indentSize=2:noTabs=true: