diff --git a/core/bootstrap/boot-stage1.factor b/core/bootstrap/boot-stage1.factor index cbbf0aaa28..8c645d230e 100644 --- a/core/bootstrap/boot-stage1.factor +++ b/core/bootstrap/boot-stage1.factor @@ -21,6 +21,7 @@ prettyprint sequences vectors words ; "core/io/buffer" require "core/ui" require "core/ui/tools" require + "core/ui/handbook" require "core/compiler/" architecture get append require "core/handbook" require diff --git a/core/handbook/cookbook.facts b/core/handbook/cookbook.facts index acf7c0ddf4..7b53cff185 100644 --- a/core/handbook/cookbook.facts +++ b/core/handbook/cookbook.facts @@ -1,5 +1,29 @@ USING: help io kernel math namespaces parser prettyprint -sequences ; +sequences modules tools ; + +ARTICLE: "cookbook" "Factor cookbook" +{ $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" } "." } +} +{ $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" } ; ARTICLE: "cookbook-syntax" "Basic syntax cookbook" "The following is a simple snippet of Factor code:" diff --git a/core/handbook/handbook.facts b/core/handbook/handbook.facts index 4ea3ad256e..9ea0237ee6 100644 --- a/core/handbook/handbook.facts +++ b/core/handbook/handbook.facts @@ -5,30 +5,8 @@ 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" } +"If you are new to Factor, please read the cookbook first." +{ $subsection "cookbook" } { $heading "Language reference" } { $subsection "conventions" } { $subsection "syntax" } @@ -50,14 +28,15 @@ ARTICLE: "handbook" "Factor documentation" { $subsection "compiler" } { $heading "Graphical user interface" } { $subsection "ui-tools" } +{ $subsection "gadgets" } { $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" } ; +{ $subsection "class-index" } +{ $subsection "primitive-index" } ; ARTICLE: "article-index" "Article index" { $outliner [ articles get hash-keys ] } ; diff --git a/core/handbook/load.factor b/core/handbook/load.factor index e8f5914c36..361b93c6bb 100644 --- a/core/handbook/load.factor +++ b/core/handbook/load.factor @@ -22,6 +22,4 @@ PROVIDE: core/handbook "help.facts" "tools.facts" "words.facts" - "ui/tools.facts" - "ui/ui.facts" } } ; diff --git a/core/ui/gadgets/buttons.facts b/core/ui/gadgets/buttons.facts index b957bf6932..8ca38b2f8c 100644 --- a/core/ui/gadgets/buttons.facts +++ b/core/ui/gadgets/buttons.facts @@ -5,15 +5,6 @@ generic models ; HELP: button { $class-description "A button is a " { $link gadget } " which responds to mouse clicks by invoking a quotation." $terpri -"The following words construct buttons:" -{ $list - { $link