factor/README.txt

155 lines
4.3 KiB
Plaintext
Raw Normal View History

2007-09-20 18:09:08 -04:00
The Factor programming language
-------------------------------
This file covers installation and basic usage of the Factor
implementation. It is not an introduction to the language itself.
* Contents
- Compiling the Factor VM
- Libraries needed for compilation
2007-09-20 18:09:08 -04:00
- Bootstrapping the Factor image
- Running Factor on Unix with X11
- Running Factor on Mac OS X - Cocoa UI
- Running Factor on Mac OS X - X11 UI
- Running Factor on Windows
- Command line usage
- The Factor FAQ
2007-09-20 18:09:08 -04:00
- Source organization
- Community
* Compiling the Factor VM
2008-04-13 15:48:42 -04:00
Factor supports various platforms. For an up-to-date list, see
2009-03-07 20:38:51 -05:00
<http://factorcode.org>.
2008-04-13 15:48:42 -04:00
The Factor VM is written in C++ and uses GNU extensions. When compiling
with GCC 3.x, boost::unordered_map must be installed. On GCC 4.x, Factor
uses std::tr1::unordered_map which is shipped as part of GCC.
2007-09-20 18:09:08 -04:00
2008-04-13 15:48:42 -04:00
Run 'make' ('gmake' on *BSD) with no parameters to build the Factor VM.
2007-09-20 18:09:08 -04:00
* Bootstrapping the Factor image
2009-05-05 13:35:27 -04:00
Once you have compiled the Factor VM, you must bootstrap the Factor
2007-09-20 18:09:08 -04:00
system using the image that corresponds to your CPU architecture.
2008-04-13 15:48:42 -04:00
Boot images can be obtained from <http://factorcode.org/images/latest/>.
Once you download the right image, bootstrap Factor with the
2007-09-20 18:09:08 -04:00
following command line:
./factor -i=boot.<cpu>.image
Bootstrap can take a while, depending on your system. When the process
completes, a 'factor.image' file will be generated. Note that this image
is both CPU and OS-specific, so in general cannot be shared between
machines.
* Running Factor on Unix with X11
On Unix, Factor can either run a graphical user interface using X11, or
a terminal listener.
2009-03-07 20:38:51 -05:00
For X11 support, you need recent development libraries for libc,
2009-04-20 19:37:23 -04:00
Pango, X11, and OpenGL. On a Debian-derived Linux distribution
2009-03-07 20:38:51 -05:00
(like Ubuntu), you can use the following line to grab everything:
sudo apt-get install libc6-dev libpango1.0-dev libx11-dev libgl1-mesa-dev
Note that if you are using a proprietary OpenGL driver, you should
probably leave out the last package in the list.
2009-03-07 20:38:51 -05:00
2007-09-20 18:09:08 -04:00
If your DISPLAY environment variable is set, the UI will start
automatically when you run Factor:
2007-09-20 18:09:08 -04:00
./factor
To run an interactive terminal listener:
./factor -run=listener
* Running Factor on Mac OS X - Cocoa UI
2008-04-13 15:48:42 -04:00
On Mac OS X, a Cocoa UI is available in addition to the terminal
listener.
2007-09-20 18:09:08 -04:00
The 'factor' executable runs the terminal listener:
./factor
The 'Factor.app' bundle runs the Cocoa UI. Note that this is not a
self-contained bundle, it must be run from the same directory which
contains factor.image and the library sources.
* Running Factor on Mac OS X - X11 UI
2008-04-13 15:48:42 -04:00
The X11 UI is also available on Mac OS X, however its use is not
recommended since it does not integrate with the host OS.
2007-09-20 18:09:08 -04:00
When compiling Factor, pass the X11=1 parameter:
2008-04-13 15:48:42 -04:00
make X11=1
2007-09-20 18:09:08 -04:00
Then bootstrap with the following switches:
2009-05-05 13:35:27 -04:00
./factor -i=boot.<cpu>.image -ui-backend=x11
2007-09-20 18:09:08 -04:00
Now if $DISPLAY is set, running ./factor will start the UI.
* Running Factor on Windows XP/Vista
2009-02-08 19:42:11 -05:00
The Factor runtime is compiled into two binaries:
factor.com - a Windows console application
factor.exe - a Windows native application, without a console
2007-09-20 18:09:08 -04:00
If you did not download the binary package, you can bootstrap Factor in
2009-02-08 19:42:11 -05:00
the command prompt using the console application:
2007-09-20 18:09:08 -04:00
2009-02-08 19:42:11 -05:00
factor.com -i=boot.<cpu>.image
2007-09-20 18:09:08 -04:00
2009-02-08 19:42:11 -05:00
Once bootstrapped, double-clicking factor.exe or factor.com starts
the Factor UI.
2007-09-20 18:09:08 -04:00
To run the listener in the command prompt:
2009-02-08 19:42:11 -05:00
factor.com -run=listener
2007-09-20 18:09:08 -04:00
* The Factor FAQ
2009-03-07 20:38:51 -05:00
The Factor FAQ is available at the following location:
<http://concatenative.org/wiki/view/Factor/FAQ>
2007-09-20 18:09:08 -04:00
* Command line usage
2008-04-13 15:48:42 -04:00
Factor supports a number of command line switches. To read command line
usage documentation, enter the following in the UI listener:
2007-09-20 18:09:08 -04:00
"command-line" about
* Source organization
2008-04-13 15:48:42 -04:00
The Factor source tree is organized as follows:
2007-09-20 18:09:08 -04:00
2008-04-13 15:48:42 -04:00
build-support/ - scripts used for compiling Factor
2009-05-05 13:35:27 -04:00
vm/ - Factor VM
2008-07-29 19:45:39 -04:00
core/ - Factor core library
basis/ - Factor basis library, compiler, tools
extra/ - more libraries and applications
2008-04-13 15:48:42 -04:00
misc/ - editor modes, icons, etc
2007-09-20 18:09:08 -04:00
unmaintained/ - unmaintained contributions, please help!
* Community
The Factor homepage is located at <http://factorcode.org/>.
Factor developers meet in the #concatenative channel on the
irc.freenode.net server. Drop by if you want to discuss anything related
to Factor or language design in general.
Have fun!
:tabSize=2:indentSize=2:noTabs=true: