diff --git a/benchmarks/benchmark/ant/ant.factor b/benchmarks/benchmark/ant/ant.factor index 20c18146ae..c7068ced27 100644 --- a/benchmarks/benchmark/ant/ant.factor +++ b/benchmarks/benchmark/ant/ant.factor @@ -26,8 +26,8 @@ in: benchmark.ant TUPLE: point x y ; C: point -! USE: alien.c-types -! USE: classes.struct +! use: alien.c-types +! use: classes.struct ! STRUCT: point { x uint } { y uint } ; ! : ( x y -- point ) point ; inline diff --git a/collections/arrays/shaped/shaped.factor b/collections/arrays/shaped/shaped.factor index 7a058f1993..0c8855fac3 100644 --- a/collections/arrays/shaped/shaped.factor +++ b/collections/arrays/shaped/shaped.factor @@ -175,7 +175,7 @@ GENERIC: next-index ( object -- index ) ; SYNTAX: sa{ \ } [ >shaped-array ] parse-literal ; -USE: prettyprint.custom +use: prettyprint.custom ! M: row-array pprint* shaped-array>array pprint* ; ! M: col-array pprint* shaped-array>array flip pprint* ; M: shaped-array pprint-delims drop \ sa{ \ } ; diff --git a/collections/bit-arrays/bit-arrays-docs.factor b/collections/bit-arrays/bit-arrays-docs.factor index 05b087d363..d137866fe0 100644 --- a/collections/bit-arrays/bit-arrays-docs.factor +++ b/collections/bit-arrays/bit-arrays-docs.factor @@ -29,14 +29,14 @@ $nl bit-array>integer } "Bit array literal syntax:" -{ $subsections POSTPONE: ?{ } ; +{ $subsections postpone: ?{ } ; ABOUT: "bit-arrays" HELP: ?{ { $syntax "?{ elements... }" } { $values { "elements" "a list of booleans" } } -{ $description "Marks the beginning of a literal bit array. Literal bit arrays are terminated by " { $link POSTPONE: } } "." } +{ $description "Marks the beginning of a literal bit array. Literal bit arrays are terminated by " { $link postpone: } } "." } { $examples { $code "?{ t f t }" } } ; HELP: bit-array diff --git a/collections/bit-vectors/bit-vectors-docs.factor b/collections/bit-vectors/bit-vectors-docs.factor index 008cdfb3f0..a3ff7301eb 100644 --- a/collections/bit-vectors/bit-vectors-docs.factor +++ b/collections/bit-vectors/bit-vectors-docs.factor @@ -15,7 +15,7 @@ $nl } "Literal syntax:" -{ $subsections POSTPONE: ?V{ } +{ $subsections postpone: ?V{ } "If you don't care about initial capacity, a more elegant way to create a new bit vector is to write:" { $code "?V{ } clone" } ; @@ -35,5 +35,5 @@ HELP: >bit-vector HELP: ?V{ { $syntax "?V{ elements... }" } { $values { "elements" "a list of booleans" } } -{ $description "Marks the beginning of a literal bit vector. Literal bit vectors are terminated by " { $link POSTPONE: } } "." } +{ $description "Marks the beginning of a literal bit vector. Literal bit vectors are terminated by " { $link postpone: } } "." } { $examples { $code "?V{ t f t }" } } ; diff --git a/collections/memory/pools/pools-docs.factor b/collections/memory/pools/pools-docs.factor index 0b66473603..9c007708b8 100644 --- a/collections/memory/pools/pools-docs.factor +++ b/collections/memory/pools/pools-docs.factor @@ -33,10 +33,10 @@ HELP: new-from-pool } { $description "Allocates an object from the " { $link pool } " associated with " { $snippet "class" } ". If the pool is exhausted, " { $link f } " is returned." } ; -{ POSTPONE: POOL: class-pool set-class-pool new-from-pool free-to-pool } related-words +{ postpone: POOL: class-pool set-class-pool new-from-pool free-to-pool } related-words HELP: pool -{ $class-description "A " { $snippet "pool" } " contains a fixed-size set of preallocated tuple objects. Once the pool has been allocated, its objects can be allocated with " { $link pool-new } " and freed with " { $link pool-free } " in constant time. A pool can also be associated with its class with the " { $link POSTPONE: POOL: } " syntax or the " { $link set-class-pool } " word, after which the words " { $link new-from-pool } " and " { $link free-to-pool } " can be used with the class name to allocate and free objects." } ; +{ $class-description "A " { $snippet "pool" } " contains a fixed-size set of preallocated tuple objects. Once the pool has been allocated, its objects can be allocated with " { $link pool-new } " and freed with " { $link pool-free } " in constant time. A pool can also be associated with its class with the " { $link postpone: POOL: } " syntax or the " { $link set-class-pool } " word, after which the words " { $link new-from-pool } " and " { $link free-to-pool } " can be used with the class name to allocate and free objects." } ; HELP: pool-free { $values @@ -70,7 +70,7 @@ ARTICLE: "memory.pools" "Pools" "The " { $vocab-link "memory.pools" } " vocabulary provides " { $link pool } " objects which manage preallocated collections of objects." { $subsections pool - POSTPONE: POOL: + postpone: POOL: new-from-pool free-to-pool } ; diff --git a/collections/persistent/vectors/vectors-docs.factor b/collections/persistent/vectors/vectors-docs.factor index 6dd5b111b0..edf033f7fa 100644 --- a/collections/persistent/vectors/vectors-docs.factor +++ b/collections/persistent/vectors/vectors-docs.factor @@ -20,7 +20,7 @@ $nl "Converting a sequence into a persistent vector:" { $subsections >persistent-vector } "Persistent vectors have a literal syntax:" -{ $subsections POSTPONE: PV{ } +{ $subsections postpone: PV{ } "The empty persistent vector, written " { $snippet "PV{ }" } ", is used for building up all other persistent vectors." $nl "This implementation of persistent vectors is based on the " { $snippet "clojure.lang.PersistentVector" } " class from Rich Hickey's Clojure language for the JVM (" { $url "http://clojure.org" } ")." ; diff --git a/collections/specialized-arrays/specialized-arrays-docs.factor b/collections/specialized-arrays/specialized-arrays-docs.factor index fbefcdb9f4..dcbcdc0203 100644 --- a/collections/specialized-arrays/specialized-arrays-docs.factor +++ b/collections/specialized-arrays/specialized-arrays-docs.factor @@ -11,7 +11,7 @@ HELP: SPECIALIZED-ARRAYS: { $values { "type" "a C type" } } { $description "Brings a set of specialized arrays for holding values of each " { $snippet "type" } " into the vocabulary search path. The generated words are documented in " { $link "specialized-array-words" } "." } ; -{ POSTPONE: SPECIALIZED-ARRAY: POSTPONE: SPECIALIZED-ARRAYS: } related-words +{ postpone: SPECIALIZED-ARRAY: postpone: SPECIALIZED-ARRAYS: } related-words HELP: direct-slice { $values { "from" integer } { "to" integer } { "seq" "a specialized array" } { "seq'" "a new specialized array" } } @@ -36,7 +36,7 @@ HELP: direct-tail* { direct-slice direct-head direct-tail direct-head* direct-tail* } related-words ARTICLE: "specialized-array-words" "Specialized array words" -"The " { $link POSTPONE: SPECIALIZED-ARRAY: } " and " { $link POSTPONE: SPECIALIZED-ARRAYS: } " parsing words generate specialized array types if they haven't been generated already and add the following words to the vocabulary search path, where " { $snippet "T" } " is the C type in question:" +"The " { $link postpone: SPECIALIZED-ARRAY: } " and " { $link postpone: SPECIALIZED-ARRAYS: } " parsing words generate specialized array types if they haven't been generated already and add the following words to the vocabulary search path, where " { $snippet "T" } " is the C type in question:" { $table { { $snippet "T-array" } { "The class of arrays with elements of type " { $snippet "T" } } } { { $snippet "" } { "Constructor for arrays with elements of type " { $snippet "T" } "; stack effect " { $snippet "( len -- array )" } } } @@ -44,7 +44,7 @@ ARTICLE: "specialized-array-words" "Specialized array words" { { $snippet "" } { "Constructor for arrays with elements of type " { $snippet "T" } " backed by raw memory; stack effect " { $snippet "( alien len -- array )" } } } { { $snippet "T-array{" } { "Literal syntax, consists of a series of values terminated by " { $snippet "}" } } } } -"Behind the scenes, these words are placed in a vocabulary named " { $snippet "specialized-arrays.instances.T" } ", however this vocabulary should not be placed in a " { $link POSTPONE: USING: } " form directly. Instead, always use " { $link POSTPONE: SPECIALIZED-ARRAY: } " or " { $link POSTPONE: SPECIALIZED-ARRAYS: } ". This ensures that the vocabulary can get generated the first time it is needed." +"Behind the scenes, these words are placed in a vocabulary named " { $snippet "specialized-arrays.instances.T" } ", however this vocabulary should not be placed in a " { $link postpone: USING: } " form directly. Instead, always use " { $link postpone: SPECIALIZED-ARRAY: } " or " { $link postpone: SPECIALIZED-ARRAYS: } ". This ensures that the vocabulary can get generated the first time it is needed." $nl "Additionally, special versions of the standard " { $link } ", " { $link head } ", and " { $link tail } " sequence operations are provided for specialized arrays to create a new specialized array object sharing storage with a subsequence of an existing array:" { $subsections @@ -116,8 +116,8 @@ ARTICLE: "specialized-arrays" "Specialized arrays" $nl "A specialized array type needs to be generated for each element type. This is done with parsing words:" { $subsections - POSTPONE: SPECIALIZED-ARRAY: - POSTPONE: SPECIALIZED-ARRAYS: + postpone: SPECIALIZED-ARRAY: + postpone: SPECIALIZED-ARRAYS: } "This parsing word adds new words to the search path, documented in the next section." { $subsections diff --git a/collections/specialized-arrays/specialized-arrays-tests.factor b/collections/specialized-arrays/specialized-arrays-tests.factor index e9e4ebbd31..ad44735997 100644 --- a/collections/specialized-arrays/specialized-arrays-tests.factor +++ b/collections/specialized-arrays/specialized-arrays-tests.factor @@ -180,7 +180,7 @@ SPECIALIZED-ARRAY: struct-resize-test { { 10 20 30 } } [ { 10 20 30 } struct-resize-test-usage ] unit-test -{ } [ "IN: specialized-arrays.tests USE: classes.struct USE: alien.c-types STRUCT: struct-resize-test { x int } { y int } ;" eval( -- ) ] unit-test +{ } [ "in: specialized-arrays.tests use: classes.struct use: alien.c-types STRUCT: struct-resize-test { x int } { y int } ;" eval( -- ) ] unit-test { 80 } [ 10 byte-length ] unit-test diff --git a/collections/specialized-vectors/specialized-vectors-docs.factor b/collections/specialized-vectors/specialized-vectors-docs.factor index a5d3e649e2..02c9e901c0 100644 --- a/collections/specialized-vectors/specialized-vectors-docs.factor +++ b/collections/specialized-vectors/specialized-vectors-docs.factor @@ -11,17 +11,17 @@ HELP: SPECIALIZED-VECTORS: { $values { "type" "a C type" } } { $description "Brings a set of specialized vectors for holding values of each " { $snippet "type" } " into the vocabulary search path. The generated words are documented in " { $link "specialized-vector-words" } "." } ; -{ POSTPONE: SPECIALIZED-VECTOR: POSTPONE: SPECIALIZED-VECTORS: } related-words +{ postpone: SPECIALIZED-VECTOR: postpone: SPECIALIZED-VECTORS: } related-words ARTICLE: "specialized-vector-words" "Specialized vector words" -"The " { $link POSTPONE: SPECIALIZED-VECTOR: } " parsing word generates the specialized vector type if it hasn't been generated already, and adds the following words to the vocabulary search path, where " { $snippet "T" } " is the C type in question:" +"The " { $link postpone: SPECIALIZED-VECTOR: } " parsing word generates the specialized vector type if it hasn't been generated already, and adds the following words to the vocabulary search path, where " { $snippet "T" } " is the C type in question:" { $table { { $snippet "T-vector" } { "The class of vectors with elements of type " { $snippet "T" } } } { { $snippet "" } { "Constructor for vectors with elements of type " { $snippet "T" } "; stack effect " { $snippet "( len -- vector )" } } } { { $snippet ">T-vector" } { "Converts a sequence into a specialized vector of type " { $snippet "T" } "; stack effect " { $snippet "( seq -- vector )" } } } { { $snippet "T-vector{" } { "Literal syntax, consists of a series of values terminated by " { $snippet "}" } } } } -"Behind the scenes, these words are placed in a vocabulary named " { $snippet "specialized-vectors.instances.T" } ", however this vocabulary should not be placed in a " { $link POSTPONE: USING: } " form directly. Instead, always use " { $link POSTPONE: SPECIALIZED-VECTOR: } ". This ensures that the vocabulary can get generated the first time it is needed." ; +"Behind the scenes, these words are placed in a vocabulary named " { $snippet "specialized-vectors.instances.T" } ", however this vocabulary should not be placed in a " { $link postpone: USING: } " form directly. Instead, always use " { $link postpone: SPECIALIZED-VECTOR: } ". This ensures that the vocabulary can get generated the first time it is needed." ; HELP: push-new { $values { "vector" "a specialized vector of structs" } { "new" "a new value of the specialized vector's type" } } @@ -45,8 +45,8 @@ ARTICLE: "specialized-vectors" "Specialized vectors" $nl "A specialized vector type needs to be generated for each element type. This is done with parsing words:" { $subsections - POSTPONE: SPECIALIZED-VECTOR: - POSTPONE: SPECIALIZED-VECTORS: + postpone: SPECIALIZED-VECTOR: + postpone: SPECIALIZED-VECTORS: } { $subsections "specialized-vector-words" diff --git a/collections/suffix-arrays/suffix-arrays-docs.factor b/collections/suffix-arrays/suffix-arrays-docs.factor index a7d28a41ac..de2e353fba 100644 --- a/collections/suffix-arrays/suffix-arrays-docs.factor +++ b/collections/suffix-arrays/suffix-arrays-docs.factor @@ -31,7 +31,7 @@ ARTICLE: "suffix-arrays" "Suffix arrays" "Creating new suffix arrays:" { $subsections >suffix-array } "Literal suffix arrays:" -{ $subsections POSTPONE: SA{ } +{ $subsections postpone: SA{ } "Querying suffix arrays:" { $subsections query } ; diff --git a/collections/trees/avl/avl-docs.factor b/collections/trees/avl/avl-docs.factor index 54efeed449..18e3b608ff 100644 --- a/collections/trees/avl/avl-docs.factor +++ b/collections/trees/avl/avl-docs.factor @@ -23,7 +23,7 @@ ARTICLE: "trees.avl" "AVL trees" avl >avl - POSTPONE: AVL{ + postpone: AVL{ } ; ABOUT: "trees.avl" diff --git a/collections/trees/splay/splay-docs.factor b/collections/trees/splay/splay-docs.factor index 736e82122e..5dfed1b87c 100644 --- a/collections/trees/splay/splay-docs.factor +++ b/collections/trees/splay/splay-docs.factor @@ -23,7 +23,7 @@ ARTICLE: "trees.splay" "Splay trees" splay >splay - POSTPONE: SPLAY{ + postpone: SPLAY{ } ; ABOUT: "trees.splay" diff --git a/collections/trees/trees-docs.factor b/collections/trees/trees-docs.factor index cbb408ad50..fee435a7b3 100644 --- a/collections/trees/trees-docs.factor +++ b/collections/trees/trees-docs.factor @@ -23,7 +23,7 @@ ARTICLE: "trees" "Binary search trees" tree >tree - POSTPONE: TREE{ + postpone: TREE{ } ; ABOUT: "trees" diff --git a/core-locals.factor b/core-locals.factor index adcddf4a2b..44820f1ba0 100644 --- a/core-locals.factor +++ b/core-locals.factor @@ -1,30 +1,30 @@ auto-use in: syntax -USE: delegate.private +use: delegate.private -<< forget: POSTPONE: MACRO: >> -<< forget: POSTPONE: MACRO:: >> -<< forget: POSTPONE: MEMO: >> -<< forget: POSTPONE: MEMO:: >> -<< forget: POSTPONE: M:: >> -<< forget: POSTPONE: IDENTITY-MEMO: >> -<< forget: POSTPONE: IDENTITY-MEMO:: >> -<< forget: POSTPONE: TYPED: >> -<< forget: POSTPONE: TYPED:: >> +<< forget: postpone: MACRO: >> +<< forget: postpone: MACRO:: >> +<< forget: postpone: MEMO: >> +<< forget: postpone: MEMO:: >> +<< forget: postpone: M:: >> +<< forget: postpone: IDENTITY-MEMO: >> +<< forget: postpone: IDENTITY-MEMO:: >> +<< forget: postpone: TYPED: >> +<< forget: postpone: TYPED:: >> -<< forget: POSTPONE: '[ >> -<< forget: POSTPONE: :: >> -<< forget: POSTPONE: :> >> +<< forget: postpone: '[ >> +<< forget: postpone: :: >> +<< forget: postpone: :> >> << forget: _ >> << forget: @ >> -<< forget: POSTPONE: [| >> -<< forget: POSTPONE: [let >> -<< forget: POSTPONE: IH{ >> -<< forget: POSTPONE: PROTOCOL: >> -<< forget: POSTPONE: CONSULT: >> -<< forget: POSTPONE: BROADCAST: >> -<< forget: POSTPONE: SLOT-PROTOCOL: >> -<< forget: POSTPONE: HINTS: >> +<< forget: postpone: [| >> +<< forget: postpone: [let >> +<< forget: postpone: IH{ >> +<< forget: postpone: PROTOCOL: >> +<< forget: postpone: CONSULT: >> +<< forget: postpone: BROADCAST: >> +<< forget: postpone: SLOT-PROTOCOL: >> +<< forget: postpone: HINTS: >> @@ -88,7 +88,7 @@ SYNTAX: HINTS: H{ } clone root-cache set-global - USE: io.directories.search + use: io.directories.search "/Users/erg/factor/core/locals" t recursive-directory-files [ "/Users/erg/factor/core/" ?head drop ] map [ "." swap subseq? ] reject @@ -97,8 +97,8 @@ SYNTAX: HINTS: [ reload ] each - USE: io.directories.search - USE: ui.tools.listener + use: io.directories.search + use: ui.tools.listener "/Users/erg/factor/core/stack-checker" t recursive-directory-files [ "/Users/erg/factor/core/" ?head drop ] map [ "." swap subseq? ] reject diff --git a/core/classes/classes-docs.factor b/core/classes/classes-docs.factor index b16c99e3d3..3e6b4633c9 100644 --- a/core/classes/classes-docs.factor +++ b/core/classes/classes-docs.factor @@ -75,7 +75,7 @@ HELP: class HELP: class-of { $values { "object" object } { "class" class } } { $description "Outputs an object's canonical class. While an object may be an instance of more than one class, the canonical class is either its built-in class, or if the object is a tuple, its tuple class." } -{ $examples { $example "USING: classes prettyprint ;" "1.0 class-of ." "float" } { $example "USING: classes prettyprint ;" "IN: scratchpad" "TUPLE: point x y z ;\nT{ point f 1 2 3 } class-of ." "point" } } ; +{ $examples { $example "USING: classes prettyprint ;" "1.0 class-of ." "float" } { $example "USING: classes prettyprint ;" "in: scratchpad" "TUPLE: point x y z ;\nT{ point f 1 2 3 } class-of ." "point" } } ; HELP: classes { $values { "seq" "a sequence of class words" } } diff --git a/core/classes/maybe/maybe-tests.factor b/core/classes/maybe/maybe-tests.factor index 6434d2710a..71c171e4ab 100644 --- a/core/classes/maybe/maybe-tests.factor +++ b/core/classes/maybe/maybe-tests.factor @@ -62,5 +62,5 @@ M: f lol2 drop "lol22" ; { "lol22" } [ f lol2 ] unit-test [ 3 lol2 ] [ no-method? ] must-fail-with -[ "IN: classes-tests maybe{ 1 2 3 }" eval( -- ) ] +[ "in: classes-tests maybe{ 1 2 3 }" eval( -- ) ] [ error>> not-classoids? ] must-fail-with diff --git a/core/classes/tuple/tuple-docs.factor b/core/classes/tuple/tuple-docs.factor index 111f3763a0..c9c8d6cebc 100644 --- a/core/classes/tuple/tuple-docs.factor +++ b/core/classes/tuple/tuple-docs.factor @@ -350,7 +350,7 @@ ABOUT: "tuples" HELP: tuple-class { $class-description "The class of tuple class words." } -{ $examples { $example "USING: classes.tuple prettyprint ;" "IN: scratchpad" "TUPLE: name title first last ;" "name tuple-class? ." "t" } } ; +{ $examples { $example "USING: classes.tuple prettyprint ;" "in: scratchpad" "TUPLE: name title first last ;" "name tuple-class? ." "t" } } ; HELP: tuple= { $values { "tuple1" tuple } { "tuple2" tuple } { "?" boolean } } @@ -437,7 +437,7 @@ HELP: new { $examples { $example "USING: kernel prettyprint ;" - "IN: scratchpad" + "in: scratchpad" "TUPLE: employee number name department ;" "employee new ." "T{ employee }" diff --git a/core/combinators/combinators-docs.factor b/core/combinators/combinators-docs.factor index 85ad80fdc7..c4c129da49 100644 --- a/core/combinators/combinators-docs.factor +++ b/core/combinators/combinators-docs.factor @@ -301,7 +301,7 @@ HELP: to-fixed-point { $examples { $example "USING: combinators kernel math prettyprint sequences ;" - "IN: scratchpad" + "in: scratchpad" ": flatten ( sequence -- sequence' )" " \"flatten\" over index" " [ [ 1 + swap nth ] [ nip dup 2 + ] [ drop ] 2tri replace-slice ] when* ;" @@ -356,7 +356,7 @@ HELP: case { $examples { $example "USING: combinators io kernel ;" - "IN: scratchpad" + "in: scratchpad" "SYMBOLS: yes no maybe ;" "maybe {" " { yes [ ] } ! Do nothing" diff --git a/core/compiler/units/units-docs.factor b/core/compiler/units/units-docs.factor index efdfc73ac6..86b98b1f5d 100644 --- a/core/compiler/units/units-docs.factor +++ b/core/compiler/units/units-docs.factor @@ -104,7 +104,7 @@ $nl "Manually creating a word using the non-optimizing compiler:" { $example "USING: compiler.units io ;" - "IN: test symbol: foo" + "in: test symbol: foo" "{ { foo [ \"hello!\" write nl ] } } t t modify-code-heap foo" "hello!" } diff --git a/core/compiler/units/units-tests.factor b/core/compiler/units/units-tests.factor index 06e70b8f36..8fea8fa6d0 100644 --- a/core/compiler/units/units-tests.factor +++ b/core/compiler/units/units-tests.factor @@ -54,7 +54,7 @@ observer add-definition-observer defer: nesting-test -{ } [ "IN: compiler.units.tests << : nesting-test ( -- ) ; >>" eval( -- ) ] unit-test +{ } [ "in: compiler.units.tests << : nesting-test ( -- ) ; >>" eval( -- ) ] unit-test observer remove-definition-observer diff --git a/core/grouping/grouping-docs.factor b/core/grouping/grouping-docs.factor index eb05a874a5..1e1bfad058 100644 --- a/core/grouping/grouping-docs.factor +++ b/core/grouping/grouping-docs.factor @@ -133,7 +133,7 @@ HELP: "Running averages:" { $example "USING: grouping sequences math prettyprint kernel ;" - "IN: scratchpad" + "in: scratchpad" "CONSTANT: share-price { 13/50 51/100 13/50 1/10 4/5 17/20 33/50 3/25 19/100 3/100 }" "" "share-price 4 [ [ sum ] [ length ] bi / ] map ." diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index 1449089f45..5e1faae133 100644 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -214,7 +214,7 @@ HELP: execute { $values { "word" word } } { $description "Executes a word. Words which " { $link execute } " an input parameter must be declared " { $link postpone: inline } " so that a caller which passes in a literal word can have a static stack effect." } { $examples - { $example "USING: kernel io words ;" "IN: scratchpad" ": twice ( word -- ) dup execute execute ; inline\n: hello ( -- ) \"Hello\" print ;\n\\ hello twice" "Hello\nHello" } + { $example "USING: kernel io words ;" "in: scratchpad" ": twice ( word -- ) dup execute execute ; inline\n: hello ( -- ) \"Hello\" print ;\n\\ hello twice" "Hello\nHello" } } ; { execute postpone: execute( } related-words @@ -632,7 +632,7 @@ $nl { $examples { $example "USING: kernel math prettyprint sequences ;" - "IN: scratchpad" + "in: scratchpad" "" "CONSTANT: american-cities {" " \"San Francisco\"" @@ -660,7 +660,7 @@ $nl "Notice how in this example, the same value is tested by the conditional, and then used in the true branch; the false branch does not need to drop the value because of how " { $link if* } " works:" { $example "USING: assocs io kernel math.parser ;" - "IN: scratchpad" + "in: scratchpad" "" ": curry-price ( meat -- price ) { diff --git a/core/memoize/memoize-tests.factor b/core/memoize/memoize-tests.factor index e4b85afafd..ea4750cc4b 100644 --- a/core/memoize/memoize-tests.factor +++ b/core/memoize/memoize-tests.factor @@ -23,13 +23,13 @@ MEMO: x ( a b c d e -- f g h i j ) MEMO: see-test ( a -- b ) reverse ; -{ "USING: sequences ;\nIN: memoize.tests\nMEMO: see-test ( a -- b ) reverse ;\n" } +{ "USING: sequences ;\nin: memoize.tests\nMEMO: see-test ( a -- b ) reverse ;\n" } [ [ \ see-test see ] with-string-writer ] unit-test -{ } [ "IN: memoize.tests : fib ( -- ) ;" eval( -- ) ] unit-test +{ } [ "in: memoize.tests : fib ( -- ) ;" eval( -- ) ] unit-test -{ "IN: memoize.tests\n: fib ( -- ) ;\n" } [ [ \ fib see ] with-string-writer ] unit-test +{ "in: memoize.tests\n: fib ( -- ) ;\n" } [ [ \ fib see ] with-string-writer ] unit-test [ sq ] ( a -- b ) memoize-quot "q" set diff --git a/core/namespaces/namespaces-docs.factor b/core/namespaces/namespaces-docs.factor index cc4bdb67b5..d821ef5898 100644 --- a/core/namespaces/namespaces-docs.factor +++ b/core/namespaces/namespaces-docs.factor @@ -110,7 +110,7 @@ HELP: +@ { $description "Adds " { $snippet "n" } " to the value of the variable. A variable value of " { $link f } " is interpreted as being zero." } { $side-effects "variable" } { $examples - { $example "USING: namespaces prettyprint ;" "IN: scratchpad" "symbol: foo\n1 foo +@\n10 foo +@\nfoo get ." "11" } + { $example "USING: namespaces prettyprint ;" "in: scratchpad" "symbol: foo\n1 foo +@\n10 foo +@\nfoo get ." "11" } } ; HELP: inc @@ -133,7 +133,7 @@ HELP: with-scope { $values { "quot" quotation } } { $description "Calls the quotation in a new namespace. Any variables set by the quotation are discarded when it returns." } { $examples - { $example "USING: math namespaces prettyprint ;" "IN: scratchpad" "symbol: x" "0 x set" "[ x [ 5 + ] change x get . ] with-scope x get ." "5\n0" } + { $example "USING: math namespaces prettyprint ;" "in: scratchpad" "symbol: x" "0 x set" "[ x [ 5 + ] change x get . ] with-scope x get ." "5\n0" } } ; HELP: with-variable diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index 9c0feffff5..dacc881a7c 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -451,7 +451,7 @@ defer: foo { } [ 2 [ - "in: parser.tests defer: twice-fails forget: twice-fails MIXin: twice-fails" + "in: parser.tests defer: twice-fails forget: twice-fails mixin: twice-fails" "twice-fails-test" parse-stream drop ] times ] unit-test diff --git a/core/quotations/quotations-docs.factor b/core/quotations/quotations-docs.factor index 6dcc51bab8..78c71dc20f 100644 --- a/core/quotations/quotations-docs.factor +++ b/core/quotations/quotations-docs.factor @@ -32,7 +32,7 @@ ARTICLE: "wrappers" "Wrappers" } "Wrapper literal syntax is documented in " { $link "syntax-words" } "." { $example - "IN: scratchpad" + "in: scratchpad" "defer: my-word" "\\ my-word name>> ." "\"my-word\"" diff --git a/core/words/alias/alias-tests.factor b/core/words/alias/alias-tests.factor index ac0f1efd7e..2c9410c123 100644 --- a/core/words/alias/alias-tests.factor +++ b/core/words/alias/alias-tests.factor @@ -2,10 +2,10 @@ USING: effects eval math tools.test ; in: words.alias.tests ALIAS: foo + -{ } [ "IN: words.alias.tests CONSTANT: foo 5" eval( -- ) ] unit-test +{ } [ "in: words.alias.tests CONSTANT: foo 5" eval( -- ) ] unit-test { ( -- value ) } [ \ foo stack-effect ] unit-test ALIAS: MY-H{ H{ { H{ { 1 2 } } } [ - "IN: words.alias.tests MY-H{ { 1 2 } }" eval( -- x ) + "in: words.alias.tests MY-H{ { 1 2 } }" eval( -- x ) ] unit-test diff --git a/demos/hello-world/hello-world.factor b/demos/hello-world/hello-world.factor index 9414d41323..4bdeadfd39 100644 --- a/demos/hello-world/hello-world.factor +++ b/demos/hello-world/hello-world.factor @@ -1,4 +1,4 @@ -USE: io +use: io in: hello-world : hello ( -- ) "Hello world" print ; diff --git a/demos/rosetta-code/ternary-logic/ternary-logic.factor b/demos/rosetta-code/ternary-logic/ternary-logic.factor index 60d4b94fc0..4d1e3249a8 100644 --- a/demos/rosetta-code/ternary-logic/ternary-logic.factor +++ b/demos/rosetta-code/ternary-logic/ternary-logic.factor @@ -31,7 +31,7 @@ in: rosetta-code.ternary-logic ! algorithm and is preferable to binary logic. singleton: m -UNION: trit t m POSTPONE: f ; +UNION: trit t m postpone: f ; GENERIC: >trit ( object -- trit ) ; M: trit >trit ; diff --git a/demos/talks/galois-talk/galois-talk.factor b/demos/talks/galois-talk/galois-talk.factor index 699471368b..c0f6fbaf9f 100644 --- a/demos/talks/galois-talk/galois-talk.factor +++ b/demos/talks/galois-talk/galois-talk.factor @@ -28,7 +28,7 @@ CONSTANT: galois-slides { $slide "Vocabularies" "Vocabularies: named sets of words" { $link "vocab-index" } - { { $link POSTPONE: USING: } " loads dependencies" } + { { $link postpone: USING: } " loads dependencies" } "Source, docs, tests in one place" } { $slide "Interactive development" @@ -68,7 +68,7 @@ CONSTANT: galois-slides { $code "GENERIC: area ( shape -- n ) ;" } "Two methods:" { $code - "USE: math.constants" + "use: math.constants" "" "M: rectangle area" " [ width>> ] [ height>> ] bi * ;" @@ -132,12 +132,12 @@ CONSTANT: galois-slides { $vocab-link "regexp" } "Pre-compiles regexp at parse time" "Implemented with library code" - { $code "USE: regexp" } + { $code "use: regexp" } { $code "\"ababbc\" \"[ab]+c\" matches? ." } { $code "\"ababbc\" R/ [ab]+c/ matches? ." } } { $slide "Example: memoization" - { "Memoization with " { $link POSTPONE: MEMO: } } + { "Memoization with " { $link postpone: MEMO: } } { $code ": fib ( m -- n )" " dup 1 > [" @@ -147,7 +147,7 @@ CONSTANT: galois-slides "Very slow! Let's profile it..." } { $slide "Example: memoization" - { "Let's use " { $link POSTPONE: : } " instead of " { $link POSTPONE: MEMO: } } + { "Let's use " { $link postpone: : } " instead of " { $link postpone: MEMO: } } { $code "MEMO: fib ( m -- n )" " dup 1 > [" @@ -157,10 +157,10 @@ CONSTANT: galois-slides "Much faster" } { $slide "Meta-circularity" - { { $link POSTPONE: MEMO: } " is just a library word" } - { "But so is " { $link POSTPONE: : } } + { { $link postpone: MEMO: } " is just a library word" } + { "But so is " { $link postpone: : } } "Factor's parser is written in Factor" - { "All syntax is just parsing words: " { $link POSTPONE: [ } ", " { $link POSTPONE: " } } + { "All syntax is just parsing words: " { $link postpone: [ } ", " { $link postpone: " } } } { $slide "Extensible syntax, DSLs" "Most parsing words fall in one of two categories" @@ -169,7 +169,7 @@ CONSTANT: galois-slides "Some parsing words are more complicated" } { $slide "Example: printf" - { { $link POSTPONE: EBNF: } ": a complex parsing word" } + { { $link postpone: EBNF: } ": a complex parsing word" } "Implements a custom syntax for expressing parsers: like OMeta!" { "Example: " { $vocab-link "printf-example" } } { $code "\"vegan\" \"cheese\" \"%s is not %s\\n\" printf" } @@ -188,10 +188,10 @@ CONSTANT: galois-slides "Influenced by Scheme and Lisp" } { $slide "Locals and lexical scope" - { "Define lambda words with " { $link POSTPONE: :: } } - { "Establish bindings with " { $link POSTPONE: [let } " and " { $snippet "[let*" } } + { "Define lambda words with " { $link postpone: :: } } + { "Establish bindings with " { $link postpone: [let } " and " { $snippet "[let*" } } "Mutable bindings with correct semantics" - { "Named inputs for quotations with " { $link POSTPONE: [| } } + { "Named inputs for quotations with " { $link postpone: [| } } "Full closures" } { $slide "Locals and lexical scope" @@ -219,7 +219,7 @@ CONSTANT: galois-slides "In the base image, only 59 words out of 13,000 use locals" } { $slide "More about partial application" - { { $link POSTPONE: '[ } " is \"fry syntax\"" } + { { $link postpone: '[ } " is \"fry syntax\"" } { $code "'[ _ + ] == [ + ] curry" } { $code "'[ @ t ] == [ t ] compose" } { $code "'[ _ nth @ ] == [ [ nth ] curry ] dip compose" } diff --git a/demos/talks/google-tech-talk/google-tech-talk.factor b/demos/talks/google-tech-talk/google-tech-talk.factor index 3da3cb3c33..e0fe818224 100644 --- a/demos/talks/google-tech-talk/google-tech-talk.factor +++ b/demos/talks/google-tech-talk/google-tech-talk.factor @@ -28,7 +28,7 @@ CONSTANT: google-slides } { $slide "Example: factorial" "Lame example, but..." - { $code "USE: math.ranges" ": factorial ( n -- n! )" " 1 [a,b] product ;" } + { $code "use: math.ranges" ": factorial ( n -- n! )" " 1 [a,b] product ;" } { $code "100 factorial ." } } { $slide "Example: sending an e-mail" @@ -114,7 +114,7 @@ CONSTANT: google-slides { $code "GENERIC: area ( shape -- n ) ;" } "Two methods:" { $code - "USE: math.constants" + "use: math.constants" "" "M: rectangle area" " [ width>> ] [ height>> ] bi * ;" @@ -246,12 +246,12 @@ CONSTANT: google-slides } { $slide "Unicode strings" "Unicode-aware case conversion, char classes, collation, word breaks, and so on..." - { $code "USE: unicode" "\"ß\" >upper ." } + { $code "use: unicode" "\"ß\" >upper ." } } { $slide "Unicode strings" "All external byte I/O is encoded/decoded" "ASCII, UTF8, UTF16, EBCDIC..." - { $code "USE: io.encodings.utf8" "\"document.txt\" utf8" "[ readln ] with-file-reader" } + { $code "use: io.encodings.utf8" "\"document.txt\" utf8" "[ readln ] with-file-reader" } { "Binary I/O is supported as well with the " { $link binary } " encoding" } } { $slide "Associative mappings" @@ -271,10 +271,10 @@ CONSTANT: google-slides "Influenced by Scheme and Lisp" } { $slide "Locals and lexical scope" - { "Define lambda words with " { $link POSTPONE: :: } } - { "Establish bindings with " { $link POSTPONE: [let } " and " { $snippet "[let*" } } + { "Define lambda words with " { $link postpone: :: } } + { "Establish bindings with " { $link postpone: [let } " and " { $snippet "[let*" } } "Mutable bindings with correct semantics" - { "Named inputs for quotations with " { $link POSTPONE: [| } } + { "Named inputs for quotations with " { $link postpone: [| } } "Full closures" } { $slide "Locals and lexical scope" @@ -296,11 +296,11 @@ CONSTANT: google-slides "Libraries can define new parsing words" } { $slide "The parser" - { "Example: URLs define a " { $link POSTPONE: URL" } " word" } + { "Example: URLs define a " { $link postpone: URL" } " word" } { $code "URL\" http://paste.factorcode.org/paste?id=81\"" } } { $slide "Example: memoization" - { "Memoization with " { $link POSTPONE: MEMO: } } + { "Memoization with " { $link postpone: MEMO: } } { $code ": fib ( m -- n )" " dup 1 > [" @@ -310,7 +310,7 @@ CONSTANT: google-slides "Very slow! Let's profile it..." } { $slide "Example: memoization" - { "Let's use " { $link POSTPONE: : } " instead of " { $link POSTPONE: MEMO: } } + { "Let's use " { $link postpone: : } " instead of " { $link postpone: MEMO: } } { $code "MEMO: fib ( m -- n )" " dup 1 > [" @@ -320,10 +320,10 @@ CONSTANT: google-slides "Much faster" } { $slide "Meta-circularity" - { { $link POSTPONE: MEMO: } " is just a library word" } - { "But so is " { $link POSTPONE: : } } + { { $link postpone: MEMO: } " is just a library word" } + { "But so is " { $link postpone: : } } "Factor's parser is written in Factor" - { "All syntax is just parsing words: " { $link POSTPONE: [ } ", " { $link POSTPONE: " } } + { "All syntax is just parsing words: " { $link postpone: [ } ", " { $link postpone: " } } } { $slide "Extensible syntax, DSLs" "Most parsing words fall in one of two categories" @@ -332,7 +332,7 @@ CONSTANT: google-slides "Some parsing words are more complicated" } { $slide "Parser expression grammars" - { { $link POSTPONE: EBNF: } ": a complex parsing word" } + { { $link postpone: EBNF: } ": a complex parsing word" } "Implements a custom syntax for expressing parsers" { "Example: " { $vocab-link "printf-example" } } { $code "\"vegan\" \"cheese\" \"%s is not %s\\n\" printf" } @@ -349,7 +349,7 @@ CONSTANT: google-slides } { $slide "Example: file system monitors" { $code - "USE: io.monitors" + "use: io.monitors" "" ": forever ( quot -- ) '[ @ t ] loop ; inline" "" @@ -437,7 +437,7 @@ CONSTANT: google-slides } { $slide "Compiler: escape analysis" "We identify allocations for tuples which are never returned or passed to other words (except slot access)" - { "Partial application with " { $link POSTPONE: '[ } } + { "Partial application with " { $link postpone: '[ } } "Complex numbers" } { $slide "Compiler: escape analysis" diff --git a/demos/talks/minneapolis-talk/minneapolis-talk.factor b/demos/talks/minneapolis-talk/minneapolis-talk.factor index 88cf8e1dfe..0e04ddb923 100644 --- a/demos/talks/minneapolis-talk/minneapolis-talk.factor +++ b/demos/talks/minneapolis-talk/minneapolis-talk.factor @@ -80,7 +80,7 @@ CONSTANT: minneapolis-slides STRIP-TEASE: $slide "An example" { $code - "USE: math.constants" + "use: math.constants" "GENERIC: area ( shape -- meters^2 ) ;" "M: square area square-dimension sq ;" "M: circle area circle-radius sq pi * ;" @@ -110,14 +110,14 @@ CONSTANT: minneapolis-slides "Let's profile it!" } { $slide "Memoization" - { { $link POSTPONE: : } " is just another word" } + { { $link postpone: : } " is just another word" } "What if we could define a word which caches its results?" { "The " { $vocab-link "memoize" } " library provides such a feature" } - { "Just change " { $link POSTPONE: : } " to " { $link POSTPONE: MEMO: } } + { "Just change " { $link postpone: : } " to " { $link postpone: MEMO: } } } { $slide "Memoization" { $code - "USE: memoize" + "use: memoize" "" "MEMO: fib ( x -- y )" " dup 1 > [" diff --git a/demos/talks/otug-talk/otug-talk.factor b/demos/talks/otug-talk/otug-talk.factor index e45f74f474..dddc68c3e3 100644 --- a/demos/talks/otug-talk/otug-talk.factor +++ b/demos/talks/otug-talk/otug-talk.factor @@ -53,7 +53,7 @@ CONSTANT: otug-slides { $slide "Constructing quotations" { "Suppose we want a " { $snippet "remove-comments*" } " word" } { $code ": remove-comments* ( lines string -- lines' )" " [ ??? head? ] reject ;" } - { "We use " { $link POSTPONE: '[ } " instead of " { $link POSTPONE: [ } } + { "We use " { $link postpone: '[ } " instead of " { $link postpone: [ } } { "Create “holes” with " { $link _ } } "Holes filled in left to right when quotation pushed on the stack" } diff --git a/demos/talks/tc-lisp-talk/tc-lisp-talk.factor b/demos/talks/tc-lisp-talk/tc-lisp-talk.factor index 970bef5fc9..4351788c04 100644 --- a/demos/talks/tc-lisp-talk/tc-lisp-talk.factor +++ b/demos/talks/tc-lisp-talk/tc-lisp-talk.factor @@ -17,7 +17,7 @@ CONSTANT: tc-lisp-slides } { $slide "First, some examples" { $code "3 weeks ago noon monday ." } - { $code "USE: roman 2009 >roman ." } + { $code "use: roman 2009 >roman ." } { $code ": average ( seq -- x ) [ sum ] [ length ] bi / ;" } { $code "1 miles [ km ] undo >float ." } @@ -78,11 +78,11 @@ CONSTANT: tc-lisp-slides } { $slide "Object system" "Based on CLOS" - { "We define generic words that operate on the top of the stack with " { $link POSTPONE: GENERIC: } " or on an implicit parameter with " { $link POSTPONE: HOOK: } } + { "We define generic words that operate on the top of the stack with " { $link postpone: GENERIC: } " or on an implicit parameter with " { $link postpone: HOOK: } } } { $slide "Object system example: shape protocol" "In ~/factor/work/shapes/shapes.factor" - { $code "IN: shapes + { $code "in: shapes GENERIC: area ( shape -- x ) ; GENERIC: perimeter ( shape -- x ) ;" diff --git a/demos/talks/vpri-talk/vpri-talk.factor b/demos/talks/vpri-talk/vpri-talk.factor index 0a12e42151..3ad52ef697 100644 --- a/demos/talks/vpri-talk/vpri-talk.factor +++ b/demos/talks/vpri-talk/vpri-talk.factor @@ -64,7 +64,7 @@ CONSTANT: vpri-slides { $code "GENERIC: area ( shape -- n ) ;" } "Two methods:" { $code - "USE: math.constants" + "use: math.constants" "" "M: rectangle area" " [ width>> ] [ height>> ] bi * ;" @@ -157,7 +157,7 @@ CONSTANT: vpri-slides { $code "float-array{ 3.14 7.6 10.3 }" } } { $slide "Example: memoization" - { "Memoization with " { $link POSTPONE: MEMO: } } + { "Memoization with " { $link postpone: MEMO: } } { $code ": fib ( m -- n )" " dup 1 > [" @@ -167,7 +167,7 @@ CONSTANT: vpri-slides "Very slow! Let's profile it..." } { $slide "Example: memoization" - { "Let's use " { $link POSTPONE: : } " instead of " { $link POSTPONE: MEMO: } } + { "Let's use " { $link postpone: : } " instead of " { $link postpone: MEMO: } } { $code "MEMO: fib ( m -- n )" " dup 1 > [" @@ -177,10 +177,10 @@ CONSTANT: vpri-slides "Much faster" } { $slide "Meta-circularity" - { { $link POSTPONE: MEMO: } " is just a library word" } - { "But so is " { $link POSTPONE: : } } + { { $link postpone: MEMO: } " is just a library word" } + { "But so is " { $link postpone: : } } "Factor's parser is written in Factor" - { "All syntax is just parsing words: " { $link POSTPONE: [ } ", " { $link POSTPONE: " } } + { "All syntax is just parsing words: " { $link postpone: [ } ", " { $link postpone: " } } } { $slide "Extensible syntax, DSLs" "Most parsing words fall in one of two categories" @@ -189,7 +189,7 @@ CONSTANT: vpri-slides "Some parsing words are more complicated" } { $slide "Example: printf" - { { $link POSTPONE: EBNF: } ": a complex parsing word" } + { { $link postpone: EBNF: } ": a complex parsing word" } "Implements a custom syntax for expressing parsers: like OMeta!" { "Example: " { $vocab-link "printf-example" } } { $code "\"vegan\" \"cheese\" \"%s is not %s\\n\" printf" } @@ -208,10 +208,10 @@ CONSTANT: vpri-slides "Influenced by Scheme and Lisp" } { $slide "Locals and lexical scope" - { "Define lambda words with " { $link POSTPONE: :: } } - { "Establish bindings with " { $link POSTPONE: [let } " and " { $snippet "[let*" } } + { "Define lambda words with " { $link postpone: :: } } + { "Establish bindings with " { $link postpone: [let } " and " { $snippet "[let*" } } "Mutable bindings with correct semantics" - { "Named inputs for quotations with " { $link POSTPONE: [| } } + { "Named inputs for quotations with " { $link postpone: [| } } "Full closures" } { $slide "Locals and lexical scope" @@ -241,7 +241,7 @@ CONSTANT: vpri-slides "In the base image, only 59 words out of 13,000 use locals" } { $slide "More about partial application" - { { $link POSTPONE: '[ } " is \"fry syntax\"" } + { { $link postpone: '[ } " is \"fry syntax\"" } { $code "'[ _ + ] == [ + ] curry" } { $code "'[ @ t ] == [ t ] compose" } { $code "'[ _ nth @ ] == [ [ nth ] curry ] dip compose" } diff --git a/ffi/cairo-demo/cairo-demo.factor b/ffi/cairo-demo/cairo-demo.factor index 9265dfb72a..a3e5384128 100644 --- a/ffi/cairo-demo/cairo-demo.factor +++ b/ffi/cairo-demo/cairo-demo.factor @@ -21,8 +21,8 @@ in: cairo-demo TUPLE: cairo-demo-gadget < gadget image-array cairo-t ; -USE: io -USE: formatting +use: io +use: formatting M: cairo-demo-gadget draw-gadget* ( gadget -- ) 0 0 glRasterPos2i diff --git a/ffi/cocoa/cocoa-docs.factor b/ffi/cocoa/cocoa-docs.factor index 590fd13ffa..ae3a97afdf 100644 --- a/ffi/cocoa/cocoa-docs.factor +++ b/ffi/cocoa/cocoa-docs.factor @@ -14,7 +14,7 @@ HELP: SUPER-> { $description "A sugared form of the following:" } { $code "\"selector\" send-super" } ; -{ send super-send POSTPONE: -> POSTPONE: SUPER-> } related-words +{ send super-send postpone: -> postpone: SUPER-> } related-words HELP: IMPORT: { $syntax "IMPORT: name" } @@ -25,13 +25,13 @@ HELP: IMPORT: ARTICLE: "objc-calling" "Calling Objective C code" "Before an Objective C class can be used, it must be imported; by default, a small set of common classes are imported automatically, but additional classes can be imported as needed." -{ $subsections POSTPONE: IMPORT: } +{ $subsections postpone: IMPORT: } "Every imported Objective C class has as corresponding class word in the " { $vocab-link "cocoa.classes" } " vocabulary. Class words push the class object in the stack, allowing class methods to be invoked." $nl "Messages can be sent to classes and instances using a pair of parsing words:" { $subsections - POSTPONE: -> - POSTPONE: SUPER-> + postpone: -> + postpone: SUPER-> } "These parsing words are actually syntax sugar for a pair of ordinary words; they can be used instead of the parsing words if the selector name is dynamically computed:" { $subsections diff --git a/ffi/cocoa/subclassing/subclassing-docs.factor b/ffi/cocoa/subclassing/subclassing-docs.factor index 76bb4267e7..069b5c8a42 100644 --- a/ffi/cocoa/subclassing/subclassing-docs.factor +++ b/ffi/cocoa/subclassing/subclassing-docs.factor @@ -3,21 +3,21 @@ in: cocoa.subclassing HELP: CLASS: { $syntax "CLASS: name < superclass protocols... imeth... ;" } -{ $values { "name" "a new class name" } { "superclass" "a superclass name" } { "protocols" "zero or more protocol names" } { "imeth" "instance method definitions using " { $link POSTPONE: METHOD: } } } -{ $description "Defines a new Objective C class. Instance methods are defined with the " { $link POSTPONE: METHOD: } " parsing word." +{ $values { "name" "a new class name" } { "superclass" "a superclass name" } { "protocols" "zero or more protocol names" } { "imeth" "instance method definitions using " { $link postpone: METHOD: } } } +{ $description "Defines a new Objective C class. Instance methods are defined with the " { $link postpone: METHOD: } " parsing word." $nl "This word is preferred to calling " { $link define-objc-class } ", because it creates a class word in the " { $vocab-link "cocoa.classes" } " vocabulary at parse time, allowing code to refer to the class word in the same source file where the class is defined." } ; -{ define-objc-class POSTPONE: CLASS: POSTPONE: METHOD: } related-words +{ define-objc-class postpone: CLASS: postpone: METHOD: } related-words HELP: METHOD: { $syntax "METHOD: return foo: type1 arg1 bar: type2 arg2 baz: ... [ body ] ;" } { $values { "return" "a C type name" } { "type1" "a C type name" } { "arg1" "a local variable name" } { "body" "arbitrary code" } } -{ $description "Defines a method inside of a " { $link POSTPONE: CLASS: } " form." } ; +{ $description "Defines a method inside of a " { $link postpone: CLASS: } " form." } ; ARTICLE: "objc-subclassing" "Subclassing Objective C classes" "Objective C classes can be subclassed, with new methods defined in Factor, using parsing words:" -{ $subsections POSTPONE: CLASS: POSTPONE: METHOD: } +{ $subsections postpone: CLASS: postpone: METHOD: } "Objective C class definitions are saved in the image. If the image is saved and Factor is restarted with the saved image, custom class definitions are made available to the Objective C runtime when they are first accessed from within Factor." ; ABOUT: "objc-subclassing" diff --git a/ffi/gobject/ffi/ffi.factor b/ffi/gobject/ffi/ffi.factor index 798f6201f5..9fb9775dd6 100644 --- a/ffi/gobject/ffi/ffi.factor +++ b/ffi/gobject/ffi/ffi.factor @@ -7,7 +7,7 @@ in: gobject.ffi ! these two are needed for the definition of GError and others. ! otherwise we generate GError and some others in this vocab as well. << "glib.ffi" require >> -USE: glib.ffi +use: glib.ffi LIBRARY: gobject diff --git a/ffi/mongodb/connection/connection.factor b/ffi/mongodb/connection/connection.factor index f2acaf3c86..8f65bb65ef 100644 --- a/ffi/mongodb/connection/connection.factor +++ b/ffi/mongodb/connection/connection.factor @@ -20,7 +20,7 @@ TUPLE: mdb-connection instance node handle remote local buffer ; : connection-buffer ( -- buffer ) mdb-connection get buffer>> 0 >>length ; inline -USE: mongodb.operations +use: mongodb.operations CONSTRUCTOR: mdb-connection ( instance -- mdb-connection ) ; diff --git a/ffi/opengl/debug/debug-docs.factor b/ffi/opengl/debug/debug-docs.factor index 7c97b053c9..1a16ac4b58 100644 --- a/ffi/opengl/debug/debug-docs.factor +++ b/ffi/opengl/debug/debug-docs.factor @@ -20,9 +20,9 @@ HELP: GB { $description "A shorthand for " { $link gl-break } "." } ; HELP: gl-break -{ $description "Suspends the current thread and activates the walker like " { $link break } ", but also preserves the current OpenGL context, saves it to " { $link G-world } " for interactive use through " { $link G } ", and restores the current context when the suspended thread is continued. The shorthand word " { $link POSTPONE: GB } " can also be used." } ; +{ $description "Suspends the current thread and activates the walker like " { $link break } ", but also preserves the current OpenGL context, saves it to " { $link G-world } " for interactive use through " { $link G } ", and restores the current context when the suspended thread is continued. The shorthand word " { $link postpone: GB } " can also be used." } ; -{ G F G-world POSTPONE: GB gl-break } related-words +{ G F G-world postpone: GB gl-break } related-words ARTICLE: "opengl.debug" "Interactive debugging of OpenGL applications" "The " { $vocab-link "opengl.debug" } " vocabulary provides words to assist with interactive debugging of OpenGL applications in the Factor UI." diff --git a/ffi/pcre/pcre-docs.factor b/ffi/pcre/pcre-docs.factor index 8d43c0b353..bc71856e18 100644 --- a/ffi/pcre/pcre-docs.factor +++ b/ffi/pcre/pcre-docs.factor @@ -26,7 +26,7 @@ HELP: findall { $description "Finds all matches of the given regexp in the string. Matches is sequence of associative array where the key is the name of the capturing group, or f to denote the full match." } { $examples { $code - "USE: pcre" + "use: pcre" "\"foobar\" \"(?\\\\w)(?\\\\w)\" findall ." "{" " { { f \"fo\" } { \"ch1\" \"f\" } { \"ch2\" \"o\" } }" diff --git a/ffi/windows/com/syntax/syntax.factor b/ffi/windows/com/syntax/syntax.factor index 247cbadc64..9d4e702961 100755 --- a/ffi/windows/com/syntax/syntax.factor +++ b/ffi/windows/com/syntax/syntax.factor @@ -94,6 +94,6 @@ SYNTAX: COM-INTERFACE: SYNTAX: GUID: scan-token string>guid suffix! ; -USE: vocabs.loader +use: vocabs.loader { "windows.com" "prettyprint" } "windows.com.prettyprint" require-when diff --git a/ffi/windows/com/wrapper/wrapper-docs.factor b/ffi/windows/com/wrapper/wrapper-docs.factor index 2eb090c74c..ad244aa30b 100644 --- a/ffi/windows/com/wrapper/wrapper-docs.factor +++ b/ffi/windows/com/wrapper/wrapper-docs.factor @@ -5,7 +5,7 @@ in: windows.com.wrapper HELP: { $values { "implementations" "an assoc relating COM interface names to arrays of quotations implementing that interface" } { "wrapper" "a " { $link com-wrapper } " tuple" } } -{ $description "Constructs a " { $link com-wrapper } " tuple. Each key in the " { $snippet "implementations" } " assoc must be the name of an interface defined with " { $link POSTPONE: COM-INTERFACE: } ". The corresponding value must be an array of quotations implementing the methods of that interface in order, including those of its parent interfaces. The " { $snippet "IUnknown" } " methods (" { $link IUnknown::QueryInterface } ", " { $link IUnknown::AddRef } ", and " { $link IUnknown::Release } ") will be defined automatically and must not be specified in the array. These quotations should have stack effects mirroring those of the interface methods being implemented; for example, a method " { $snippet "void foobar ( int foo, int bar )" } " should be implemented with a quotation of effect " { $snippet "( this foo bar -- )" } ". The " { $snippet "this" } " parameter (that is, the leftmost parameter of any COM method) will be automatically converted from an alien pointer to the underlying Factor object before the quotation is invoked.\n\nThe resulting wrapper can be applied to a Factor object using the " { $link com-wrap } " word. The COM interface pointer returned by " { $snippet "com-wrap" } " can then be passed to C functions requiring a COM object as a parameter. The vtables constructed by " { $snippet "" } " are stored on the non-GC heap in order to be accessible to C functions; when the wrapper object and its vtables are no longer needed, the object's resources must be freed using " { $link dispose } ".\n\nExample:" } +{ $description "Constructs a " { $link com-wrapper } " tuple. Each key in the " { $snippet "implementations" } " assoc must be the name of an interface defined with " { $link postpone: COM-INTERFACE: } ". The corresponding value must be an array of quotations implementing the methods of that interface in order, including those of its parent interfaces. The " { $snippet "IUnknown" } " methods (" { $link IUnknown::QueryInterface } ", " { $link IUnknown::AddRef } ", and " { $link IUnknown::Release } ") will be defined automatically and must not be specified in the array. These quotations should have stack effects mirroring those of the interface methods being implemented; for example, a method " { $snippet "void foobar ( int foo, int bar )" } " should be implemented with a quotation of effect " { $snippet "( this foo bar -- )" } ". The " { $snippet "this" } " parameter (that is, the leftmost parameter of any COM method) will be automatically converted from an alien pointer to the underlying Factor object before the quotation is invoked.\n\nThe resulting wrapper can be applied to a Factor object using the " { $link com-wrap } " word. The COM interface pointer returned by " { $snippet "com-wrap" } " can then be passed to C functions requiring a COM object as a parameter. The vtables constructed by " { $snippet "" } " are stored on the non-GC heap in order to be accessible to C functions; when the wrapper object and its vtables are no longer needed, the object's resources must be freed using " { $link dispose } ".\n\nExample:" } { $code " COM-INTERFACE: ISimple IUnknown {216fb341-0eb2-44b1-8edb-60b76e353abc} HRESULT returnOK ( ) diff --git a/frameworks/db/pools/pools-tests.factor b/frameworks/db/pools/pools-tests.factor index 35a79dda41..7087603fa3 100644 --- a/frameworks/db/pools/pools-tests.factor +++ b/frameworks/db/pools/pools-tests.factor @@ -7,7 +7,7 @@ io.directories namespaces accessors kernel math destructors ; { 1 0 } [ [ ] with-pooled-db ] must-infer-as ! Test behavior after image save/load -USE: db.sqlite +use: db.sqlite [ "pool-test.db" temp-file delete-file ] ignore-errors diff --git a/frameworks/furnace/furnace.factor b/frameworks/furnace/furnace.factor index 73a5ae651d..a71375987a 100644 --- a/frameworks/furnace/furnace.factor +++ b/frameworks/furnace/furnace.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. in: furnace -USE: vocabs +use: vocabs "furnace.actions" require "furnace.alloy" require "furnace.asides" require diff --git a/frameworks/furnace/utilities/utilities-tests.factor b/frameworks/furnace/utilities/utilities-tests.factor index a5e523b320..19e50614bb 100644 --- a/frameworks/furnace/utilities/utilities-tests.factor +++ b/frameworks/furnace/utilities/utilities-tests.factor @@ -13,7 +13,7 @@ dummy-vocab "dummy.factor" temp-file [ utf8 set-file-contents ] keep run-file >> { t } [ - USE: dummy-vocab + use: dummy-vocab { dummy-word "index" } resolve-template-path "index" temp-file = ] unit-test diff --git a/frameworks/game/input/input-docs.factor b/frameworks/game/input/input-docs.factor index b087671a16..19f62968b2 100644 --- a/frameworks/game/input/input-docs.factor +++ b/frameworks/game/input/input-docs.factor @@ -160,17 +160,17 @@ HELP: mouse-state { keyboard-state read-keyboard } related-words HELP: button-delta -{ $values { "old?" boolean } { "new?" boolean } { "delta" { $link pressed } ", " { $link released } ", or " { $link POSTPONE: f } } } -{ $description "Outputs a symbol representing the change in a key or button's state given a \"before\" and \"after\" sample of its state. Outputs " { $link pressed } " if " { $snippet "old?" } " is false and " { $snippet "new?" } " is true, " { $link released } " if " { $snippet "old?" } " is true and " { $snippet "new?" } " is false, or " { $link POSTPONE: f } " if the two inputs have the same boolean value." } ; +{ $values { "old?" boolean } { "new?" boolean } { "delta" { $link pressed } ", " { $link released } ", or " { $link postpone: f } } } +{ $description "Outputs a symbol representing the change in a key or button's state given a \"before\" and \"after\" sample of its state. Outputs " { $link pressed } " if " { $snippet "old?" } " is false and " { $snippet "new?" } " is true, " { $link released } " if " { $snippet "old?" } " is true and " { $snippet "new?" } " is false, or " { $link postpone: f } " if the two inputs have the same boolean value." } ; HELP: buttons-delta -{ $values { "old-buttons" sequence } { "new-buttons" sequence } { "delta" "an array of " { $link pressed } ", " { $link released } ", or " { $link POSTPONE: f } } } -{ $description "Outputs an array of symbols representing the change in a set of keys or buttons' states given \"before\" and \"after\" samples of their state. For each corresponding pair of values in the two input sequences, outputs " { $link pressed } " if " { $snippet "old-buttons" } " contains a false and " { $snippet "new-buttons" } " a true value, " { $link released } " if " { $snippet "old-buttons" } " contains true and " { $snippet "new-buttons" } " false, or " { $link POSTPONE: f } " if the two elements have the same boolean value." +{ $values { "old-buttons" sequence } { "new-buttons" sequence } { "delta" "an array of " { $link pressed } ", " { $link released } ", or " { $link postpone: f } } } +{ $description "Outputs an array of symbols representing the change in a set of keys or buttons' states given \"before\" and \"after\" samples of their state. For each corresponding pair of values in the two input sequences, outputs " { $link pressed } " if " { $snippet "old-buttons" } " contains a false and " { $snippet "new-buttons" } " a true value, " { $link released } " if " { $snippet "old-buttons" } " contains true and " { $snippet "new-buttons" } " false, or " { $link postpone: f } " if the two elements have the same boolean value." $nl "This word can be used with two samples of a " { $link keyboard-state } "'s " { $snippet "keys" } " slot or of a " { $link mouse-state } "'s or " { $link controller-state } "'s " { $snippet "buttons" } " slot to convert the button states into pressed/released values. Remember to " { $link clone } " state objects to record snapshots of their state." } ; HELP: buttons-delta-as -{ $values { "old-buttons" sequence } { "new-buttons" sequence } { "exemplar" sequence } { "delta" "a sequence of " { $link pressed } ", " { $link released } ", or " { $link POSTPONE: f } } } +{ $values { "old-buttons" sequence } { "new-buttons" sequence } { "exemplar" sequence } { "delta" "a sequence of " { $link pressed } ", " { $link released } ", or " { $link postpone: f } } } { $description "Like " { $link buttons-delta } ", but returns a sequence matching the type of the " { $snippet "exemplar" } "." } ; { button-delta buttons-delta buttons-delta-as } related-words diff --git a/frameworks/game/worlds/worlds-docs.factor b/frameworks/game/worlds/worlds-docs.factor index 766a135aee..60b7113df7 100644 --- a/frameworks/game/worlds/worlds-docs.factor +++ b/frameworks/game/worlds/worlds-docs.factor @@ -9,7 +9,7 @@ HELP: game-attributes { { $snippet "tick-interval-nanos" } " specifies the number of nanoseconds between consecutive calls to the world's " { $link tick-game-world } " method by the game loop. An integer greater than zero must be provided." } { { $snippet "use-game-input?" } " specifies whether the game world should initialize the " { $vocab-link "game.input" } " library for use by the game. False by default." } { { $snippet "use-audio-engine?" } " specifies whether the game world should manage an " { $link audio-engine } " instance. False by default." } -{ { $snippet "audio-engine-device" } " specifies the string name of the OpenAL device the audio engine, if any, should try to open. The default value of " { $link POSTPONE: f } " attempts to open the default OpenAL device." } +{ { $snippet "audio-engine-device" } " specifies the string name of the OpenAL device the audio engine, if any, should try to open. The default value of " { $link postpone: f } " attempts to open the default OpenAL device." } { { $snippet "audio-engine-voice-count" } " determines the number of independent voices the audio engine will make available. This determines how many individual audio clips can play simultaneously. This cannot exceed the OpenAL implementation's limit on supported voices." } } ; @@ -18,8 +18,8 @@ HELP: game-world $nl "The game-world tuple has the following publicly accessible slots:" { $list -{ { $snippet "game-loop" } " contains the " { $link game-loop } " instance managed by the game world. If the world is inactive, this slot will contain " { $link POSTPONE: f } "." } -{ { $snippet "audio-engine" } " contains the " { $link audio-engine } " instance managed by the game world. If the world is inactive, or the " { $snippet "use-audio-engine?" } " slot of the " { $link game-attributes } " object used to initialize the world was false, this slot will contain " { $link POSTPONE: f } "." } +{ { $snippet "game-loop" } " contains the " { $link game-loop } " instance managed by the game world. If the world is inactive, this slot will contain " { $link postpone: f } "." } +{ { $snippet "audio-engine" } " contains the " { $link audio-engine } " instance managed by the game world. If the world is inactive, or the " { $snippet "use-audio-engine?" } " slot of the " { $link game-attributes } " object used to initialize the world was false, this slot will contain " { $link postpone: f } "." } } } ; HELP: begin-game-world diff --git a/frameworks/gpu/framebuffers/framebuffers.factor b/frameworks/gpu/framebuffers/framebuffers.factor index 88bcedbec7..43cb254c3c 100644 --- a/frameworks/gpu/framebuffers/framebuffers.factor +++ b/frameworks/gpu/framebuffers/framebuffers.factor @@ -114,7 +114,7 @@ VARIANT: non-color-attachment-ref UNION: attachment-ref color-attachment-ref non-color-attachment-ref - POSTPONE: f ; + postpone: f ; TUPLE: framebuffer-rect { framebuffer any-framebuffer read-only initial: system-framebuffer } diff --git a/frameworks/gpu/render/render-docs.factor b/frameworks/gpu/render/render-docs.factor index a122b49904..5e0b31b667 100644 --- a/frameworks/gpu/render/render-docs.factor +++ b/frameworks/gpu/render/render-docs.factor @@ -93,7 +93,7 @@ HELP: define-uniform-tuple { $values { "class" class } { "superclass" class } { "uniforms" sequence } } -{ $description "Defines a new " { $link uniform-tuple } " as a subclass of " { $snippet "superclass" } " with the slots specified by the " { $link uniform } " tuple values in " { $snippet "uniforms" } ". The runtime equivalent of " { $link POSTPONE: UNIFORM-TUPLE: } ". This word must be called inside a compilation unit." } ; +{ $description "Defines a new " { $link uniform-tuple } " as a subclass of " { $snippet "superclass" } " with the slots specified by the " { $link uniform } " tuple values in " { $snippet "uniforms" } ". The runtime equivalent of " { $link postpone: UNIFORM-TUPLE: } ". This word must be called inside a compilation unit." } ; HELP: float-uniform { $class-description "This " { $link uniform-type } " indicates that a slot of a " { $link uniform-tuple } " corresponds to a float uniform parameter." } ; @@ -258,10 +258,10 @@ HELP: uniform { $class-description "Values of this tuple type are passed to " { $link define-uniform-tuple } " to define a new " { $link uniform-tuple } " type." } ; HELP: uniform-tuple -{ $class-description "The base class for tuple types defined with " { $link POSTPONE: UNIFORM-TUPLE: } ". A uniform tuple is used as part of a " { $link render-set } " to supply values for a shader program's uniform parameters. See the " { $link POSTPONE: UNIFORM-TUPLE: } " documentation for details on how uniform tuples are defined and used." } ; +{ $class-description "The base class for tuple types defined with " { $link postpone: UNIFORM-TUPLE: } ". A uniform tuple is used as part of a " { $link render-set } " to supply values for a shader program's uniform parameters. See the " { $link postpone: UNIFORM-TUPLE: } " documentation for details on how uniform tuples are defined and used." } ; HELP: uniform-type -{ $class-description { $snippet "uniform-type" } " values are used as part of a " { $link POSTPONE: UNIFORM-TUPLE: } " definition to define the types of uniform slots." } ; +{ $class-description { $snippet "uniform-type" } " values are used as part of a " { $link postpone: UNIFORM-TUPLE: } " definition to define the types of uniform slots." } ; HELP: ushort-indexes { $class-description "This " { $link index-type } " indicates that an " { $link index-elements } " or " { $link multi-index-elements } " buffer consists of two-byte unsigned short indexes." } ; @@ -303,7 +303,7 @@ ARTICLE: "gpu.render" "Rendering" render-set } { $link uniform-tuple } "s provide Factor types for containing and submitting shader uniform parameters:" -{ $subsections POSTPONE: UNIFORM-TUPLE: } +{ $subsections postpone: UNIFORM-TUPLE: } ; ABOUT: "gpu.render" diff --git a/frameworks/gpu/render/render.factor b/frameworks/gpu/render/render.factor index 1436a9cdee..e5ef4bcbd7 100755 --- a/frameworks/gpu/render/render.factor +++ b/frameworks/gpu/render/render.factor @@ -580,7 +580,7 @@ M: buffer-ptr bind-transform-feedback-output PRIVATE> -UNION: transform-feedback-output buffer buffer-range POSTPONE: f ; +UNION: transform-feedback-output buffer buffer-range postpone: f ; TUPLE: render-set { primitive-mode primitive-mode read-only } diff --git a/frameworks/gpu/shaders/shaders-docs.factor b/frameworks/gpu/shaders/shaders-docs.factor index d7c6100b8d..81875d283e 100644 --- a/frameworks/gpu/shaders/shaders-docs.factor +++ b/frameworks/gpu/shaders/shaders-docs.factor @@ -27,11 +27,11 @@ HELP: HELP: feedback-format: { $syntax "feedback-format: vertex-format" } -{ $description "When used as part of a " { $link POSTPONE: GLSL-PROGRAM: } " definition, this syntax specifies the " { $link vertex-format } " in which transform feedback output will be generated." } ; +{ $description "When used as part of a " { $link postpone: GLSL-PROGRAM: } " definition, this syntax specifies the " { $link vertex-format } " in which transform feedback output will be generated." } ; HELP: GLSL-PROGRAM: { $syntax "GLSL-PROGRAM: program-name shader shader ... [vertex-format vertex-format ...] [feedback-format: vertex-format] ;" } -{ $description "Defines a new " { $link program } " named " { $snippet "program-name" } ". When the program is instantiated with " { $link } ", it will link together instances of all of the specified " { $link shader } "s to create the program instance. If any " { $link vertex-format } "s are specified, their attributes will be pre-assigned attribute indexes at link time, to ensure that their indexes remain constant if the program is refreshed with " { $link refresh-program } ". A transform feedback vertex format may optionally be specified with " { $link POSTPONE: feedback-format: } "; if the program is used to collect transform feedback, the given vertex format will be used for the output." } +{ $description "Defines a new " { $link program } " named " { $snippet "program-name" } ". When the program is instantiated with " { $link } ", it will link together instances of all of the specified " { $link shader } "s to create the program instance. If any " { $link vertex-format } "s are specified, their attributes will be pre-assigned attribute indexes at link time, to ensure that their indexes remain constant if the program is refreshed with " { $link refresh-program } ". A transform feedback vertex format may optionally be specified with " { $link postpone: feedback-format: } "; if the program is used to collect transform feedback, the given vertex format will be used for the output." } { $notes "Transform feedback requires OpenGL 3.0 or one of the " { $snippet "GL_EXT_transform_feedback" } " or " { $snippet "GL_ARB_transform_feedback" } " extensions." } ; HELP: GLSL-SHADER-FILE: @@ -56,9 +56,9 @@ HELP: VERTEX-FORMAT: HELP: VERTEX-STRUCT: { $syntax "VERTEX-STRUCT: struct-name format-name" } -{ $description "Defines a struct class (like " { $link POSTPONE: STRUCT: } ") with the same binary format and component types as the given " { $link vertex-format } "." } ; +{ $description "Defines a struct class (like " { $link postpone: STRUCT: } ") with the same binary format and component types as the given " { $link vertex-format } "." } ; -{ POSTPONE: GLSL-PROGRAM: POSTPONE: GLSL-SHADER-FILE: POSTPONE: GLSL-SHADER: } related-words +{ postpone: GLSL-PROGRAM: postpone: GLSL-SHADER-FILE: postpone: GLSL-SHADER: } related-words HELP: attribute-index { $values @@ -72,7 +72,7 @@ HELP: { "vertex-buffer" "a " { $link buffer } " or " { $link buffer-ptr } } { "program-instance" program-instance } { "vertex-array" vertex-array } } -{ $description "Creates a new " { $link vertex-array } " from the entire contents of a single " { $link buffer } " for use with a " { $link program-instance } ". The data in " { $snippet "buffer" } " is taken in the first " { $link vertex-format } " specified in the program instance's originating " { $link POSTPONE: GLSL-PROGRAM: } " definition. If the program has no associated vertex formats, an error will be thrown. To specify a different vertex format, use " { $link } "." } ; +{ $description "Creates a new " { $link vertex-array } " from the entire contents of a single " { $link buffer } " for use with a " { $link program-instance } ". The data in " { $snippet "buffer" } " is taken in the first " { $link vertex-format } " specified in the program instance's originating " { $link postpone: GLSL-PROGRAM: } " definition. If the program has no associated vertex formats, an error will be thrown. To specify a different vertex format, use " { $link } "." } ; HELP: { $values @@ -94,13 +94,13 @@ HELP: define-vertex-format { $values { "class" class } { "vertex-attributes" sequence } } -{ $description "Defines a new " { $link vertex-format } " with the binary format specified by the " { $link vertex-attribute } " tuple values in " { $snippet "vertex-attributes" } ". The runtime equivalent of " { $link POSTPONE: VERTEX-FORMAT: } ". This word must be called inside a compilation unit." } ; +{ $description "Defines a new " { $link vertex-format } " with the binary format specified by the " { $link vertex-attribute } " tuple values in " { $snippet "vertex-attributes" } ". The runtime equivalent of " { $link postpone: VERTEX-FORMAT: } ". This word must be called inside a compilation unit." } ; HELP: define-vertex-struct { $values { "class" word } { "vertex-format" vertex-format } } -{ $description "Defines a new struct C type from a " { $link vertex-format } ". The runtime equivalent of " { $link POSTPONE: VERTEX-STRUCT: } ". This word must be called inside a compilation unit." } ; +{ $description "Defines a new struct C type from a " { $link vertex-format } ". The runtime equivalent of " { $link postpone: VERTEX-STRUCT: } ". This word must be called inside a compilation unit." } ; HELP: fragment-shader { $class-description "This " { $link shader-kind } " indicates that a " { $link shader } " is a fragment shader." } ; @@ -123,7 +123,7 @@ HELP: output-index { $notes "Named fragment shader outputs require OpenGL 3.0 or later and GLSL 1.30 or later, or OpenGL 2.0 or later and GLSL 1.20 or earlier with the " { $snippet "GL_EXT_gpu_shader4" } " extension." } ; HELP: program -{ $class-description "A " { $snippet "program" } " provides a specification for linking a " { $link program-instance } " in a graphics context. Programs are defined with " { $link POSTPONE: GLSL-PROGRAM: } " and instantiated for a context with " { $link } "." } ; +{ $class-description "A " { $snippet "program" } " provides a specification for linking a " { $link program-instance } " in a graphics context. Programs are defined with " { $link postpone: GLSL-PROGRAM: } " and instantiated for a context with " { $link } "." } ; HELP: program-instance { $class-description "A " { $snippet "program-instance" } " is a shader " { $link program } " that has been compiled and linked for a graphics context using " { $link } "." } ; @@ -135,20 +135,20 @@ HELP: refresh-program { $description "Rereads the source code for every " { $link shader } " in " { $link program } " and attempts to refresh all the existing " { $link shader-instance } "s and " { $link program-instance } "s for those shaders. If any of the new source code fails to compile or link, the existing valid shader and program instances will remain untouched. However, subsequent attempts to compile new shader or program instances will still attempt to use the new source code. If the compilation and linking succeed, the existing shader and program instances will be updated on the fly to reference the newly compiled code." } ; HELP: shader -{ $class-description "A " { $snippet "shader" } " provides a block of GLSL source code that can be compiled into a " { $link shader-instance } " in a graphics context. Shaders are defined with " { $link POSTPONE: GLSL-SHADER: } " or " { $link POSTPONE: GLSL-SHADER-FILE: } " and instantiated for a context with " { $link } "." } ; +{ $class-description "A " { $snippet "shader" } " provides a block of GLSL source code that can be compiled into a " { $link shader-instance } " in a graphics context. Shaders are defined with " { $link postpone: GLSL-SHADER: } " or " { $link postpone: GLSL-SHADER-FILE: } " and instantiated for a context with " { $link } "." } ; HELP: shader-instance { $class-description "A " { $snippet "shader-instance" } " is a " { $link shader } " that has been compiled for a graphics context using " { $link } "." } ; HELP: shader-kind -{ $class-description "A " { $snippet "shader-kind" } " value is passed as part of a " { $link POSTPONE: GLSL-SHADER: } " or " { $link POSTPONE: GLSL-SHADER-FILE: } " definition to indicate the kind of " { $link shader } " being defined." +{ $class-description "A " { $snippet "shader-kind" } " value is passed as part of a " { $link postpone: GLSL-SHADER: } " or " { $link postpone: GLSL-SHADER-FILE: } " definition to indicate the kind of " { $link shader } " being defined." { $list { { $link vertex-shader } "s run during primitive assembly and map input vertex data to positions in screen space for rasterization." } { { $link fragment-shader } "s run as part of rasterization and decide the final rendered output of a primitive as the outputs of the vertex shader are interpolated across its surface." } } } ; HELP: too-many-feedback-formats-error -{ $class-description "This error is thrown when a " { $link POSTPONE: GLSL-PROGRAM: } " definition attempts to include more than one " { $link vertex-format } " for transform feedback formatting." } ; +{ $class-description "This error is thrown when a " { $link postpone: GLSL-PROGRAM: } " definition attempts to include more than one " { $link vertex-format } " for transform feedback formatting." } ; HELP: invalid-link-feedback-format-error { $class-description "This error is thrown when the " { $link vertex-format } " specified as the transform feedback output format of a " { $link program } " is not suitable for the purpose. Transform feedback formats do not support padding (fields with a name of " { $link f } ")." } ; @@ -189,7 +189,7 @@ HELP: vertex-attribute { $class-description "This tuple type is passed to " { $link define-vertex-format } " to define a new " { $link vertex-format } " type." } ; HELP: vertex-format -{ $class-description "This class encompasses all vertex formats defined by " { $link POSTPONE: VERTEX-FORMAT: } ". A vertex format defines the binary layout of vertex attribute data in a " { $link buffer } " for use as part of a " { $link vertex-array } ". See the " { $link POSTPONE: VERTEX-FORMAT: } " documentation for details on how vertex formats are defined." } ; +{ $class-description "This class encompasses all vertex formats defined by " { $link postpone: VERTEX-FORMAT: } ". A vertex format defines the binary layout of vertex attribute data in a " { $link buffer } " for use as part of a " { $link vertex-array } ". See the " { $link postpone: VERTEX-FORMAT: } " documentation for details on how vertex formats are defined." } ; HELP: vertex-format-size { $values @@ -201,9 +201,9 @@ HELP: vertex-format-size ARTICLE: "gpu.shaders" "Shader objects" "The " { $vocab-link "gpu.shaders" } " vocabulary supports defining, compiling, and linking " { $link shader } "s into " { $link program } "s that run on the GPU and control rendering." { $subsections - POSTPONE: GLSL-PROGRAM: - POSTPONE: GLSL-SHADER: - POSTPONE: GLSL-SHADER-FILE: + postpone: GLSL-PROGRAM: + postpone: GLSL-SHADER: + postpone: GLSL-SHADER-FILE: } "A program must be instantiated for each graphics context it is used in:" { $subsections } @@ -215,7 +215,7 @@ ARTICLE: "gpu.shaders" "Shader objects" - POSTPONE: VERTEX-FORMAT: + postpone: VERTEX-FORMAT: } ; ABOUT: "gpu.shaders" diff --git a/frameworks/ui/commands/commands-docs.factor b/frameworks/ui/commands/commands-docs.factor index d67e5e29b0..8d4790889d 100644 --- a/frameworks/ui/commands/commands-docs.factor +++ b/frameworks/ui/commands/commands-docs.factor @@ -24,7 +24,7 @@ HELP: command-name { $examples { $example "USING: io ui.commands ;" - "IN: scratchpad" + "in: scratchpad" ": com-my-command ( -- ) ;" "\\ com-my-command command-name write" "My Command" diff --git a/frameworks/ui/gadgets/gadgets.factor b/frameworks/ui/gadgets/gadgets.factor index 6c37aa591f..5438e5d5c4 100644 --- a/frameworks/ui/gadgets/gadgets.factor +++ b/frameworks/ui/gadgets/gadgets.factor @@ -397,6 +397,6 @@ M: f request-focus-on 2drop ; : focus-path ( gadget -- seq ) [ focus>> ] follow ; -USE: vocabs.loader +use: vocabs.loader { "ui.gadgets" "prettyprint" } "ui.gadgets.prettyprint" require-when diff --git a/frameworks/ui/gadgets/panes/panes-docs.factor b/frameworks/ui/gadgets/panes/panes-docs.factor index 4de7a50a6b..ae6177654b 100644 --- a/frameworks/ui/gadgets/panes/panes-docs.factor +++ b/frameworks/ui/gadgets/panes/panes-docs.factor @@ -61,7 +61,7 @@ HELP: HELP: content-gadget { $values { "object" object } { "gadget/f" { $maybe gadget } } } -{ $description "This generic function may be implemented for objects in order to display a rich representation of the object in the " { $link "ui-inspector" } ". If " { $snippet "content-gadget" } " returns a gadget for an inspected object, the returned gadget is displayed under the \"Content\" heading in the inspector window. If " { $snippet "content-gadget" } " returns " { $link POSTPONE: f } ", no content section is included in the given object's inspector." } ; +{ $description "This generic function may be implemented for objects in order to display a rich representation of the object in the " { $link "ui-inspector" } ". If " { $snippet "content-gadget" } " returns a gadget for an inspected object, the returned gadget is displayed under the \"Content\" heading in the inspector window. If " { $snippet "content-gadget" } " returns " { $link postpone: f } ", no content section is included in the given object's inspector." } ; ARTICLE: "ui.gadgets.panes" "Pane gadgets" "The " { $vocab-link "ui.gadgets.panes" } " vocabulary implements panes, which display formatted text." diff --git a/frameworks/ui/theme/switching/switching.factor b/frameworks/ui/theme/switching/switching.factor index 2c5bdedd5c..8e4d51c733 100644 --- a/frameworks/ui/theme/switching/switching.factor +++ b/frameworks/ui/theme/switching/switching.factor @@ -39,7 +39,7 @@ in: ui.theme.switching listener-word-style text-color foreground update-style ! prettyprint.stylesheet - { POSTPONE: USING: POSTPONE: USE: POSTPONE: IN: } + { postpone: USING: postpone: use: postpone: in: } [ "word-style" word-prop [ dim-color foreground ] dip set-at ] each base-word-style text-color foreground update-style highlighted-word-style highlighted-word-color foreground update-style diff --git a/frameworks/ui/tools/listener/listener-docs.factor b/frameworks/ui/tools/listener/listener-docs.factor index e2514ded6e..276b5ad05f 100644 --- a/frameworks/ui/tools/listener/listener-docs.factor +++ b/frameworks/ui/tools/listener/listener-docs.factor @@ -89,7 +89,7 @@ TIP: "When you mouse over certain objects, a black border will appear. Left-clic TIP: "The status bar displays stack effects of recognized words as they are being typed in." ; -TIP: "Press " { $command interactor "completion" code-completion-popup } " to complete word, vocabulary and Unicode character names. The latter two features become available if the cursor is after a " { $link POSTPONE: USE: } ", " { $link POSTPONE: USING: } " or " { $link POSTPONE: char: } "." ; +TIP: "Press " { $command interactor "completion" code-completion-popup } " to complete word, vocabulary and Unicode character names. The latter two features become available if the cursor is after a " { $link postpone: use: } ", " { $link postpone: USING: } " or " { $link postpone: char: } "." ; TIP: "If a word's vocabulary is loaded, but not in the search path, you can use restarts to add the vocabulary to the search path. Auto-use mode (" { $command listener-gadget "toolbar" com-auto-use } ") invokes restarts automatically if there is only one restart." ; diff --git a/frameworks/ui/tools/tools-docs.factor b/frameworks/ui/tools/tools-docs.factor index d13c532d36..f032efbbd6 100644 --- a/frameworks/ui/tools/tools-docs.factor +++ b/frameworks/ui/tools/tools-docs.factor @@ -13,7 +13,7 @@ ARTICLE: "starting-ui-tools" "Starting the UI tools" { "On Mac OS X, the tools start if the " { $snippet "Factor.app" } " application bundle is run." } } "In all cases, passing the " { $snippet "-run=listener" } " command line switch starts the terminal listener instead. The UI can be started from the terminal by issuing the following command:" -{ $code "USE: threads" "[ \"ui.tools\" run ] in-thread" } ; +{ $code "use: threads" "[ \"ui.tools\" run ] in-thread" } ; ARTICLE: "ui-shortcuts" "UI tool keyboard shortcuts" "Every UI tool has its own set of keyboard shortcuts. Mouse-over a toolbar button to see its shortcut, if any, in the status bar, or press " { $snippet "F1" } " to see a list of all shortcuts supported by the tool." diff --git a/frameworks/ui/ui-docs.factor b/frameworks/ui/ui-docs.factor index 2a21ca209a..07a645ff45 100644 --- a/frameworks/ui/ui-docs.factor +++ b/frameworks/ui/ui-docs.factor @@ -80,7 +80,7 @@ HELP: raise-window HELP: with-ui { $values { "quot" { $quotation ( -- ) } } } { $description "Calls the quotation, starting the UI if necessary. If starting the UI is necessary, this word does not return and the UI will start after the quotation returns." } -{ $notes "This word should be used in the " { $link POSTPONE: main: } " word of an application that uses the UI in order for the vocabulary to work when run from either the UI listener (" { $snippet "\"my-app\" run" } ") and the command line (" { $snippet "./factor -run=my-app" } ")." } +{ $notes "This word should be used in the " { $link postpone: main: } " word of an application that uses the UI in order for the vocabulary to work when run from either the UI listener (" { $snippet "\"my-app\" run" } ") and the command line (" { $snippet "./factor -run=my-app" } ")." } { $examples "The " { $vocab-link "hello-ui" } " vocabulary implements a simple UI application which uses this word." } ; HELP: beep @@ -163,8 +163,8 @@ ARTICLE: "ui-windows" "Top-level windows" { $subsections world } "There is also syntax for defining window words, including a main window that is the entry point for a vocabulary:" { $subsections - POSTPONE: WINDOW: - POSTPONE: MAIN-WINDOW: + postpone: WINDOW: + postpone: MAIN-WINDOW: } ; ARTICLE: "ui-backend" "Developing UI backends" @@ -178,7 +178,7 @@ ARTICLE: "ui-backend" "Developing UI backends" ARTICLE: "ui-backend-init" "UI initialization and the event loop" "An UI backend is required to define a method on the " { $link (with-ui) } " word. This word should contain backend initialization, together with some boilerplate:" { $code - "IN: shells" + "in: shells" "" ": ui" " ... backend-specific initialization ..." @@ -360,7 +360,7 @@ WINDOW: hello { { title \"Hi\" } } HELP: MAIN-WINDOW: { $syntax "MAIN-WINDOW: window-word { attributes } attribute-code ;" } -{ $description "Defines a " { $link POSTPONE: main: } " word for the current vocabulary named " { $snippet "window-word" } " that opens a UI window when the vocabulary is " { $link run } ". The " { $snippet "attributes" } " specify the key-value pairs of the window's " { $link world-attributes } ". The " { $snippet "attribute-code" } " is run with the " { $snippet "world-attributes" } " on the stack; this allows the word to construct gadget objects to place in the " { $snippet "gadget" } " slot or set other runtime-dependent world attributes." } +{ $description "Defines a " { $link postpone: main: } " word for the current vocabulary named " { $snippet "window-word" } " that opens a UI window when the vocabulary is " { $link run } ". The " { $snippet "attributes" } " specify the key-value pairs of the window's " { $link world-attributes } ". The " { $snippet "attribute-code" } " is run with the " { $snippet "world-attributes" } " on the stack; this allows the word to construct gadget objects to place in the " { $snippet "gadget" } " slot or set other runtime-dependent world attributes." } { $examples "From the " { $vocab-link "hello-ui" } " vocabulary. Creates a window with the title \"Hi\" containing a label reading \"Hello world\":" { $code @@ -371,7 +371,7 @@ MAIN-WINDOW: hello { { title \"Hi\" } } \"Hello world\"