3 Factor is a [concatenative](https://www.concatenative.org), stack-based
4 programming language with [high-level
5 features](https://concatenative.org/wiki/view/Factor/Features/The%20language)
6 including dynamic types, extensible syntax, macros, and garbage collection.
7 On a practical side, Factor has a [full-featured
8 library](https://docs.factorcode.org/content/article-vocab-index.html),
9 supports many different platforms, and has been extensively documented.
11 The implementation is [fully
12 compiled](https://concatenative.org/wiki/view/Factor/Optimizing%20compiler)
13 for performance, while still supporting [interactive
14 development](https://concatenative.org/wiki/view/Factor/Interactive%20development).
15 Factor applications are portable between all common platforms. Factor can
17 applications](https://concatenative.org/wiki/view/Factor/Deployment) on all
18 platforms. Full source code for the Factor project is available under a BSD
23 ### Building Factor from source
25 If you have a build environment set up, then you can build Factor from git.
26 These scripts will attempt to compile the Factor binary and bootstrap from
27 a boot image stored on factorcode.org.
31 * `git clone git://factorcode.org/git/factor.git`
34 To build the latest complete Factor system from git, either use the
37 * Windows: `build.cmd`
38 * Unix: `./build.sh update`
40 or download the correct boot image for your system from
41 http://downloads.factorcode.org/images/master/, put it in the factor
44 * Unix: `make` and then `./factor -i=boot.unix-x86.64.image`
45 * Windows: `nmake /f Nmakefile x86-64` and then `factor.com -i=boot.windows-x86.64.image`
47 Now you should have a complete Factor system ready to run.
49 More information on [building factor](https://concatenative.org/wiki/view/Factor/Building%20Factor)
50 and [system requirements](https://concatenative.org/wiki/view/Factor/Requirements).
52 ### To run a Factor binary:
54 You can download a Factor binary from the grid on [https://factorcode.org](https://factorcode.org).
55 The nightly builds are usually a better experience than the point releases.
57 * Windows: Double-click `factor.exe`, or run `.\factor.com` in a command prompt
58 * Mac OS X: Double-click `Factor.app` or run `open Factor.app` in a Terminal
59 * Unix: Run `./factor` in a shell
63 A tutorial is available that can be accessed from the Factor environment:
69 Some other simple things you can try in the listener:
74 { 4 8 15 16 23 42 } [ 2 * ] map .
79 "Happy Birthday " write
80 2 = "dear NAME" "to You" ? print
84 For more tips, see [Learning Factor](https://concatenative.org/wiki/view/Factor/Learning).
88 The Factor environment includes extensive reference documentation and a
89 short "cookbook" to help you get started. The best way to read the
90 documentation is in the UI; press F1 in the UI listener to open the help
91 browser tool. You can also [browse the documentation
92 online](https://docs.factorcode.org).
96 Factor supports a number of command line switches:
99 Usage: factor [Factor arguments] [script] [script arguments]
102 -help print this message and exit
103 -i=<image> load Factor image file <image> (default factor.image)
104 -run=<vocab> run the MAIN: entry point of <vocab>
105 -run=listener run terminal listener
106 -run=ui.tools run Factor development UI
107 -e=<code> evaluate <code>
108 -no-user-init suppress loading of .factor-rc
109 -roots=<paths> a list of path-delimited extra vocab roots
113 from within Factor for more information.
116 You can also write scripts that can be run from the terminal, by putting
117 ``#!/path/to/factor`` at the top of your scripts and making them executable.
119 ## Source Organization
121 The Factor source tree is organized as follows:
123 * `vm/` - Factor VM source code (not present in binary packages)
124 * `core/` - Factor core library
125 * `basis/` - Factor basis library, compiler, tools
126 * `extra/` - more libraries and applications
127 * `misc/` - editor modes, icons, etc
128 * `unmaintained/` - now at [factor-unmaintained](https://github.com/factor/factor-unmaintained)
132 Factor developers meet in the `#concatenative` channel on
133 [irc.freenode.net](http://freenode.net). Drop by if you want to discuss
134 anything related to Factor or language design in general.
136 * [Factor homepage](https://factorcode.org)
137 * [Concatenative languages wiki](https://concatenative.org)