113 lines
4.5 KiB
Plaintext
113 lines
4.5 KiB
Plaintext
USING: alien errors generic hashtables help inference tools
|
|
io-internals io libc math-internals modules namespaces parser
|
|
prettyprint queues sequences sequences-internals test words
|
|
kernel generic ;
|
|
|
|
ARTICLE: "handbook" "Factor documentation"
|
|
{ $subsection "changes" }
|
|
{ $heading "Survival guide" }
|
|
{ $list
|
|
{ "The basic unit of code, corresponding to a \"function\" in other languages, is called a " { $emphasis "word" } " in Factor." }
|
|
{ "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." }
|
|
{ "You can load source files with " { $link run-file } ":"
|
|
{ $code "\"my-program.factor\" run-file" } }
|
|
{ { "You can load modules from " { $snippet "apps/" } ", " { $snippet "libs/" } " or " { $snippet "demos/" } " with " { $link require } ":" }
|
|
{ $code "\"libs/httpd\" require" } }
|
|
{ { "Some modules have a defined main entry point, and can be run just like applications in an operating system:" }
|
|
{ $code "\"apps/tetris\" run-module" }
|
|
}
|
|
{ { $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" }
|
|
{ $subsection "cookbook-philosophy" }
|
|
{ $heading "Language reference" }
|
|
{ $subsection "conventions" }
|
|
{ $subsection "syntax" }
|
|
{ $subsection "dataflow" }
|
|
{ $subsection "words" }
|
|
{ $subsection "objects" }
|
|
{ $subsection "math" }
|
|
{ $subsection "collections" }
|
|
{ $subsection "streams" }
|
|
{ $subsection "parser" }
|
|
{ $subsection "prettyprint" }
|
|
{ $subsection "alien" }
|
|
{ $heading "Environment reference" }
|
|
{ $subsection "cli" }
|
|
{ $subsection "tools" }
|
|
{ $subsection "modules" }
|
|
{ $subsection "help" }
|
|
{ $subsection "inference" }
|
|
{ $subsection "compiler" }
|
|
{ $heading "Graphical user interface" }
|
|
{ $subsection "ui-tools" }
|
|
{ $heading "Currently-loaded contributed modules" }
|
|
{ $outliner [ modules-help ] }
|
|
{ $heading "Index" }
|
|
{ $subsection "article-index" }
|
|
{ $subsection "primitive-index" }
|
|
{ $subsection "error-index" }
|
|
{ $subsection "type-index" }
|
|
{ $subsection "class-index" } ;
|
|
|
|
ARTICLE: "article-index" "Article index"
|
|
{ $outliner [ articles get hash-keys ] } ;
|
|
|
|
ARTICLE: "primitive-index" "Primitive index"
|
|
{ $outliner [ all-words [ primitive? ] subset ] } ;
|
|
|
|
ARTICLE: "error-index" "Error index"
|
|
{ $subsection /0 }
|
|
{ $subsection alien-callback-error }
|
|
{ $subsection alien-invoke-error }
|
|
{ $subsection assert }
|
|
{ $subsection bad-escape }
|
|
{ $subsection bounds-error }
|
|
{ $subsection c-stream-error }
|
|
{ $subsection c-string-error. }
|
|
{ $subsection callstack-overflow. }
|
|
{ $subsection check-closed }
|
|
{ $subsection check-create }
|
|
{ $subsection check-method }
|
|
{ $subsection check-ptr }
|
|
{ $subsection check-tuple }
|
|
{ $subsection check-vocab }
|
|
{ $subsection condition }
|
|
{ $subsection datastack-overflow. }
|
|
{ $subsection datastack-underflow. }
|
|
{ $subsection empty-queue }
|
|
{ $subsection expired-error. }
|
|
{ $subsection ffi-error. }
|
|
{ $subsection heap-scan-error. }
|
|
{ $subsection inference-error }
|
|
{ $subsection io-error. }
|
|
{ $subsection negative-array-size-error. }
|
|
{ $subsection no-article }
|
|
{ $subsection no-cond }
|
|
{ $subsection no-math-method }
|
|
{ $subsection no-method }
|
|
{ $subsection parse-error }
|
|
{ $subsection retainstack-overflow. }
|
|
{ $subsection retainstack-underflow. }
|
|
{ $subsection signal-error. }
|
|
{ $subsection slice-error }
|
|
{ $subsection type-check-error. }
|
|
{ $subsection undefined-symbol-error. }
|
|
{ $subsection undefined-word-error. }
|
|
{ $subsection user-interrupt. } ;
|
|
|
|
ARTICLE: "type-index" "Type index"
|
|
{ $outliner [ builtins get [ ] subset ] } ;
|
|
|
|
ARTICLE: "class-index" "Class index"
|
|
{ $outliner [ classes ] } ;
|