]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.vocabs absorbs some words from tools.browser and vocabs.loader
authorSlava Pestov <slava@factorcode.org>
Thu, 13 Mar 2008 00:55:06 +0000 (19:55 -0500)
committerSlava Pestov <slava@factorcode.org>
Thu, 13 Mar 2008 00:55:06 +0000 (19:55 -0500)
30 files changed:
core/vocabs/loader/loader-docs.factor
core/vocabs/loader/loader.factor
extra/benchmark/benchmark.factor
extra/bootstrap/tools/tools.factor
extra/editors/editors.factor
extra/help/handbook/handbook.factor
extra/help/lint/lint.factor [changed mode: 0644->0755]
extra/help/topics/topics.factor [changed mode: 0644->0755]
extra/io/unix/unix.factor
extra/io/windows/nt/nt.factor
extra/tools/browser/authors.txt [deleted file]
extra/tools/browser/browser-docs.factor [deleted file]
extra/tools/browser/browser-tests.factor [deleted file]
extra/tools/browser/browser.factor [deleted file]
extra/tools/browser/tags.txt [deleted file]
extra/tools/vocabs/browser/authors.txt [new file with mode: 0755]
extra/tools/vocabs/browser/browser-docs.factor [new file with mode: 0755]
extra/tools/vocabs/browser/browser-tests.factor [new file with mode: 0755]
extra/tools/vocabs/browser/browser.factor [new file with mode: 0755]
extra/tools/vocabs/browser/tags.txt [new file with mode: 0644]
extra/tools/vocabs/monitor/authors.txt [new file with mode: 0644]
extra/tools/vocabs/monitor/monitor.factor [new file with mode: 0755]
extra/tools/vocabs/monitor/summary.txt [new file with mode: 0644]
extra/tools/vocabs/vocabs-docs.factor [new file with mode: 0755]
extra/tools/vocabs/vocabs.factor [new file with mode: 0755]
extra/ui/tools/operations/operations.factor
extra/ui/tools/search/search.factor
extra/vocabs/monitor/authors.txt [deleted file]
extra/vocabs/monitor/monitor.factor [deleted file]
extra/vocabs/monitor/summary.txt [deleted file]

index 9f7b2b5b9f5438d3720862e51538dcf9e961e8dc..886e678330909fc2049b7449f25ab7f438e40f01 100755 (executable)
@@ -23,9 +23,6 @@ $nl
 "Application vocabularies can define a main entry point, giving the user a convenient way to run the application:"
 { $subsection POSTPONE: MAIN: }
 { $subsection run }
-"Reloading source files changed on disk:"
-{ $subsection refresh }
-{ $subsection refresh-all }
 { $see-also "vocabularies" "parser-files" "source-files" } ;
 
 ABOUT: "vocabs.loader"
@@ -80,7 +77,7 @@ HELP: reload
 HELP: require
 { $values { "vocab" "a vocabulary specifier" } }
 { $description "Loads a vocabulary if it has not already been loaded." }
-{ $notes "To unconditionally reload a vocabulary, use " { $link reload } ". To reload changed source files, use " { $link refresh } " or " { $link refresh-all } "." } ;
+{ $notes "To unconditionally reload a vocabulary, use " { $link reload } ". To reload changed source files only, use the words in " { $link "tools.vocabs" } "." } ;
 
 HELP: run
 { $values { "vocab" "a vocabulary specifier" } }
@@ -93,12 +90,3 @@ HELP: vocab-source-path
 HELP: vocab-docs-path
 { $values { "vocab" "a vocabulary specifier" } { "path/f" "a pathname string or " { $link f } } }
 { $description "Outputs a pathname where the documentation for " { $snippet "vocab" } " might be found. Outputs " { $link f } " if the vocabulary does not have a directory on disk." } ;
-
-HELP: refresh
-{ $values { "prefix" string } }
-{ $description "Reloads source files and documentation belonging to loaded vocabularies whose names are prefixed by " { $snippet "prefix" } " which have been modified on disk." } ;
-
-HELP: refresh-all
-{ $description "Reloads source files and documentation for all loaded vocabularies which have been modified on disk." } ;
-
-{ refresh refresh-all } related-words
index 885bccddd156e61a374f4fb94b04c25d79e68463..430aa066a819b845f0f620213695473f7250ddcc 100755 (executable)
@@ -119,68 +119,7 @@ SYMBOL: load-help?
         "To define one, refer to \\ MAIN: help" print
     ] ?if ;
 
-: modified ( seq quot -- seq )
-    [ dup ] swap compose { } map>assoc
-    [ nip ] assoc-subset
-    [ nip source-modified? ] assoc-subset keys ; inline
-
-: modified-sources ( vocabs -- seq )
-    [ vocab-source-path ] modified ;
-
-: modified-docs ( vocabs -- seq )
-    [ vocab-docs-path ] modified ;
-
-: update-roots ( vocabs -- )
-    [ dup find-vocab-root swap vocab set-vocab-root ] each ;
-
-: to-refresh ( prefix -- modified-sources modified-docs )
-    child-vocabs
-    dup update-roots
-    dup modified-sources swap modified-docs ;
-
-: vocab-heading. ( vocab -- )
-    nl
-    "==== " write
-    dup vocab-name swap vocab write-object ":" print
-    nl ;
-
-: load-error. ( triple -- )
-    dup first vocab-heading.
-    dup second print-error
-    drop ;
-
-: load-failures. ( failures -- )
-    [ load-error. nl ] each ;
-
 SYMBOL: blacklist
-SYMBOL: failures
-
-: require-all ( vocabs -- failures )
-    [
-        V{ } clone blacklist set
-        V{ } clone failures set
-        [
-            [ require ]
-            [ swap vocab-name failures get set-at ]
-            recover
-        ] each
-        failures get
-    ] with-compiler-errors ;
-
-: do-refresh ( modified-sources modified-docs -- )
-    2dup
-    [ f swap set-vocab-docs-loaded? ] each
-    [ f swap set-vocab-source-loaded? ] each
-    append prune require-all load-failures. ;
-
-: refresh ( prefix -- ) to-refresh do-refresh ;
-
-SYMBOL: sources-changed?
-
-[ t sources-changed? set-global ] "vocabs.loader" add-init-hook
-
-: refresh-all ( -- )
-    "" refresh f sources-changed? set-global ;
 
 GENERIC: (load-vocab) ( name -- vocab )
 
index 231c6edf50a542e3de72d03d9f7847c9f07d8237..7eb5f10276d5655ca14f59b4378a2a6da0580904 100755 (executable)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel vocabs vocabs.loader tools.time tools.browser
+USING: kernel vocabs vocabs.loader tools.time tools.vocabs
 arrays assocs io.styles io help.markup prettyprint sequences
 continuations debugger ;
 IN: benchmark
index 718f73308cdb4ea948692b2974fb72e0e79b037c..f395a903c3173e185119c7c3c42b2615434ea768 100755 (executable)
@@ -11,5 +11,6 @@ USING: vocabs.loader sequences ;
     "tools.test"
     "tools.time"
     "tools.threads"
+    "tools.vocabs"
     "editors"
 } [ require ] each
index 3b65466225dde5d7682682c14b44087be2701bb6..bb3fd0540026cc13eb205e3a4ff255b26291c5b4 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2005, 2007 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: parser kernel namespaces sequences definitions io.files
-inspector continuations tuples tools.crossref tools.browser 
+inspector continuations tuples tools.crossref tools.vocabs 
 io prettyprint source-files assocs vocabs vocabs.loader ;
 IN: editors
 
index d77cc9268d80404393eb8d9da8583c6a3d128e2c..1310b581338f470e7933825044a485100d52f1f2 100755 (executable)
@@ -196,6 +196,7 @@ ARTICLE: "io" "Input and output"
 { $subsection "io.timeouts" } ;
 
 ARTICLE: "tools" "Developer tools"
+{ $subsection "tools.vocabs" }
 "Exploratory tools:"
 { $subsection "editor" }
 { $subsection "tools.crossref" }
old mode 100644 (file)
new mode 100755 (executable)
index 22a1945..d8a4f83
@@ -1,7 +1,7 @@
 ! Copyright (C) 2006, 2007 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: sequences parser kernel help help.markup help.topics
-words strings classes tools.browser namespaces io
+words strings classes tools.vocabs namespaces io
 io.streams.string prettyprint definitions arrays vectors
 combinators splitting debugger hashtables sorting effects vocabs
 vocabs.loader assocs editors continuations classes.predicate
old mode 100644 (file)
new mode 100755 (executable)
index c5abc19..4a86d49
@@ -7,6 +7,10 @@ IN: help.topics
 
 TUPLE: link name ;
 
+MIXIN: topic
+INSTANCE: link topic
+INSTANCE: word topic
+
 GENERIC: >link ( obj -- obj )
 M: link >link ;
 M: vocab-spec >link ;
index 64e2cc3c3d859f01626dc54e0141a85b8eae378e..01e29866ebdaeb768a07083ce7c11d5a7a94c9e2 100755 (executable)
@@ -4,4 +4,4 @@ combinators namespaces system vocabs.loader sequences ;
 
 "io.unix." os append require
 
-"vocabs.monitor" require
+"tools.vocabs.monitor" require
index 9bc587e00e7513a2f40154ed29376844548a9864..319acc35f8b1c77c029eb7f41831bce67243c014 100755 (executable)
@@ -14,4 +14,4 @@ USE: io.backend
 
 T{ windows-nt-io } set-io-backend
 
-"vocabs.monitor" require
+"tools.vocabs.monitor" require
diff --git a/extra/tools/browser/authors.txt b/extra/tools/browser/authors.txt
deleted file mode 100755 (executable)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/extra/tools/browser/browser-docs.factor b/extra/tools/browser/browser-docs.factor
deleted file mode 100755 (executable)
index 28bef58..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-USING: help.markup help.syntax io strings ;
-IN: tools.browser
-
-ARTICLE: "vocab-index" "Vocabulary index"
-{ $tags }
-{ $authors }
-{ $describe-vocab "" } ;
-
-ARTICLE: "tools.browser" "Vocabulary browser"
-"Getting and setting vocabulary meta-data:"
-{ $subsection vocab-file-contents }
-{ $subsection set-vocab-file-contents }
-{ $subsection vocab-summary }
-{ $subsection set-vocab-summary }
-{ $subsection vocab-tags }
-{ $subsection set-vocab-tags }
-{ $subsection add-vocab-tags }
-"Global meta-data:"
-{ $subsection all-vocabs }
-{ $subsection all-vocabs-seq }
-{ $subsection all-tags }
-{ $subsection all-authors }
-"Because loading the above data is expensive, it is cached. The cache is flushed by the " { $vocab-link "vocabs.monitor" } " vocabulary. It can also be flushed manually when file system change monitors are not available:"
-{ $subsection reset-cache } ;
-
-HELP: vocab-file-contents
-{ $values { "vocab" "a vocabulary specifier" } { "name" string } { "seq" "a sequence of lines, or " { $link f } } }
-{ $description "Outputs the contents of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;
-
-HELP: set-vocab-file-contents
-{ $values { "seq" "a sequence of lines" } { "vocab" "a vocabulary specifier" } { "name" string } }
-{ $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ;
-
-HELP: vocab-summary
-{ $values { "vocab" "a vocabulary specifier" } { "summary" "a string or " { $link f } } }
-{ $description "Outputs a one-line string description of the vocabulary's intended purpose from the " { $snippet "summary.txt" } " file in the vocabulary's directory. Outputs " { $link f } " if the file does not exist." } ;
-
-HELP: set-vocab-summary
-{ $values { "string" "a string or " { $link f } } { "vocab" "a vocabulary specifier" } }
-{ $description "Stores a one-line string description of the vocabulary to the " { $snippet "summary.txt" } " file in the vocabulary's directory." } ;
-
-HELP: vocab-tags
-{ $values { "vocab" "a vocabulary specifier" } { "tags" "a sequence of strings" } }
-{ $description "Outputs a list of short tags classifying the vocabulary from the " { $snippet "tags.txt" } " file in the vocabulary's directory. Outputs " { $link f } " if the file does not exist." } ;
-
-HELP: set-vocab-tags
-{ $values { "tags" "a sequence of strings" } { "vocab" "a vocabulary specifier" } }
-{ $description "Stores a list of short tags classifying the vocabulary to the " { $snippet "tags.txt" } " file in the vocabulary's directory." } ;
-
-HELP: all-vocabs
-{ $values { "assoc" "an association list mapping vocabulary roots to sequences of vocabulary specifiers" } }
-{ $description "Outputs an association list of all vocabularies which have been loaded or are available for loading." } ;
diff --git a/extra/tools/browser/browser-tests.factor b/extra/tools/browser/browser-tests.factor
deleted file mode 100755 (executable)
index 38d9ae6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-IN: tools.browser.tests
-USING: tools.browser tools.test help.markup ;
-
-[ ] [ { $describe-vocab "scratchpad" } print-content ] unit-test
diff --git a/extra/tools/browser/browser.factor b/extra/tools/browser/browser.factor
deleted file mode 100755 (executable)
index c189a6f..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-! Copyright (C) 2007, 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: namespaces splitting sequences io.files kernel assocs
-words vocabs vocabs.loader definitions parser continuations
-inspector debugger io io.styles hashtables
-sorting prettyprint source-files arrays combinators strings
-system math.parser help.markup help.topics help.syntax
-help.stylesheet memoize io.encodings.utf8 ;
-IN: tools.browser
-
-MEMO: (vocab-file-contents) ( path -- lines )
-    ?resource-path dup exists?
-    [ utf8 file-lines ] [ drop f ] if ;
-
-: vocab-file-contents ( vocab name -- seq )
-    vocab-path+ dup [ (vocab-file-contents) ] when ;
-
-: set-vocab-file-contents ( seq vocab name -- )
-    dupd vocab-path+ [
-        ?resource-path utf8 set-file-lines
-    ] [
-        "The " swap vocab-name
-        " vocabulary was not loaded from the file system"
-        3append throw
-    ] ?if ;
-
-: vocab-summary-path ( vocab -- string )
-    vocab-dir "summary.txt" path+ ;
-
-: vocab-summary ( vocab -- summary )
-    dup dup vocab-summary-path vocab-file-contents
-    dup empty? [
-        drop vocab-name " vocabulary" append
-    ] [
-        nip first
-    ] if ;
-
-M: vocab summary
-    [
-        dup vocab-summary %
-        " (" %
-        vocab-words assoc-size #
-        " words)" %
-    ] "" make ;
-
-M: vocab-link summary vocab-summary ;
-
-: set-vocab-summary ( string vocab -- )
-    >r 1array r>
-    dup vocab-summary-path
-    set-vocab-file-contents ;
-
-: vocab-tags-path ( vocab -- string )
-    vocab-dir "tags.txt" path+ ;
-
-: vocab-tags ( vocab -- tags )
-    dup vocab-tags-path vocab-file-contents ;
-
-: set-vocab-tags ( tags vocab -- )
-    dup vocab-tags-path set-vocab-file-contents ;
-
-: add-vocab-tags ( tags vocab -- )
-    [ vocab-tags append prune ] keep set-vocab-tags ;
-
-: vocab-authors-path ( vocab -- string )
-    vocab-dir "authors.txt" path+ ;
-
-: vocab-authors ( vocab -- authors )
-    dup vocab-authors-path vocab-file-contents ;
-
-: set-vocab-authors ( authors vocab -- )
-    dup vocab-authors-path set-vocab-file-contents ;
-
-: subdirs ( dir -- dirs )
-    directory [ second ] subset keys natural-sort ;
-
-: (all-child-vocabs) ( root name -- vocabs )
-    [ vocab-dir path+ ?resource-path subdirs ] keep
-    dup empty? [
-        drop
-    ] [
-        swap [ "." swap 3append ] with map
-    ] if ;
-
-: vocabs-in-dir ( root name -- )
-    dupd (all-child-vocabs) [
-        2dup vocab-dir? [ 2dup swap >vocab-link , ] when
-        vocabs-in-dir
-    ] with each ;
-
-: all-vocabs ( -- assoc )
-    vocab-roots get [
-        dup [ "" vocabs-in-dir ] { } make
-    ] { } map>assoc ;
-
-MEMO: all-vocabs-seq ( -- seq )
-    all-vocabs values concat ;
-
-: dangerous? ( name -- ? )
-    #! Hack
-    {
-        { [ "cpu." ?head ] [ t ] }
-        { [ "io.unix" ?head ] [ t ] }
-        { [ "io.windows" ?head ] [ t ] }
-        { [ "ui.x11" ?head ] [ t ] }
-        { [ "ui.windows" ?head ] [ t ] }
-        { [ "ui.cocoa" ?head ] [ t ] }
-        { [ "cocoa" ?head ] [ t ] }
-        { [ "core-foundation" ?head ] [ t ] }
-        { [ "vocabs.loader.test" ?head ] [ t ] }
-        { [ "editors." ?head ] [ t ] }
-        { [ ".windows" ?tail ] [ t ] }
-        { [ ".unix" ?tail ] [ t ] }
-        { [ "unix." ?head ] [ t ] }
-        { [ ".linux" ?tail ] [ t ] }
-        { [ ".bsd" ?tail ] [ t ] }
-        { [ ".macosx" ?tail ] [ t ] }
-        { [ "windows." ?head ] [ t ] }
-        { [ "cocoa" ?head ] [ t ] }
-        { [ ".test" ?tail ] [ t ] }
-        { [ "raptor" ?head ] [ t ] }
-        { [ dup "tools.deploy.app" = ] [ t ] }
-        { [ t ] [ f ] }
-    } cond nip ;
-
-: filter-dangerous ( seq -- seq' )
-    [ vocab-name dangerous? not ] subset ;
-
-: try-everything ( -- failures )
-    all-vocabs-seq
-    filter-dangerous
-    require-all ;
-
-: load-everything ( -- )
-    try-everything load-failures. ;
-
-: unrooted-child-vocabs ( prefix -- seq )
-    dup empty? [ CHAR: . add ] unless
-    vocabs
-    [ vocab-root not ] subset
-    [
-        vocab-name swap ?head CHAR: . rot member? not and
-    ] with subset
-    [ vocab ] map ;
-
-: all-child-vocabs ( prefix -- assoc )
-    vocab-roots get [
-        over dupd dupd (all-child-vocabs)
-        swap [ >vocab-link ] curry map
-    ] { } map>assoc
-    f rot unrooted-child-vocabs 2array add ;
-
-: load-children ( prefix -- )
-    all-child-vocabs values concat
-    filter-dangerous
-    require-all
-    load-failures. ;
-
-: vocab-status-string ( vocab -- string )
-    {
-        { [ dup not ] [ drop "" ] }
-        { [ dup vocab-main ] [ drop "[Runnable]" ] }
-        { [ t ] [ drop "[Loaded]" ] }
-    } cond ;
-
-: write-status ( vocab -- )
-    vocab vocab-status-string write ;
-
-: vocab. ( vocab -- )
-    [
-        dup [ write-status ] with-cell
-        dup [ ($link) ] with-cell
-        [ vocab-summary write ] with-cell
-    ] with-row ;
-
-: vocab-headings. ( -- )
-    [
-        [ "State" write ] with-cell
-        [ "Vocabulary" write ] with-cell
-        [ "Summary" write ] with-cell
-    ] with-row ;
-
-: root-heading. ( root -- )
-    [ "Children from " swap append ] [ "Children" ] if*
-    $heading ;
-
-: vocabs. ( assoc -- )
-    [
-        dup empty? [
-            2drop
-        ] [
-            swap root-heading.
-            standard-table-style [
-                vocab-headings. [ vocab. ] each
-            ] ($grid)
-        ] if
-    ] assoc-each ;
-
-: describe-summary ( vocab -- )
-    vocab-summary [
-        "Summary" $heading print-element
-    ] when* ;
-
-TUPLE: vocab-tag name ;
-
-C: <vocab-tag> vocab-tag
-
-: tags. ( seq -- ) [ <vocab-tag> ] map $links ;
-
-: describe-tags ( vocab -- )
-    vocab-tags f like [
-        "Tags" $heading tags.
-    ] when* ;
-
-TUPLE: vocab-author name ;
-
-C: <vocab-author> vocab-author
-
-: authors. ( seq -- ) [ <vocab-author> ] map $links ;
-
-: describe-authors ( vocab -- )
-    vocab-authors f like [
-        "Authors" $heading authors.
-    ] when* ;
-
-: describe-help ( vocab -- )
-    vocab-help [
-        "Documentation" $heading nl ($link)
-    ] when* ;
-
-: describe-children ( vocab -- )
-    vocab-name all-child-vocabs vocabs. ;
-
-: describe-files ( vocab -- )
-    vocab-files [ <pathname> ] map [
-        "Files" $heading
-        [
-            snippet-style get [
-                code-style get [
-                    stack.
-                ] with-nesting
-            ] with-style
-        ] ($block)
-    ] when* ;
-
-: describe-words ( vocab -- )
-    words dup empty? [
-        "Words" $heading
-        dup natural-sort $links
-    ] unless drop ;
-
-: map>set ( seq quot -- )
-    map concat prune natural-sort ; inline
-
-: vocab-xref ( vocab quot -- vocabs )
-    >r dup vocab-name swap words r> map
-    [ [ word? ] subset [ word-vocabulary ] map ] map>set
-    remove [ ] subset [ vocab ] map ; inline
-
-: vocab-uses ( vocab -- vocabs ) [ uses ] vocab-xref ;
-
-: vocab-usage ( vocab -- vocabs ) [ usage ] vocab-xref ;
-
-: describe-uses ( vocab -- )
-    vocab-uses dup empty? [
-        "Uses" $heading
-        dup $links
-    ] unless drop ;
-
-: describe-usage ( vocab -- )
-    vocab-usage dup empty? [
-        "Used by" $heading
-        dup $links
-    ] unless drop ;
-
-: $describe-vocab ( element -- )
-    first
-    dup describe-children
-    dup vocab-root over vocab-dir? [
-        dup describe-summary
-        dup describe-tags
-        dup describe-authors
-        dup describe-files
-    ] when
-    dup vocab [
-        dup describe-help
-        dup describe-words
-        dup describe-uses
-        dup describe-usage
-    ] when drop ;
-
-: keyed-vocabs ( str quot -- seq )
-    all-vocabs [
-        swap >r
-        [ >r 2dup r> swap call member? ] subset
-        r> swap
-    ] assoc-map 2nip ; inline
-
-: tagged ( tag -- assoc )
-    [ vocab-tags ] keyed-vocabs ;
-
-: authored ( author -- assoc )
-    [ vocab-authors ] keyed-vocabs ;
-
-: $tagged-vocabs ( element -- )
-    first tagged vocabs. ;
-
-MEMO: all-tags ( -- seq )
-    all-vocabs-seq [ vocab-tags ] map>set ;
-
-: $authored-vocabs ( element -- )
-    first authored vocabs. ;
-
-MEMO: all-authors ( -- seq )
-    all-vocabs-seq [ vocab-authors ] map>set ;
-
-: $tags ( element -- )
-    drop "Tags" $heading all-tags tags. ;
-
-: $authors ( element -- )
-    drop "Authors" $heading all-authors authors. ;
-
-M: vocab-spec article-title vocab-name " vocabulary" append ;
-
-M: vocab-spec article-name vocab-name ;
-
-M: vocab-spec article-content
-    vocab-name \ $describe-vocab swap 2array ;
-
-M: vocab-spec article-parent drop "vocab-index" ;
-
-M: vocab-tag >link ;
-
-M: vocab-tag article-title
-    vocab-tag-name "Vocabularies tagged ``" swap "''" 3append ;
-
-M: vocab-tag article-name vocab-tag-name ;
-
-M: vocab-tag article-content
-    \ $tagged-vocabs swap vocab-tag-name 2array ;
-
-M: vocab-tag article-parent drop "vocab-index" ;
-
-M: vocab-tag summary article-title ;
-
-M: vocab-author >link ;
-
-M: vocab-author article-title
-    vocab-author-name "Vocabularies by " swap append ;
-
-M: vocab-author article-name vocab-author-name ;
-
-M: vocab-author article-content
-    \ $authored-vocabs swap vocab-author-name 2array ;
-
-M: vocab-author article-parent drop "vocab-index" ;
-
-M: vocab-author summary article-title ;
-
-: reset-cache ( -- )
-    \ (vocab-file-contents) reset-memoized
-    \ all-vocabs-seq reset-memoized
-    \ all-authors reset-memoized
-    \ all-tags reset-memoized ;
diff --git a/extra/tools/browser/tags.txt b/extra/tools/browser/tags.txt
deleted file mode 100644 (file)
index ef1aab0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tools
diff --git a/extra/tools/vocabs/browser/authors.txt b/extra/tools/vocabs/browser/authors.txt
new file mode 100755 (executable)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/extra/tools/vocabs/browser/browser-docs.factor b/extra/tools/vocabs/browser/browser-docs.factor
new file mode 100755 (executable)
index 0000000..3765efb
--- /dev/null
@@ -0,0 +1,7 @@
+USING: help.markup help.syntax io strings ;
+IN: tools.vocabs.browser
+
+ARTICLE: "vocab-index" "Vocabulary index"
+{ $tags }
+{ $authors }
+{ $describe-vocab "" } ;
diff --git a/extra/tools/vocabs/browser/browser-tests.factor b/extra/tools/vocabs/browser/browser-tests.factor
new file mode 100755 (executable)
index 0000000..7e12a56
--- /dev/null
@@ -0,0 +1,4 @@
+IN: tools.vocabs.browser.tests
+USING: tools.vocabs.browser tools.test help.markup ;
+
+[ ] [ { $describe-vocab "scratchpad" } print-content ] unit-test
diff --git a/extra/tools/vocabs/browser/browser.factor b/extra/tools/vocabs/browser/browser.factor
new file mode 100755 (executable)
index 0000000..2c66305
--- /dev/null
@@ -0,0 +1,207 @@
+! Copyright (C) 2007, 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel combinators vocabs vocabs.loader tools.vocabs io
+io.files io.styles help.markup help.stylesheet sequences assocs
+help.topics namespaces prettyprint words sorting definitions
+arrays inspector ;
+IN: tools.vocabs.browser
+
+: vocab-status-string ( vocab -- string )
+    {
+        { [ dup not ] [ drop "" ] }
+        { [ dup vocab-main ] [ drop "[Runnable]" ] }
+        { [ t ] [ drop "[Loaded]" ] }
+    } cond ;
+
+: write-status ( vocab -- )
+    vocab vocab-status-string write ;
+
+: vocab. ( vocab -- )
+    [
+        dup [ write-status ] with-cell
+        dup [ ($link) ] with-cell
+        [ vocab-summary write ] with-cell
+    ] with-row ;
+
+: vocab-headings. ( -- )
+    [
+        [ "State" write ] with-cell
+        [ "Vocabulary" write ] with-cell
+        [ "Summary" write ] with-cell
+    ] with-row ;
+
+: root-heading. ( root -- )
+    [ "Children from " swap append ] [ "Children" ] if*
+    $heading ;
+
+: vocabs. ( assoc -- )
+    [
+        dup empty? [
+            2drop
+        ] [
+            swap root-heading.
+            standard-table-style [
+                vocab-headings. [ vocab. ] each
+            ] ($grid)
+        ] if
+    ] assoc-each ;
+
+: describe-summary ( vocab -- )
+    vocab-summary [
+        "Summary" $heading print-element
+    ] when* ;
+
+TUPLE: vocab-tag name ;
+
+INSTANCE: vocab-tag topic
+
+C: <vocab-tag> vocab-tag
+
+: tags. ( seq -- ) [ <vocab-tag> ] map $links ;
+
+: describe-tags ( vocab -- )
+    vocab-tags f like [
+        "Tags" $heading tags.
+    ] when* ;
+
+TUPLE: vocab-author name ;
+
+INSTANCE: vocab-author topic
+
+C: <vocab-author> vocab-author
+
+: authors. ( seq -- ) [ <vocab-author> ] map $links ;
+
+: describe-authors ( vocab -- )
+    vocab-authors f like [
+        "Authors" $heading authors.
+    ] when* ;
+
+: describe-help ( vocab -- )
+    vocab-help [
+        "Documentation" $heading nl ($link)
+    ] when* ;
+
+: describe-children ( vocab -- )
+    vocab-name all-child-vocabs vocabs. ;
+
+: describe-files ( vocab -- )
+    vocab-files [ <pathname> ] map [
+        "Files" $heading
+        [
+            snippet-style get [
+                code-style get [
+                    stack.
+                ] with-nesting
+            ] with-style
+        ] ($block)
+    ] when* ;
+
+: describe-words ( vocab -- )
+    words dup empty? [
+        "Words" $heading
+        dup natural-sort $links
+    ] unless drop ;
+
+: vocab-xref ( vocab quot -- vocabs )
+    >r dup vocab-name swap words r> map
+    [ [ word? ] subset [ word-vocabulary ] map ] map>set
+    remove [ ] subset [ vocab ] map ; inline
+
+: vocab-uses ( vocab -- vocabs ) [ uses ] vocab-xref ;
+
+: vocab-usage ( vocab -- vocabs ) [ usage ] vocab-xref ;
+
+: describe-uses ( vocab -- )
+    vocab-uses dup empty? [
+        "Uses" $heading
+        dup $links
+    ] unless drop ;
+
+: describe-usage ( vocab -- )
+    vocab-usage dup empty? [
+        "Used by" $heading
+        dup $links
+    ] unless drop ;
+
+: $describe-vocab ( element -- )
+    first
+    dup describe-children
+    dup vocab-root over vocab-dir? [
+        dup describe-summary
+        dup describe-tags
+        dup describe-authors
+        dup describe-files
+    ] when
+    dup vocab [
+        dup describe-help
+        dup describe-words
+        dup describe-uses
+        dup describe-usage
+    ] when drop ;
+
+: keyed-vocabs ( str quot -- seq )
+    all-vocabs [
+        swap >r
+        [ >r 2dup r> swap call member? ] subset
+        r> swap
+    ] assoc-map 2nip ; inline
+
+: tagged ( tag -- assoc )
+    [ vocab-tags ] keyed-vocabs ;
+
+: authored ( author -- assoc )
+    [ vocab-authors ] keyed-vocabs ;
+
+: $tagged-vocabs ( element -- )
+    first tagged vocabs. ;
+
+: $authored-vocabs ( element -- )
+    first authored vocabs. ;
+
+: $tags ( element -- )
+    drop "Tags" $heading all-tags tags. ;
+
+: $authors ( element -- )
+    drop "Authors" $heading all-authors authors. ;
+
+INSTANCE: vocab topic
+
+INSTANCE: vocab-link topic
+
+M: vocab-spec article-title vocab-name " vocabulary" append ;
+
+M: vocab-spec article-name vocab-name ;
+
+M: vocab-spec article-content
+    vocab-name \ $describe-vocab swap 2array ;
+
+M: vocab-spec article-parent drop "vocab-index" ;
+
+M: vocab-tag >link ;
+
+M: vocab-tag article-title
+    vocab-tag-name "Vocabularies tagged ``" swap "''" 3append ;
+
+M: vocab-tag article-name vocab-tag-name ;
+
+M: vocab-tag article-content
+    \ $tagged-vocabs swap vocab-tag-name 2array ;
+
+M: vocab-tag article-parent drop "vocab-index" ;
+
+M: vocab-tag summary article-title ;
+
+M: vocab-author >link ;
+
+M: vocab-author article-title
+    vocab-author-name "Vocabularies by " swap append ;
+
+M: vocab-author article-name vocab-author-name ;
+
+M: vocab-author article-content
+    \ $authored-vocabs swap vocab-author-name 2array ;
+
+M: vocab-author article-parent drop "vocab-index" ;
+
+M: vocab-author summary article-title ;
diff --git a/extra/tools/vocabs/browser/tags.txt b/extra/tools/vocabs/browser/tags.txt
new file mode 100644 (file)
index 0000000..ef1aab0
--- /dev/null
@@ -0,0 +1 @@
+tools
diff --git a/extra/tools/vocabs/monitor/authors.txt b/extra/tools/vocabs/monitor/authors.txt
new file mode 100644 (file)
index 0000000..1901f27
--- /dev/null
@@ -0,0 +1 @@
+Slava Pestov
diff --git a/extra/tools/vocabs/monitor/monitor.factor b/extra/tools/vocabs/monitor/monitor.factor
new file mode 100755 (executable)
index 0000000..071f179
--- /dev/null
@@ -0,0 +1,24 @@
+! Copyright (C) 2008 Slava Pestov.\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: threads io.files io.monitors init kernel\r
+vocabs.loader tools.vocabs namespaces continuations ;\r
+IN: tools.vocabs.monitor\r
+\r
+! Use file system change monitoring to flush the tags/authors\r
+! cache\r
+SYMBOL: vocab-monitor\r
+\r
+: monitor-thread ( -- )\r
+    vocab-monitor get-global\r
+    next-change 2drop\r
+    t sources-changed? set-global reset-cache ;\r
+\r
+: start-monitor-thread\r
+    #! Silently ignore errors during monitor creation since\r
+    #! monitors are not supported on all platforms.\r
+    [\r
+        "" resource-path t <monitor> vocab-monitor set-global\r
+        [ monitor-thread t ] "Vocabulary monitor" spawn-server drop\r
+    ] ignore-errors ;\r
+\r
+[ start-monitor-thread ] "tools.vocabs.monitor" add-init-hook\r
diff --git a/extra/tools/vocabs/monitor/summary.txt b/extra/tools/vocabs/monitor/summary.txt
new file mode 100644 (file)
index 0000000..27c0d38
--- /dev/null
@@ -0,0 +1 @@
+Use io.monitors to clear tools.browser authors/tags/summary cache
diff --git a/extra/tools/vocabs/vocabs-docs.factor b/extra/tools/vocabs/vocabs-docs.factor
new file mode 100755 (executable)
index 0000000..bdc3954
--- /dev/null
@@ -0,0 +1,63 @@
+USING: help.markup help.syntax strings ;\r
+IN: tools.vocabs\r
+\r
+ARTICLE: "tools.vocabs" "Vocabulary tools"\r
+"Reloading source files changed on disk:"\r
+{ $subsection refresh }\r
+{ $subsection refresh-all }\r
+"Vocabulary summaries:"\r
+{ $subsection vocab-summary }\r
+{ $subsection set-vocab-summary }\r
+"Vocabulary tags:"\r
+{ $subsection vocab-tags }\r
+{ $subsection set-vocab-tags }\r
+{ $subsection add-vocab-tags }\r
+"Getting and setting vocabulary meta-data:"\r
+{ $subsection vocab-file-contents }\r
+{ $subsection set-vocab-file-contents }\r
+"Global meta-data:"\r
+{ $subsection all-vocabs }\r
+{ $subsection all-vocabs-seq }\r
+{ $subsection all-tags }\r
+{ $subsection all-authors }\r
+"Because loading the above data is expensive, it is cached. The cache is flushed by the " { $vocab-link "tools.vocabs.monitor" } " vocabulary. It can also be flushed manually when file system change monitors are not available:"\r
+{ $subsection reset-cache } ;\r
+\r
+ABOUT: "tools.vocabs"\r
+\r
+HELP: refresh\r
+{ $values { "prefix" string } }\r
+{ $description "Reloads source files and documentation belonging to loaded vocabularies whose names are prefixed by " { $snippet "prefix" } " which have been modified on disk." } ;\r
+\r
+HELP: refresh-all\r
+{ $description "Reloads source files and documentation for all loaded vocabularies which have been modified on disk." } ;\r
+\r
+{ refresh refresh-all } related-words\r
+\r
+HELP: vocab-file-contents\r
+{ $values { "vocab" "a vocabulary specifier" } { "name" string } { "seq" "a sequence of lines, or " { $link f } } }\r
+{ $description "Outputs the contents of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;\r
+\r
+HELP: set-vocab-file-contents\r
+{ $values { "seq" "a sequence of lines" } { "vocab" "a vocabulary specifier" } { "name" string } }\r
+{ $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ;\r
+\r
+HELP: vocab-summary\r
+{ $values { "vocab" "a vocabulary specifier" } { "summary" "a string or " { $link f } } }\r
+{ $description "Outputs a one-line string description of the vocabulary's intended purpose from the " { $snippet "summary.txt" } " file in the vocabulary's directory. Outputs " { $link f } " if the file does not exist." } ;\r
+\r
+HELP: set-vocab-summary\r
+{ $values { "string" "a string or " { $link f } } { "vocab" "a vocabulary specifier" } }\r
+{ $description "Stores a one-line string description of the vocabulary to the " { $snippet "summary.txt" } " file in the vocabulary's directory." } ;\r
+\r
+HELP: vocab-tags\r
+{ $values { "vocab" "a vocabulary specifier" } { "tags" "a sequence of strings" } }\r
+{ $description "Outputs a list of short tags classifying the vocabulary from the " { $snippet "tags.txt" } " file in the vocabulary's directory. Outputs " { $link f } " if the file does not exist." } ;\r
+\r
+HELP: set-vocab-tags\r
+{ $values { "tags" "a sequence of strings" } { "vocab" "a vocabulary specifier" } }\r
+{ $description "Stores a list of short tags classifying the vocabulary to the " { $snippet "tags.txt" } " file in the vocabulary's directory." } ;\r
+\r
+HELP: all-vocabs\r
+{ $values { "assoc" "an association list mapping vocabulary roots to sequences of vocabulary specifiers" } }\r
+{ $description "Outputs an association list of all vocabularies which have been loaded or are available for loading." } ;\r
diff --git a/extra/tools/vocabs/vocabs.factor b/extra/tools/vocabs/vocabs.factor
new file mode 100755 (executable)
index 0000000..ba6baa5
--- /dev/null
@@ -0,0 +1,232 @@
+! Copyright (C) 2007, 2008 Slava Pestov.\r
+! See http://factorcode.org/license.txt for BSD license.\r
+USING: io.files kernel io.encodings.utf8 vocabs.loader vocabs\r
+sequences namespaces math.parser arrays hashtables assocs\r
+memoize inspector sorting splitting combinators source-files\r
+io debugger continuations compiler.errors init ;\r
+IN: tools.vocabs\r
+\r
+: modified ( seq quot -- seq )\r
+    [ dup ] swap compose { } map>assoc\r
+    [ nip ] assoc-subset\r
+    [ nip source-modified? ] assoc-subset keys ; inline\r
+\r
+: modified-sources ( vocabs -- seq )\r
+    [ vocab-source-path ] modified ;\r
+\r
+: modified-docs ( vocabs -- seq )\r
+    [ vocab-docs-path ] modified ;\r
+\r
+: update-roots ( vocabs -- )\r
+    [ dup find-vocab-root swap vocab set-vocab-root ] each ;\r
+\r
+: to-refresh ( prefix -- modified-sources modified-docs )\r
+    child-vocabs\r
+    dup update-roots\r
+    dup modified-sources swap modified-docs ;\r
+\r
+: vocab-heading. ( vocab -- )\r
+    nl\r
+    "==== " write\r
+    dup vocab-name swap vocab write-object ":" print\r
+    nl ;\r
+\r
+: load-error. ( triple -- )\r
+    dup first vocab-heading.\r
+    dup second print-error\r
+    drop ;\r
+\r
+: load-failures. ( failures -- )\r
+    [ load-error. nl ] each ;\r
+\r
+SYMBOL: failures\r
+\r
+: require-all ( vocabs -- failures )\r
+    [\r
+        V{ } clone blacklist set\r
+        V{ } clone failures set\r
+        [\r
+            [ require ]\r
+            [ swap vocab-name failures get set-at ]\r
+            recover\r
+        ] each\r
+        failures get\r
+    ] with-compiler-errors ;\r
+\r
+: do-refresh ( modified-sources modified-docs -- )\r
+    2dup\r
+    [ f swap set-vocab-docs-loaded? ] each\r
+    [ f swap set-vocab-source-loaded? ] each\r
+    append prune require-all load-failures. ;\r
+\r
+: refresh ( prefix -- ) to-refresh do-refresh ;\r
+\r
+SYMBOL: sources-changed?\r
+\r
+[ t sources-changed? set-global ] "tools.vocabs" add-init-hook\r
+\r
+: refresh-all ( -- )\r
+    "" refresh f sources-changed? set-global ;\r
+\r
+MEMO: (vocab-file-contents) ( path -- lines )\r
+    ?resource-path dup exists?\r
+    [ utf8 file-lines ] [ drop f ] if ;\r
+\r
+: vocab-file-contents ( vocab name -- seq )\r
+    vocab-path+ dup [ (vocab-file-contents) ] when ;\r
+\r
+: set-vocab-file-contents ( seq vocab name -- )\r
+    dupd vocab-path+ [\r
+        ?resource-path utf8 set-file-lines\r
+    ] [\r
+        "The " swap vocab-name\r
+        " vocabulary was not loaded from the file system"\r
+        3append throw\r
+    ] ?if ;\r
+\r
+: vocab-summary-path ( vocab -- string )\r
+    vocab-dir "summary.txt" path+ ;\r
+\r
+: vocab-summary ( vocab -- summary )\r
+    dup dup vocab-summary-path vocab-file-contents\r
+    dup empty? [\r
+        drop vocab-name " vocabulary" append\r
+    ] [\r
+        nip first\r
+    ] if ;\r
+\r
+M: vocab summary\r
+    [\r
+        dup vocab-summary %\r
+        " (" %\r
+        vocab-words assoc-size #\r
+        " words)" %\r
+    ] "" make ;\r
+\r
+M: vocab-link summary vocab-summary ;\r
+\r
+: set-vocab-summary ( string vocab -- )\r
+    >r 1array r>\r
+    dup vocab-summary-path\r
+    set-vocab-file-contents ;\r
+\r
+: vocab-tags-path ( vocab -- string )\r
+    vocab-dir "tags.txt" path+ ;\r
+\r
+: vocab-tags ( vocab -- tags )\r
+    dup vocab-tags-path vocab-file-contents ;\r
+\r
+: set-vocab-tags ( tags vocab -- )\r
+    dup vocab-tags-path set-vocab-file-contents ;\r
+\r
+: add-vocab-tags ( tags vocab -- )\r
+    [ vocab-tags append prune ] keep set-vocab-tags ;\r
+\r
+: vocab-authors-path ( vocab -- string )\r
+    vocab-dir "authors.txt" path+ ;\r
+\r
+: vocab-authors ( vocab -- authors )\r
+    dup vocab-authors-path vocab-file-contents ;\r
+\r
+: set-vocab-authors ( authors vocab -- )\r
+    dup vocab-authors-path set-vocab-file-contents ;\r
+\r
+: subdirs ( dir -- dirs )\r
+    directory [ second ] subset keys natural-sort ;\r
+\r
+: (all-child-vocabs) ( root name -- vocabs )\r
+    [ vocab-dir path+ ?resource-path subdirs ] keep\r
+    dup empty? [\r
+        drop\r
+    ] [\r
+        swap [ "." swap 3append ] with map\r
+    ] if ;\r
+\r
+: vocabs-in-dir ( root name -- )\r
+    dupd (all-child-vocabs) [\r
+        2dup vocab-dir? [ 2dup swap >vocab-link , ] when\r
+        vocabs-in-dir\r
+    ] with each ;\r
+\r
+: all-vocabs ( -- assoc )\r
+    vocab-roots get [\r
+        dup [ "" vocabs-in-dir ] { } make\r
+    ] { } map>assoc ;\r
+\r
+MEMO: all-vocabs-seq ( -- seq )\r
+    all-vocabs values concat ;\r
+\r
+: dangerous? ( name -- ? )\r
+    #! Hack\r
+    {\r
+        { [ "cpu." ?head ] [ t ] }\r
+        { [ "io.unix" ?head ] [ t ] }\r
+        { [ "io.windows" ?head ] [ t ] }\r
+        { [ "ui.x11" ?head ] [ t ] }\r
+        { [ "ui.windows" ?head ] [ t ] }\r
+        { [ "ui.cocoa" ?head ] [ t ] }\r
+        { [ "cocoa" ?head ] [ t ] }\r
+        { [ "core-foundation" ?head ] [ t ] }\r
+        { [ "vocabs.loader.test" ?head ] [ t ] }\r
+        { [ "editors." ?head ] [ t ] }\r
+        { [ ".windows" ?tail ] [ t ] }\r
+        { [ ".unix" ?tail ] [ t ] }\r
+        { [ "unix." ?head ] [ t ] }\r
+        { [ ".linux" ?tail ] [ t ] }\r
+        { [ ".bsd" ?tail ] [ t ] }\r
+        { [ ".macosx" ?tail ] [ t ] }\r
+        { [ "windows." ?head ] [ t ] }\r
+        { [ "cocoa" ?head ] [ t ] }\r
+        { [ ".test" ?tail ] [ t ] }\r
+        { [ "raptor" ?head ] [ t ] }\r
+        { [ dup "tools.deploy.app" = ] [ t ] }\r
+        { [ t ] [ f ] }\r
+    } cond nip ;\r
+\r
+: filter-dangerous ( seq -- seq' )\r
+    [ vocab-name dangerous? not ] subset ;\r
+\r
+: try-everything ( -- failures )\r
+    all-vocabs-seq\r
+    filter-dangerous\r
+    require-all ;\r
+\r
+: load-everything ( -- )\r
+    try-everything load-failures. ;\r
+\r
+: unrooted-child-vocabs ( prefix -- seq )\r
+    dup empty? [ CHAR: . add ] unless\r
+    vocabs\r
+    [ vocab-root not ] subset\r
+    [\r
+        vocab-name swap ?head CHAR: . rot member? not and\r
+    ] with subset\r
+    [ vocab ] map ;\r
+\r
+: all-child-vocabs ( prefix -- assoc )\r
+    vocab-roots get [\r
+        over dupd dupd (all-child-vocabs)\r
+        swap [ >vocab-link ] curry map\r
+    ] { } map>assoc\r
+    f rot unrooted-child-vocabs 2array add ;\r
+\r
+: load-children ( prefix -- )\r
+    all-child-vocabs values concat\r
+    filter-dangerous\r
+    require-all\r
+    load-failures. ;\r
+\r
+: map>set ( seq quot -- )\r
+    map concat prune natural-sort ; inline\r
+\r
+MEMO: all-tags ( -- seq )\r
+    all-vocabs-seq [ vocab-tags ] map>set ;\r
+\r
+MEMO: all-authors ( -- seq )\r
+    all-vocabs-seq [ vocab-authors ] map>set ;\r
+\r
+: reset-cache ( -- )\r
+    \ (vocab-file-contents) reset-memoized\r
+    \ all-vocabs-seq reset-memoized\r
+    \ all-authors reset-memoized\r
+    \ all-tags reset-memoized ;\r
index 093222f17b8288625bdf4dff1a52ccdd4bffa25b..51a545db47693d37a48b3f3b1499c0bb4751f7c5 100755 (executable)
@@ -8,7 +8,7 @@ namespaces parser prettyprint quotations tools.annotations
 editors tools.profiler tools.test tools.time tools.walker
 ui.commands ui.gadgets.editors ui.gestures ui.operations
 ui.tools.deploy vocabs vocabs.loader words sequences
-tools.browser classes compiler.units ;
+tools.vocabs classes compiler.units ;
 IN: ui.tools.operations
 
 V{ } clone operations set-global
@@ -84,11 +84,7 @@ UNION: definition word method-spec link vocab vocab-link ;
     { +secondary+ t }
 } define-operation
 
-[
-    class
-    { link word vocab vocab-link vocab-tag vocab-author }
-    memq?
-] \ com-follow H{
+[ topic? ] \ com-follow H{
     { +keyboard+ T{ key-down f { C+ } "H" } }
     { +primary+ t }
 } define-operation
index b37b4ca7076def37fdb761a545b1a7c8d68d7e7f..45ac64539262e6b684cf2bbcd86b143605d5d2c4 100755 (executable)
@@ -7,7 +7,7 @@ source-files definitions strings tools.completion tools.crossref
 tuples ui.commands ui.gadgets ui.gadgets.editors
 ui.gadgets.lists ui.gadgets.scrollers ui.gadgets.tracks
 ui.gestures ui.operations vocabs words vocabs.loader
-tools.browser unicode.case calendar ui ;
+tools.vocabs unicode.case calendar ui ;
 IN: ui.tools.search
 
 TUPLE: live-search field list ;
diff --git a/extra/vocabs/monitor/authors.txt b/extra/vocabs/monitor/authors.txt
deleted file mode 100644 (file)
index 1901f27..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Slava Pestov
diff --git a/extra/vocabs/monitor/monitor.factor b/extra/vocabs/monitor/monitor.factor
deleted file mode 100755 (executable)
index 78e2339..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-! Copyright (C) 2008 Slava Pestov.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: threads io.files io.monitors init kernel\r
-tools.browser namespaces continuations vocabs.loader ;\r
-IN: vocabs.monitor\r
-\r
-! Use file system change monitoring to flush the tags/authors\r
-! cache\r
-SYMBOL: vocab-monitor\r
-\r
-: monitor-thread ( -- )\r
-    vocab-monitor get-global\r
-    next-change 2drop\r
-    t sources-changed? set-global reset-cache ;\r
-\r
-: start-monitor-thread\r
-    #! Silently ignore errors during monitor creation since\r
-    #! monitors are not supported on all platforms.\r
-    [\r
-        "" resource-path t <monitor> vocab-monitor set-global\r
-        [ monitor-thread t ] "Vocabulary monitor" spawn-server drop\r
-    ] ignore-errors ;\r
-\r
-[ start-monitor-thread ] "vocabs.monitor" add-init-hook\r
diff --git a/extra/vocabs/monitor/summary.txt b/extra/vocabs/monitor/summary.txt
deleted file mode 100644 (file)
index 27c0d38..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Use io.monitors to clear tools.browser authors/tags/summary cache