factor/core/handbook/handbook.facts

76 lines
3.0 KiB
Plaintext
Raw Normal View History

USING: alien errors generic hashtables help inference tools
2006-08-01 17:41:10 -04:00
io-internals io libc math-internals modules namespaces parser
prettyprint queues sequences sequences-internals test words
kernel generic ;
2006-01-13 02:38:57 -05:00
ARTICLE: "handbook" "Factor documentation"
2006-03-28 23:31:45 -05:00
{ $subsection "changes" }
{ $heading "Survival guide" }
{ $list
2006-08-15 21:23:05 -04:00
{ "The basic unit of code, corresponding to a \"function\" in other languages, is called a " { $emphasis "word" } " in Factor." }
2006-08-18 18:47:41 -04:00
{ "Word take inputs from the stack, and leave output values on the stack. This is documented in a " { $emphasis "stack effect declaration" } ", for example " { $snippet "( x y -- z )" } " denotes that a word takes two inputs, with " { $snippet "y" } " at the top of the stack, and returns one output. See " { $link "effect-declaration" } " for details." }
2006-08-15 21:23:05 -04:00
{ "You can load source files with " { $link run-file } ":"
{ $code "\"my-program.factor\" run-file" } }
2006-11-28 21:57:29 -05:00
{ { "You can load modules from " { $snippet "apps/" } ", " { $snippet "libs/" } " or " { $snippet "demos/" } " with " { $link require } ":" }
{ $code "\"libs/httpd\" require" } }
2006-10-19 23:02:24 -04:00
{ { "Some modules have a defined main entry point, and can be run just like applications in an operating system:" }
2006-11-28 21:57:29 -05:00
{ $code "\"apps/tetris\" run-module" }
2006-10-19 23:02:24 -04:00
}
{ { $link .s } " prints the contents of the stack." }
{ { $link . } " prints the object at the top of the stack." }
{ "If you are reading this from the Factor UI, take a look at " { $link "ui-tools" } "." }
}
{ $heading "Cookbook" }
{ $subsection "cookbook-syntax" }
{ $subsection "cookbook-colon-defs" }
{ $subsection "cookbook-combinators" }
{ $subsection "cookbook-variables" }
{ $subsection "cookbook-vocabs" }
{ $subsection "cookbook-sources" }
{ $subsection "cookbook-io" }
2006-09-06 04:23:44 -04:00
{ $subsection "cookbook-philosophy" }
{ $heading "Language reference" }
2006-06-08 18:06:38 -04:00
{ $subsection "conventions" }
2006-01-13 02:38:57 -05:00
{ $subsection "syntax" }
{ $subsection "dataflow" }
{ $subsection "words" }
{ $subsection "objects" }
{ $subsection "math" }
{ $subsection "collections" }
{ $subsection "streams" }
2006-01-19 18:15:37 -05:00
{ $subsection "parser" }
{ $subsection "prettyprint" }
2006-06-12 03:21:08 -04:00
{ $subsection "alien" }
{ $heading "Environment reference" }
{ $subsection "cli" }
{ $subsection "tools" }
2006-10-26 00:06:25 -04:00
{ $subsection "modules" }
{ $subsection "help" }
2006-08-18 18:47:41 -04:00
{ $subsection "inference" }
{ $subsection "compiler" }
2006-09-19 02:30:21 -04:00
{ $heading "Graphical user interface" }
{ $subsection "ui-tools" }
2006-10-21 02:56:41 -04:00
{ $heading "Currently-loaded contributed modules" }
{ $outliner [ modules-help ] }
2006-06-12 03:21:08 -04:00
{ $heading "Index" }
{ $subsection "article-index" }
{ $subsection "primitive-index" }
2006-08-01 17:35:00 -04:00
{ $subsection "error-index" }
2006-06-12 03:21:08 -04:00
{ $subsection "type-index" }
2006-08-01 17:41:10 -04:00
{ $subsection "class-index" } ;
2006-06-12 03:21:08 -04:00
ARTICLE: "article-index" "Article index"
{ $outliner [ articles get hash-keys ] } ;
ARTICLE: "primitive-index" "Primitive index"
{ $outliner [ all-words [ primitive? ] subset ] } ;
2006-08-01 17:56:20 -04:00
ARTICLE: "error-index" "Error index"
2006-12-17 16:28:41 -05:00
{ $outliner [ all-errors ] } ;
2006-08-01 17:35:00 -04:00
2006-06-12 03:21:08 -04:00
ARTICLE: "type-index" "Type index"
{ $outliner [ builtins get [ ] subset ] } ;
ARTICLE: "class-index" "Class index"
{ $outliner [ classes ] } ;