"The " { $vocab-link "alien.destructors" } " vocabulary defines a utility parsing word for defining new disposable classes."
{ $subsections POSTPONE: DESTRUCTOR: } ;
-ABOUT: "alien.destructors"
\ No newline at end of file
+ABOUT: "alien.destructors"
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
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 }" } } ;
-
HELP: get-abp
{ $values { "bitstream" bit-reader } { "abp" integer } }
{ $description "Returns the current position of the bit-reader's read cursor as a number of bits from the start of the stream. The position of the cursor in terms of bytes and bits can be read directly from the bit-reader tuple using " { $link byte-pos>> } " and " { $link bit-pos>> } "." } ;
-
{ "value" object }
}
{ $description "Receives an object from a channel. The operation is synchronous."
-" It will block the calling thread until there is data in the channel."
+" It will block the calling thread until there is data in the channel."
}
{ $see-also <channel> to } ;
HELP: <remote-channel>
{ $values { "node" "a node object" }
- { "id" "the id of the published channel on the node" }
+ { "id" "the id of the published channel on the node" }
{ "remote-channel" remote-channel }
}
{ $description "Create a remote channel that acts as a proxy for a "
"published using " { $link publish } " and the id should be the id "
"returned by " { $link publish }
}
-{ $examples
+{ $examples
{ $code "\"localhost\" 9000 <node> \"ID123456\" <remote-channel> \"foo\" over to" }
}
{ $see-also publish unpublish } ;
{ $description "Stop a previously published channel from being "
"accessible by remote nodes."
}
-{ $examples
+{ $examples
{ $code "<channel> publish unpublish" }
}
{ $see-also <remote-channel> publish } ;
{ "id" string }
}
{ $description "Make a channel accessible via remote Factor nodes. "
-"An id is returned that can be used by another node to use "
+"An id is returned that can be used by another node to use "
{ $link to } " and " { $link from } " to access the channel."
}
-{ $examples
+{ $examples
{ $code "<channel> publish" }
}
{ $see-also <remote-channel> unpublish } ;
$nl
"To start a remote node, distributed concurrency must have been started. This can be done using " { $link start-server } "."
$nl
-{ $snippet "\"myhost.com\" 9001 start-server" }
+{ $snippet "\"myhost.com\" 9001 start-server" }
$nl
"Once the node is started, channels can be published using " { $link publish }
" to be accessed remotely. " { $link publish } " returns an id which a remote node "
$nl
"Given the id from the snippet above, a remote node can put items in the channel (where 123456 is the id):"
$nl
-{ $snippet "\"myhost.com\" 9001 <node> 123456 <remote-channel>\n\"hello\" over to" }
+{ $snippet "\"myhost.com\" 9001 <node> 123456 <remote-channel>\n\"hello\" over to" }
;
ABOUT: { "remote-channels" "remote-channels" }
{ $description "Defines a new " { $link struct } " type. The syntax is nearly identical to " { $link POSTPONE: TUPLE: } "; however, there are some additional restrictions on struct types:"
{ $list
{ "Struct classes cannot have a superclass defined." }
-{ "The slots of a struct must all have a type declared. The type must be a C type." }
+{ "The slots of a struct must all have a type declared. The type must be a C type." }
{ { $link read-only } " slots on structs are not enforced, though they may be declared." }
}
"Additionally, structs may use bit fields. A slot specifier may use the syntax " { $snippet "bits: n" } " to specify that the bit width of the slot is " { $snippet "n" } ". Bit width may be specified on signed or unsigned integer slots. The layout of bit fields is not guaranteed to match that of any particular C compiler." } ;
HELP: IMPORT:
{ $syntax "IMPORT: name" }
-{ $description "Makes an Objective C class available for use." }
+{ $description "Makes an Objective C class available for use." }
{ $examples
{ $code "IMPORT: QTMovie" "QTMovie \"My Movie.mov\" <NSString> f -> movieWithFile:error:" }
} ;
HELP: nib-named
{ $values { "nib-name" string } { "anNSNib" "an instance of NSNib" } }
-{ $description "Looks up the " { $snippet ".nib" } " in the main bundle with the given name, instantiating an autoreleased NSNib object. Useful when combined with the " { $link nib-objects } " word. " { $snippet "f" } " is returned in case of error." }
+{ $description "Looks up the " { $snippet ".nib" } " in the main bundle with the given name, instantiating an autoreleased NSNib object. Useful when combined with the " { $link nib-objects } " word. " { $snippet "f" } " is returned in case of error." }
{ $see-also nib-objects } ;
HELP: nib-objects
{ $values { "anNSNib" "an instance of NSNib" } { "objects/f" { $maybe sequence } } }
-{ $description "Instantiates the top-level objects of the " { $snippet ".nib" } " file loaded by anNSNib. First create an NSNib instance using " { $link nib-named } "." }
+{ $description "Instantiates the top-level objects of the " { $snippet ".nib" } " file loaded by anNSNib. First create an NSNib instance using " { $link nib-named } "." }
{ $see-also nib-named } ;
POSTPONE: COLOR:
} ;
-ABOUT: "colors.constants"
\ No newline at end of file
+ABOUT: "colors.constants"
<gray>
} ;
-ABOUT: "colors.gray"
\ No newline at end of file
+ABOUT: "colors.gray"
}
{ $see-also "colors" } ;
-ABOUT: "colors.hsv"
\ No newline at end of file
+ABOUT: "colors.hsv"
HELP: <count-down>
{ $values { "n" "a non-negative integer" } { "count-down" count-down } }
-{ $description "Creates a new count-down latch." }
+{ $description "Creates a new count-down latch." }
{ $errors "Throws an error if the count is lower than zero." } ;
HELP: count-down
HELP: <CFArray>
{ $values { "seq" "a sequence of " { $link alien } " instances" } { "alien" "a " { $snippet "CFArray" } } }
{ $description "Creates a Core Foundation array from a Factor array." } ;
-
HELP: load-framework
{ $values { "name" "a pathname string" } }
{ $description "Loads a Core Foundation framework." } ;
-
"Defining new icons:"
{ $subsections POSTPONE: ICON: } ;
-ABOUT: "definitions.icons"
\ No newline at end of file
+ABOUT: "definitions.icons"
HELP: CONSULT:
{ $syntax """CONSULT: group class
- code ;""" }
+ code ;""" }
{ $values { "group" "a protocol, generic word or tuple class" } { "class" "a class" } { "code" "code to get the object to which the method should be forwarded" } }
{ $description "Declares that objects of " { $snippet "class" } " will delegate the generic words contained in " { $snippet "group" } " to the object returned by executing " { $snippet "code" } " with the original object as an input." { $snippet "CONSULT:" } " will overwrite any existing methods on " { $snippet "class" } " for the members of " { $snippet "group" } ", but new methods can be added after the " { $snippet "CONSULT:" } " to override the delegation." } ;
HELP: BROADCAST:
{ $syntax """BROADCAST: group class
- code ;""" }
+ code ;""" }
{ $values { "group" "a protocol, generic word or tuple class" } { "class" "a class" } { "code" "code to get the object to which the method should be forwarded" } }
{ $description "Declares that objects of " { $snippet "class" } " will delegate the generic words contained in " { $snippet "group" } " to every object in the sequence returned by executing " { $snippet "code" } " with the original object as an input." { $snippet "BROADCAST:" } " will overwrite any existing methods on " { $snippet "class" } " for the members of " { $snippet "group" } ", but new methods can be added after the " { $snippet "BROADCAST:" } " to override the delegation. Every generic word in " { $snippet "group" } " must return no outputs; otherwise, a " { $link broadcast-words-must-have-no-outputs } " error will be raised." } ;
"If a quotation does not contain any fry specifiers, then " { $link POSTPONE: '[ } " behaves just like " { $link POSTPONE: [ } ":"
{ $code "{ 10 20 30 } '[ . ] each" }
"Occurrences of " { $link _ } " on the left map directly to " { $link curry } ". That is, the following three lines are equivalent:"
-{ $code
+{ $code
"{ 10 20 30 } 5 '[ _ + ] map"
"{ 10 20 30 } 5 [ + ] curry map"
"{ 10 20 30 } [ 5 + ] map"
}
"Occurrences of " { $link _ } " in the middle of a quotation map to more complex quotation composition patterns. The following three lines are equivalent:"
-{ $code
+{ $code
"{ 10 20 30 } 5 '[ 3 _ / ] map"
"{ 10 20 30 } 5 [ 3 ] swap [ / ] curry compose map"
"{ 10 20 30 } [ 3 5 / ] map"
}
"Occurrences of " { $link @ } " are simply syntax sugar for " { $snippet "_ call" } ". The following four lines are equivalent:"
-{ $code
+{ $code
"{ 10 20 30 } [ sq ] '[ @ . ] each"
"{ 10 20 30 } [ sq ] [ call . ] curry each"
"{ 10 20 30 } [ sq ] [ . ] compose each"
} ;
{ validate-params validate-values } related-words
-
+
HELP: validation-failed
{ $description "Stops processing the current request and takes action depending on the type of the current request:"
{ $list
$nl
"A word to validate parameters and make them available as HTML form values (see " { $link "html.forms.values" } "); typically this word is invoked from the " { $slot "init" } " and " { $slot "validate" } " quotations:"
{ $subsections validate-params }
-"The above word expects an association list mapping parameter names to validator quotations; validator quotations can use the words in the "
+"The above word expects an association list mapping parameter names to validator quotations; validator quotations can use the words in the "
"Custom validation logic can invoke a word when validation fails; " { $link validate-params } " invokes this word for you:"
{ $subsections validation-failed }
"If validation fails, no more action code is executed, and the client is redirected back to the originating page, where validation errors can be displayed. Note that validation errors are rendered automatically by the " { $link "html.components" } " words, and in particular, " { $link "html.templates.chloe" } " use these words." ;
HELP: ndip
{ $values { "n" integer } }
-{ $description "A generalization of " { $link dip } " that can work "
+{ $description "A generalization of " { $link dip } " that can work "
"for any stack depth. The quotation will be called with a stack that "
"has 'n' items removed first. The 'n' items are then put back on the "
"stack. The quotation can consume and produce any number of items."
-}
+}
{ $examples
{ $example "USING: arrays generalizations kernel prettyprint ;" "1 2 [ dup ] 1 ndip 3array ." "{ 1 1 2 }" }
{ $example "USING: arrays generalizations kernel prettyprint ;" "1 2 3 [ drop ] 2 ndip 2array ." "{ 2 3 }" }
HELP: nkeep
{ $values { "n" integer } }
-{ $description "A generalization of " { $link keep } " that can work "
+{ $description "A generalization of " { $link keep } " that can work "
"for any stack depth. The first " { $snippet "n" } " items after the quotation will be "
"saved, the quotation called, and the items restored."
-}
+}
{ $examples
{ $example
"USING: generalizations kernel prettyprint"
HELP: ncurry
{ $values { "n" integer } }
{ $description "A generalization of " { $link curry } " that can work for any stack depth."
-}
+}
{ $examples
"Some core words expressed in terms of " { $link ncurry } ":"
{ $table
HELP: nwith
{ $values { "n" integer } }
{ $description "A generalization of " { $link with } " that can work for any stack depth."
-}
+}
{ $examples
"Some core words expressed in terms of " { $link nwith } ":"
{ $table
HELP: napply
{ $values { "quot" quotation } { "n" integer } }
{ $description "A generalization of " { $link bi@ } " and " { $link tri@ } " that can work for any stack depth."
-}
+}
{ $examples
"Some core words expressed in terms of " { $link napply } ":"
{ $table
HELP: ncleave
{ $values { "quots" "a sequence of quotations" } { "n" integer } }
{ $description "A generalization of " { $link cleave } " and " { $link 2cleave } " that can work for any quotation arity."
-}
+}
{ $examples
"Some core words expressed in terms of " { $link ncleave } ":"
{ $table
HELP: remove-vertex
{ $values { "vertex" object } { "edges" sequence } { "graph" "an assoc mapping vertices to sequences of edges" } }
-{ $description "Removes a vertex from a graph, using the given edges sequence." }
+{ $description "Removes a vertex from a graph, using the given edges sequence." }
{ $notes "The " { $snippet "edges" } " sequence must equal the value passed to " { $link add-vertex } ", otherwise some vertices of the graph may continue to refer to the removed vertex." }
{ $side-effects "graph" } ;
{ $values { "str" string } }
{ $description "Lists all words, vocabularies and help articles whose name contains a subsequence equal to " { $snippet "str" } ". Results are ranked using a simple distance algorithm." } ;
-TIP: "Use " { $link apropos } " to search for words, vocabularies and help articles." ;
\ No newline at end of file
+TIP: "Use " { $link apropos } " to search for words, vocabularies and help articles." ;
{ $code "\"evaluator\" help" }
{ $code "\\ + help" }
{ $code "\"io.files\" about" }
-} ;
\ No newline at end of file
+} ;
{ { $snippet "t:link" } { $link link } }
{ { $snippet "t:password" } { $link password } }
{ { $snippet "t:textarea" } { $link textarea } }
-} ;
+} ;
ARTICLE: "html.templates.chloe.tags.boilerplate" "Boilerplate Chloe tags"
"The following Chloe tags interface with the HTML templating " { $link "html.templates.boilerplate" } "."
<vhost-rewrite>
} ;
-ABOUT: "http.server.rewrite"
\ No newline at end of file
+ABOUT: "http.server.rewrite"
{ $var-description "If the inspector is running, this variable holds previously-inspected objects." } ;
HELP: &push
-{ $values { "obj" object } }
+{ $values { "obj" object } }
{ $description "If the inspector is running, outputs the object currently being inspected." } ;
HELP: inspector
HELP: delete-tree
{ $values { "path" "a pathname string" } }
{ $description "Deletes a file or directory, recursing into subdirectories." }
-{ $errors "Throws an error if the deletion fails." }
+{ $errors "Throws an error if the deletion fails." }
{ $warning "Misuse of this word can lead to catastrophic data loss." } ;
HELP: copy-tree
IN: io.encodings.8-bit.arabic
HELP: latin/arabic
-{ $var-description "This is the ISO-8859-6 encoding, also called Latin/Arabic. It is an 8-bit superset of ASCII and provides the characters necessary for Arabic, though not other languages which use Arabic script." }
+{ $var-description "This is the ISO-8859-6 encoding, also called Latin/Arabic. It is an 8-bit superset of ASCII and provides the characters necessary for Arabic, though not other languages which use Arabic script." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.arabic" "Arabic encoding"
IN: io.encodings.8-bit.cyrillic
HELP: latin/cyrillic
-{ $var-description "This is the ISO-8859-5 encoding, also called Latin/Cyrillic. It is an 8-bit superset of ASCII and provides the characters necessary for most languages which use Cyrilic, including Russian, Macedonian, Belarusian, Bulgarian, Serbian, and Ukrainian. KOI8-R is used much more commonly." }
+{ $var-description "This is the ISO-8859-5 encoding, also called Latin/Cyrillic. It is an 8-bit superset of ASCII and provides the characters necessary for most languages which use Cyrilic, including Russian, Macedonian, Belarusian, Bulgarian, Serbian, and Ukrainian. KOI8-R is used much more commonly." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.cyrillic" "Cyrillic encoding"
IN: io.encodings.8-bit.ebcdic
HELP: ebcdic
-{ $var-description "EBCDIC is an 8-bit legacy encoding designed for IBM mainframes like System/360 in the 1960s. It has since fallen into disuse. It contains large unallocated regions, and the version included here (code page 37) contains auxiliary characters in this region for English- and Portugese-speaking countries." }
+{ $var-description "EBCDIC is an 8-bit legacy encoding designed for IBM mainframes like System/360 in the 1960s. It has since fallen into disuse. It contains large unallocated regions, and the version included here (code page 37) contains auxiliary characters in this region for English- and Portugese-speaking countries." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.ebcdic" "EBCDIC encoding"
IN: io.encodings.8-bit.greek
HELP: latin/greek
-{ $description "This is the ISO-8859-7 encoding, also called Latin/Greek. It is an 8-bit superset of ASCII and provides the characters necessary for Greek written in modern monotonic orthography, or ancient Greek without accent marks." }
+{ $description "This is the ISO-8859-7 encoding, also called Latin/Greek. It is an 8-bit superset of ASCII and provides the characters necessary for Greek written in modern monotonic orthography, or ancient Greek without accent marks." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.greek" "Greek encoding"
IN: io.encodings.8-bit.koi8-r
HELP: koi8-r
-{ $var-description "KOI8-R is an 8-bit superset of ASCII which encodes the Cyrillic alphabet, as used in Russian and Bulgarian. Characters are in such an order that, if the eight bit is stripped, text is still interpretable as ASCII. Block-building characters also exist." }
+{ $var-description "KOI8-R is an 8-bit superset of ASCII which encodes the Cyrillic alphabet, as used in Russian and Bulgarian. Characters are in such an order that, if the eight bit is stripped, text is still interpretable as ASCII. Block-building characters also exist." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.koi8-r" "KOI8-R encoding"
IN: io.encodings.8-bit.latin1
HELP: latin1
-{ $var-description "This is the ISO-8859-1 encoding, also called Latin-1: Western European. It is an 8-bit superset of ASCII which is the default for a mimetype starting with 'text' and provides the characters necessary for most western European languages." }
+{ $var-description "This is the ISO-8859-1 encoding, also called Latin-1: Western European. It is an 8-bit superset of ASCII which is the default for a mimetype starting with 'text' and provides the characters necessary for most western European languages." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin1" "Latin1 encoding"
IN: io.encodings.8-bit.latin10
HELP: latin10
-{ $var-description "This is the ISO-8859-16 encoding, also called Latin-10: South-Eastern European. It is an 8-bit superset of ASCII." }
+{ $var-description "This is the ISO-8859-16 encoding, also called Latin-10: South-Eastern European. It is an 8-bit superset of ASCII." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin10" "Latin10 encoding"
IN: io.encodings.8-bit.latin2
HELP: latin2
-{ $var-description "This is the ISO-8859-2 encoding, also called Latin-2: Eastern European. It is an 8-bit superset of ASCII and provides the characters necessary for most eastern European languages." }
+{ $var-description "This is the ISO-8859-2 encoding, also called Latin-2: Eastern European. It is an 8-bit superset of ASCII and provides the characters necessary for most eastern European languages." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin2" "Latin2 encoding"
IN: io.encodings.8-bit.latin3
HELP: latin3
-{ $var-description "This is the ISO-8859-3 encoding, also called Latin-3: South European. It is an 8-bit superset of ASCII and provides the characters necessary for Turkish, Maltese and Esperanto." }
+{ $var-description "This is the ISO-8859-3 encoding, also called Latin-3: South European. It is an 8-bit superset of ASCII and provides the characters necessary for Turkish, Maltese and Esperanto." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin3" "Latin3 encoding"
IN: io.encodings.8-bit.latin4
HELP: latin4
-{ $description "This is the ISO-8859-4 encoding, also called Latin-4: North European. It is an 8-bit superset of ASCII and provides the characters necessary for Latvian, Lithuanian, Estonian, Greenlandic and Sami." }
+{ $description "This is the ISO-8859-4 encoding, also called Latin-4: North European. It is an 8-bit superset of ASCII and provides the characters necessary for Latvian, Lithuanian, Estonian, Greenlandic and Sami." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin4" "Latin4 encoding"
IN: io.encodings.8-bit.latin5
HELP: latin5
-{ $var-description "This is the ISO-8859-9 encoding, also called Latin-5: Turkish. It is an 8-bit superset of ASCII and provides the characters necessary for Turkish, similar to Latin-1 but replacing the spots used for Icelandic with characters used in Turkish." }
+{ $var-description "This is the ISO-8859-9 encoding, also called Latin-5: Turkish. It is an 8-bit superset of ASCII and provides the characters necessary for Turkish, similar to Latin-1 but replacing the spots used for Icelandic with characters used in Turkish." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin5" "Latin5 encoding"
IN: io.encodings.8-bit.latin6
HELP: latin6
-{ $var-description "This is the ISO-8859-10 encoding, also called Latin-6: Nordic. It is an 8-bit superset of ASCII containing the same characters as Latin-4, but rearranged to be of better use to nordic languages." }
+{ $var-description "This is the ISO-8859-10 encoding, also called Latin-6: Nordic. It is an 8-bit superset of ASCII containing the same characters as Latin-4, but rearranged to be of better use to nordic languages." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin6" "Latin6 encoding"
IN: io.encodings.8-bit.latin7
HELP: latin7
-{ $var-description "This is the ISO-8859-13 encoding, also called Latin-7: Baltic Rim. It is an 8-bit superset of ASCII containing all characters necessary to represent Baltic Rim languages, as previous character sets were incomplete." }
+{ $var-description "This is the ISO-8859-13 encoding, also called Latin-7: Baltic Rim. It is an 8-bit superset of ASCII containing all characters necessary to represent Baltic Rim languages, as previous character sets were incomplete." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin7" "Latin7 encoding"
IN: io.encodings.8-bit.latin8
HELP: latin8
-{ $var-description "This is the ISO-8859-14 encoding, also called Latin-8: Celtic. It is an 8-bit superset of ASCII designed for Celtic languages like Gaelic and Breton." }
+{ $var-description "This is the ISO-8859-14 encoding, also called Latin-8: Celtic. It is an 8-bit superset of ASCII designed for Celtic languages like Gaelic and Breton." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.latin8" "Latin8 encoding"
IN: io.encodings.8-bit.mac-roman
HELP: mac-roman
-{ $var-description "Mac Roman is an 8-bit superset of ASCII which was the standard encoding on Mac OS prior to version 10. It is incompatible with Latin-1 in all but a few places and ASCII, and it is suitable for encoding many Western European languages." }
+{ $var-description "Mac Roman is an 8-bit superset of ASCII which was the standard encoding on Mac OS prior to version 10. It is incompatible with Latin-1 in all but a few places and ASCII, and it is suitable for encoding many Western European languages." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.mac-roman" "Mac Roman encoding"
IN: io.encodings.8-bit.thai
HELP: latin/thai
-{ $var-description "This is the ISO-8859-11 encoding, also called Latin/Thai. It is an 8-bit superset of ASCII containing the characters necessary to represent Thai. It is basically identical to TIS-620." }
+{ $var-description "This is the ISO-8859-11 encoding, also called Latin/Thai. It is an 8-bit superset of ASCII containing the characters necessary to represent Thai. It is basically identical to TIS-620." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.thai" "Thai encoding"
IN: io.encodings.8-bit.windows-1252
HELP: windows-1252
-{ $var-description "Windows 1252 is an 8-bit superset of ASCII which is closely related to Latin-1. Control characters in the 0x80 to 0x9F range are replaced with printable characters such as the Euro symbol." }
+{ $var-description "Windows 1252 is an 8-bit superset of ASCII which is closely related to Latin-1. Control characters in the 0x80 to 0x9F range are replaced with printable characters such as the Euro symbol." }
{ $see-also "encodings-introduction" } ;
ARTICLE: "io.encodings.8-bit.windows-1252" "Windows 1252 encoding"
{ $class-description "Encoding descriptor for binary I/O." } ;
ARTICLE: "io.encodings.binary" "Binary encoding"
-"Making an encoded stream with the binary encoding is a no-op; streams with this encoding deal with byte-arrays, not strings."
+"Making an encoded stream with the binary encoding is a no-op; streams with this encoding deal with byte-arrays, not strings."
{ $subsections binary } ;
ABOUT: "io.encodings.binary"
ARTICLE: "io.encodings.euc-kr" "EUC-KR encoding"
{ $subsections euc-kr } ;
-ABOUT: "io.encodings.euc-kr"
\ No newline at end of file
+ABOUT: "io.encodings.euc-kr"
ARTICLE: "io.encodings.iana" "IANA-registered encoding names"
"The " { $vocab-link "io.encodings.iana" } " vocabulary provides words for accessing the names of encodings and the encoding descriptors corresponding to names." $nl
-"Most text encodings in common use have been registered with IANA. There is a standard set of names for each encoding. Simple conversion functions:"
+"Most text encodings in common use have been registered with IANA. There is a standard set of names for each encoding. Simple conversion functions:"
{ $subsections
name>encoding
encoding>name
ARTICLE: "io.encodings.johab" "Korean Johab encoding"
{ $subsections johab } ;
-ABOUT: "io.encodings.johab"
\ No newline at end of file
+ABOUT: "io.encodings.johab"
}
} ;
-HELP: encode
+HELP: encode
{ $values { "string" string } { "encoding" "an encoding descriptor" } { "byte-array" byte-array } }
{ $description "Converts a string into a byte array, interpreting that string with the given encoding." }
{ $examples
{ $see-also "encodings-introduction" } ;
{ utf32 utf32le utf32be } related-words
-
HELP: <buffered-port>
{ $values { "handle" "a native handle identifying an I/O resource" } { "class" class } { "port" "a new " { $link port } } }
-{ $description "Creates a new " { $link port } " using the specified native handle and a default-sized I/O buffer." }
+{ $description "Creates a new " { $link port } " using the specified native handle and a default-sized I/O buffer." }
$low-level-note ;
HELP: <input-port>
{ $values { "handle" "a native handle identifying an I/O resource" } { "input-port" "a new " { $link input-port } } }
-{ $description "Creates a new " { $link input-port } " using the specified native handle and a default-sized input buffer." }
+{ $description "Creates a new " { $link input-port } " using the specified native handle and a default-sized input buffer." }
$low-level-note ;
HELP: <output-port>
{ $values { "handle" "a native handle identifying an I/O resource" } { "output-port" "a new " { $link output-port } } }
-{ $description "Creates a new " { $link output-port } " using the specified native handle and a default-sized input buffer." }
+{ $description "Creates a new " { $link output-port } " using the specified native handle and a default-sized input buffer." }
$low-level-note ;
HELP: (wait-to-read)
} ;
ABOUT: "network-icmp"
-
with-null-reader
} ;
-ABOUT: "io.streams.null"
\ No newline at end of file
+ABOUT: "io.streams.null"
HELP: stream-exhausted
{ $values
- { "n" integer } { "stream" "an input stream" } { "word" word }
+ { "n" integer } { "stream" "an input stream" } { "word" word }
}
{ $description "The exception that gets thrown when a stream is exhausted." } ;
HELP: stream-throw-on-eof
{ $values
- { "stream" "an input stream" } { "quot" quotation }
+ { "stream" "an input stream" } { "quot" quotation }
}
{ $description "Wraps a stream in a " { $link <throws-on-eof-stream> } " tuple and calls the quotation with this stream as the " { $link input-stream } " variable. Causes a " { $link stream-exhausted } " exception to be thrown upon stream exhaustion. The stream is left open after this combinator returns." }
"This example will throw a " { $link stream-exhausted } " exception:"
HELP: >json
{ $values { "obj" object } { "string" "the object converted to JSON format" } }
-{ $description "Serializes the object into a JSON formatted string." }
+{ $description "Serializes the object into a JSON formatted string." }
{ $see-also json-print } ;
HELP: json-print
<linked-assoc>
} ;
-ABOUT: "linked-assocs"
\ No newline at end of file
+ABOUT: "linked-assocs"
kernel combinators ;
IN: match
-HELP: match
+HELP: match
{ $values { "value1" object } { "value2" object } { "bindings" assoc }
}
-{ $description "Pattern match value1 against value2. These values can be any Factor value, including sequences and tuples. The values can contain pattern variables, which are symbols that begin with '?'. The result is a hashtable of the bindings, mapping the pattern variables from one sequence to the equivalent value in the other sequence. The '_' symbol can be used to ignore the value at that point in the pattern for the match. " }
-{ $examples
+{ $description "Pattern match value1 against value2. These values can be any Factor value, including sequences and tuples. The values can contain pattern variables, which are symbols that begin with '?'. The result is a hashtable of the bindings, mapping the pattern variables from one sequence to the equivalent value in the other sequence. The '_' symbol can be used to ignore the value at that point in the pattern for the match. " }
+{ $examples
{ $unchecked-example "USE: match" "MATCH-VARS: ?a ?b ;\n{ ?a { 2 ?b } 5 } { 1 { 2 3 } _ } match ." "H{ { ?a 1 } { ?b 3 } }" }
}
{ $see-also match-cond POSTPONE: MATCH-VARS: replace-patterns match-replace } ;
HELP: match-cond
{ $values { "assoc" "a sequence of pairs" } }
-{ $description "Calls the second quotation in the first pair whose first sequence yields a successful " { $link match } " against the top of the stack. The second quotation, when called, has the hashtable returned from the " { $link match } " call bound as the top namespace so " { $link get } " can be used to retrieve the values. To have a fallthrough match clause use the '_' match variable." }
-{ $examples
+{ $description "Calls the second quotation in the first pair whose first sequence yields a successful " { $link match } " against the top of the stack. The second quotation, when called, has the hashtable returned from the " { $link match } " call bound as the top namespace so " { $link get } " can be used to retrieve the values. To have a fallthrough match clause use the '_' match variable." }
+{ $examples
{ $code "USE: match" "MATCH-VARS: ?value ;\n{ increment 346126 } {\n { { increment ?value } [ ?value do-something ] }\n { { decrement ?value } [ ?value do-something-else ] }\n { _ [ no-match-found ] }\n} match-cond" }
}
{ $see-also match POSTPONE: MATCH-VARS: replace-patterns match-replace } ;
{ $syntax "MATCH-VARS: var ... ;" }
{ $values { "var" "a match variable name beginning with '?'" } }
{ $description "Creates a symbol that can be used in " { $link match } " and " { $link match-cond } " for binding values in the matched sequence. The symbol name is created as a word that is defined to get the value of the symbol out of the current namespace. This can be used in " { $link match-cond } " to retrive the values in the quotation body." }
-{ $examples
+{ $examples
{ $code "USE: match" "MATCH-VARS: ?value ;\n{ increment 346126 } {\n { { increment ?value } [ ?value do-something ] }\n { { decrement ?value } [ ?value do-something-else ] }\n { _ [ no-match-found ] }\n} match-cond" }
}
{ $see-also match match-cond replace-patterns match-replace } ;
HELP: replace-patterns
{ $values { "object" object } { "result" object } }
-{ $description "Copy the object, replacing each occurrence of a pattern matching variable with the actual value of that variable." }
+{ $description "Copy the object, replacing each occurrence of a pattern matching variable with the actual value of that variable." }
{ $see-also match-cond POSTPONE: MATCH-VARS: match-replace } ;
HELP: match-replace
{ $values { "object" object } { "pattern1" object } { "pattern2" object } { "result" object } }
-{ $description "Matches the " { $snippet "object" } " against " { $snippet "pattern1" } ". The pattern match variables in " { $snippet "pattern1" } " are assigned the values from the matching " { $snippet "object" } ". These are then replaced into the " { $snippet "pattern2" } " pattern match variables." }
+{ $description "Matches the " { $snippet "object" } " against " { $snippet "pattern1" } ". The pattern match variables in " { $snippet "pattern1" } " are assigned the values from the matching " { $snippet "object" } ". These are then replaced into the " { $snippet "pattern2" } " pattern match variables." }
{ $examples
{ $example
"USING: match prettyprint ;"
"IN: scratchpad"
"MATCH-VARS: ?a ?b ;"
- "{ 1 2 } { ?a ?b } { ?b ?a } match-replace ."
+ "{ 1 2 } { ?a ?b } { ?b ?a } match-replace ."
"{ 2 1 }"
}
}
HELP: euler
{ $values { "phi" number } { "theta" number } { "psi" number } { "q" "a quaternion" } }
{ $description "Convert a rotation given by Euler angles (phi, theta, and psi) to a quaternion." } ;
-
"Computing the factorial of 100 with a descending range:"
{ $code "100 1 [a,b] product" }
"A range can be converted into a concrete sequence using a word such as " { $link >array } ". In most cases this is unnecessary since ranges implement the sequence protocol already. It is necessary if a mutable sequence is needed, for use with words such as " { $link set-nth } " or " { $link map! } "." ;
-
+
ABOUT: "math.ranges"
HELP: 2>fraction
{ $values { "a/b" rational } { "c/d" rational } { "a" integer } { "c" integer } { "b" "a positive integer" } { "d" "a positive integer" } }
{ $description "Extracts the numerator and denominator of two rational numbers at once." } ;
-
{ $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } sample-var ." "1" }
{ $example "USING: math.statistics prettyprint ;" "{ 1 2 3 4 } sample-var ." "1+2/3" } } ;
-HELP: population-cov
+HELP: population-cov
{ $values { "{x}" sequence } { "{y}" sequence } { "cov" "a real number" } }
{ $description "Computes the covariance of two sequences, " { $snippet "{x}" } " and " { $snippet "{y}" } "." } ;
HELP: mime-db
{ $values
-
+
{ "seq" sequence } }
{ $description "Outputs an array where the first element is a MIME type and the rest of the array is file extensions that have that MIME type." } ;
HELP: mime-types
{ $values
-
+
{ "assoc" assoc } }
{ $description "Outputs an " { $snippet "assoc" } " made from the data in the " { $link mime-db } " word where the keys are file extensions and the values are the corresponding MIME types." } ;
HELP: nonstandard-mime-types
{ $values
-
+
{ "assoc" assoc } }
{ $description "A list of Factor-specific MIME types that are added to the MIME database loaded from disk." } ;
"Mirrors are created by calling " { $link <mirror> } " or " { $link make-mirror } "." } ;
HELP: <mirror>
-{ $values { "object" object } { "mirror" mirror } }
+{ $values { "object" object } { "mirror" mirror } }
{ $description "Creates a " { $link mirror } " reflecting an object." }
{ $examples
{ $example
HELP: set-range-value
{ $values { "value" object } { "model" model } }
-{ $description "Sets the current value of a range model." }
+{ $description "Sets the current value of a range model." }
{ $side-effects "model" } ;
HELP: set-range-page-value
{ $values { "value" object } { "model" model } }
-{ $description "Sets the page size of a range model." }
+{ $description "Sets the page size of a range model." }
{ $side-effects "model" } ;
HELP: set-range-min-value
{ $values { "value" object } { "model" model } }
-{ $description "Sets the minimum value of a range model." }
+{ $description "Sets the minimum value of a range model." }
{ $side-effects "model" } ;
HELP: set-range-max-value
range-max-value*
set-range-value
set-range-page-value
- set-range-min-value
- set-range-max-value
+ set-range-min-value
+ set-range-max-value
} ;
ABOUT: "models-range"
reset-gl-functions
} ;
-ABOUT: "opengl.annotations"
\ No newline at end of file
+ABOUT: "opengl.annotations"
{ glTranslatef glTranslated glRotatef glRotated glScalef glScaled }
related-words
-
-
} ;
HELP: <gl-program>
-{ $values { "shaders" "A sequence of " { $link gl-shader } " objects." } { "program" "a new " { $link gl-program } } }
+{ $values { "shaders" "A sequence of " { $link gl-shader } " objects." } { "program" "a new " { $link gl-program } } }
{ $description "Creates a new GLSL program object, attaches all the shader objects in the " { $snippet "shaders" } " sequence, and attempts to link them. The returned object can be checked for validity by " { $link check-gl-program } " or " { $link gl-program-ok? } ". Errors and warnings generated by the GLSL linker will be collected in the info log, available from " { $link gl-program-info-log } ".\n\nWhen the program object and its attached shaders are no longer needed, it should be deleted using " { $link delete-gl-program } "." } ;
HELP: <simple-gl-program>
HELP: make-texture
{ $values { "image" image } { "id" "an OpenGL texture ID" } }
{ $description "Creates a new OpenGL texture from a pixmap image whose dimensions are equal to " { $snippet "dim" } "." } ;
-
\ No newline at end of file
"of characters separated with a dash (-) represents the "
"range of characters from the first to the second, inclusive."
{ $examples
- { $example "USING: peg peg.parsers prettyprint strings ;" "\"a\" \"_a-zA-Z\" range-pattern parse 1string ." "\"a\"" }
- { $code "USING: peg peg.parsers prettyprint ;\n\"0\" \"^0-9\" range-pattern parse => exception"}
+ { $example "USING: peg peg.parsers prettyprint strings ;" "\"a\" \"_a-zA-Z\" range-pattern parse 1string ." "\"a\"" }
+ { $code "USING: peg peg.parsers prettyprint ;\n\"0\" \"^0-9\" range-pattern parse => exception"}
}
} ;
}
{ $example "USING: math math.parser peg peg.parsers peg.search prettyprint ;" "\"one 123 two 456\" 'integer' [ 2 * number>string ] action replace ." "\"one 246 two 912\"" }
{ $see-also search } ;
-
HELP: LAZY:
{ $syntax "LAZY: word ( stack -- effect ) definition... ;" }
{ $values { "word" "a new word to define" } { "definition" "a word definition" } }
-{ $description "Creates a lazy word in the current vocabulary. When executed the word will return a " { $link promise } " that when forced, executes the word definition. Any values on the stack that are required by the word definition are captured along with the promise." }
+{ $description "Creates a lazy word in the current vocabulary. When executed the word will return a " { $link promise } " that when forced, executes the word definition. Any values on the stack that are required by the word definition are captured along with the promise." }
{ $examples
{ $example "USING: arrays sequences prettyprint promises ;" "IN: scratchpad" "LAZY: zeroes ( -- pair ) 0 zeroes 2array ;" "zeroes force second force first ." "0" }
} ;
HELP: random-bytes
{ $values { "n" integer } { "byte-array" "a random integer" } }
{ $description "Outputs an integer with n bytes worth of bits." }
-{ $examples
+{ $examples
{ $unchecked-example "USING: prettyprint random ;"
"5 random-bytes ."
"B{ 135 50 185 119 240 }"
HELP: random-integers
{ $values { "length" integer } { "n" integer } { "sequence" array } }
{ $description "Outputs an array with " { $snippet "length" } " random integers from [0,n)." }
-{ $examples
+{ $examples
{ $unchecked-example "USING: prettyprint random ;"
"10 100 random-integers ."
"{ 32 62 71 89 54 12 57 57 10 19 }"
HELP: random-units
{ $values { "length" integer } { "sequence" array } }
{ $description "Outputs an array with " { $snippet "length" } " random uniform floats from [0,1]." }
-{ $examples
+{ $examples
{ $unchecked-example "USING: prettyprint random ;"
"7 random-units ."
"{
HELP: <var-ref>
{ $values { "var" object } { "var-ref" var-ref } }
{ $description "Creates a reference to the given variable. Note that this reference behaves just like any variable when it comes to dynamic scope. For example, if you use " { $link set-ref } " in an inner scope and then leave that scope, then calling " { $link get-ref } " may not return the expected value. If this is not what you want, try using an " { $link obj-ref } " instead." } ;
-
+
HELP: global-var-ref
{ $class-description "Instances of this class reference a global variable. New global references are created by calling " { $link <global-var-ref> } "." } ;
HELP: <slot-ref>
{ $values { "tuple" tuple } { "slot" integer } { "slot-ref" slot-ref } }
{ $description "Creates a reference to the value in a particular slot of the given tuple. The slot must be given as an integer, where the first user-defined slot is number 2. This is mostly just a proof of concept until we have a way of generating this slot number from a slot name." } ;
-
+
HELP: key-ref
{ $class-description "Instances of this class identify a key in an associative structure. New key references are created by calling " { $link <key-ref> } "." } ;
{ $description "Creates a reference to the value associated with " { $snippet "key" } " in " { $snippet "assoc" } "." } ;
{ get-ref set-ref delete-ref set-ref* } related-words
-
+
{ <obj-ref> <var-ref> <global-var-ref> <slot-ref> <key-ref> <value-ref> } related-words
HELP: set-ref*
HELP: take
{ $values { "ref" ref } { "obj" object } }
{ $description "Retrieve the value of the ref and then delete it, returning the value." } ;
-
+
{ ref-on ref-off ref-inc ref-dec take } related-words
{ take delete-ref } related-words
{ on ref-on } related-words
{ $values { "n" integer } { "str" string } }
{ $description "Converts a number to its lower-case Roman Numeral equivalent." }
{ $notes "The range for this word is 1-3999, inclusive." }
-{ $examples
+{ $examples
{ $example "USING: io roman ;"
"56 >roman print"
"lvi"
{ $values { "n" integer } { "str" string } }
{ $description "Converts a number to its upper-case Roman numeral equivalent." }
{ $notes "The range for this word is 1-3999, inclusive." }
-{ $examples
+{ $examples
{ $example "USING: io roman ;"
"56 >ROMAN print"
"LVI"
{ $values { "str" string } { "n" integer } }
{ $description "Converts a Roman numeral to an integer." }
{ $notes "The range for this word is i-mmmcmxcix, inclusive." }
-{ $examples
+{ $examples
{ $example "USING: prettyprint roman ;"
"\"lvi\" roman> ."
"56"
HELP: roman+
{ $values { "x" string } { "y" string } { "z" string } }
{ $description "Adds two Roman numerals." }
-{ $examples
+{ $examples
{ $example "USING: io roman ;"
"\"v\" \"v\" roman+ print"
"x"
HELP: roman-
{ $values { "x" string } { "y" string } { "z" string } }
{ $description "Subtracts two Roman numerals." }
-{ $examples
+{ $examples
{ $example "USING: io roman ;"
"\"x\" \"v\" roman- print"
"v"
HELP: roman*
{ $values { "x" string } { "y" string } { "z" string } }
{ $description "Multiplies two Roman numerals." }
-{ $examples
+{ $examples
{ $example "USING: io roman ;"
"\"ii\" \"iii\" roman* print"
"vi"
HELP: roman/i
{ $values { "x" string } { "y" string } { "z" string } }
{ $description "Computes the integer division of two Roman numerals." }
-{ $examples
+{ $examples
{ $example "USING: io roman ;"
"\"v\" \"iv\" roman/i print"
"i"
HELP: roman/mod
{ $values { "x" string } { "y" string } { "z" string } { "w" string } }
{ $description "Computes the quotient and remainder of two Roman numerals." }
-{ $examples
+{ $examples
{ $example "USING: kernel io roman ;"
"\"v\" \"iv\" roman/mod [ print ] bi@"
"i\ni"
HELP: ROMAN:
{ $description "A parsing word that reads the next token and converts it to an integer." }
-{ $examples
+{ $examples
{ $example "USING: prettyprint roman ;"
"ROMAN: v ."
"5"
{ $description "Serializes the object to a byte array." } ;
HELP: bytes>object
-{ $values { "bytes" byte-array } { "obj" "deserialized object" }
+{ $values { "bytes" byte-array } { "obj" "deserialized object" }
}
{ $description "Deserializes an object from a byte array." } ;
{ $code """foo <struct>
5 >>a
6 >>b
-foo-vector{ } clone push""" }
+foo-vector{ } clone push""" }
"By using " { $snippet "push-new" } ", the new struct can be allocated directly from the vector and the intermediate copy can be avoided:"
{ $code """foo-vector{ } clone push-new
5 >>a
HELP: break
{ $description "A breakpoint. When this word is executed, the walker tool opens with execution suspended at the breakpoint's location." }
-{ $see-also "ui-walker" } ;
\ No newline at end of file
+{ $see-also "ui-walker" } ;
{ "executed?" boolean }
{ "coverage-state" coverage-state }
}
-{ $description "Makes a coverage tuple. Users should not call this directly." } ;
+{ $description "Makes a coverage tuple. Users should not call this directly." } ;
HELP: each-word
{ $values
- { "string" string } { "quot" quotation }
+ { "string" string } { "quot" quotation }
}
{ $description "Calls a quotation on every word in the vocabulary and its private vocabulary, if there is one." } ;
HELP: coverage.
{ $values
- { "object" object }
+ { "object" object }
}
{ $description "Calls the coverage word on all the words in a vocabalary or on a single word and prints out a report." } ;
HELP: add-coverage
{ $values
- { "object" object }
+ { "object" object }
}
{ $description "Recompiles a vocabulary with the coverage annotation. Note that the annotation tool is still disabled until you call " { $link coverage-on } "." } ;
HELP: flag-covered
{ $values
- { "coverage" object }
+ { "coverage" object }
}
{ $description "A word that sets the " { $snippet "executed?" } " slot of the coverage tuple when the covered value is true." } ;
HELP: remove-coverage
{ $values
- { "object" object }
+ { "object" object }
}
{ $description "Recompiles a vocabulary without the coverage annotation." } ;
HELP: reset-coverage
{ $values
- { "object" object }
+ { "object" object }
}
{ $description "Sets the " { $snippet "execute?" } " slot of each coverage tuple to false." } ;
"The " { $vocab-link "tools.coverage.testvocab" } " vocabulary is just a dummy vocabulary to test " { $vocab-link "tools.coverage" } "." ;
ABOUT: "tools.coverage.testvocab"
-
{ $subsections errors. }
"Batch errors are reported in the " { $link "ui.tools.error-list" } "." ;
-ABOUT: "tools.errors"
\ No newline at end of file
+ABOUT: "tools.errors"
"T{ point f 1 2 }"
} ;
-ABOUT: "tuple-arrays"
\ No newline at end of file
+ABOUT: "tuple-arrays"
{ $description "Prints the keyboard shortcut associated with " { $snippet "command" } " in the command map named " { $snippet "map" } " on the class " { $snippet "class" } "." } ;
HELP: define-command
-{ $values { "word" word } { "hash" hashtable } }
+{ $values { "word" word } { "hash" hashtable } }
{ $description "Defines a command. The hashtable can contain the following keys:"
{ $list
{ { $link +nullary+ } " - if set to a true value, the word must have stack effect " { $snippet "( -- )" } "; otherwise it must have stack effect " { $snippet "( target -- )" } }
<grid-lines>
} ;
-ABOUT: "ui.gadgets.grid-lines"
\ No newline at end of file
+ABOUT: "ui.gadgets.grid-lines"
y>line
} ;
-ABOUT: "ui.gadgets.line-support"
\ No newline at end of file
+ABOUT: "ui.gadgets.line-support"
{ invoke-presentation invoke-primary invoke-secondary } related-words
HELP: invoke-primary
-{ $values { "presentation" presentation } }
+{ $values { "presentation" presentation } }
{ $description "Invokes the " { $link primary-operation } " associated to the " { $snippet "object" } ". This word is executed when the presentation is clicked with the left mouse button." } ;
HELP: invoke-secondary
-{ $values { "presentation" presentation } }
+{ $values { "presentation" presentation } }
{ $description "Invokes the " { $link secondary-operation } " associated to the " { $snippet "object" } ". This word is executed when a list receives a " { $snippet "RET" } " key press." } ;
HELP: <presentation>
"ui.gadgets.tables.example"
} ;
-ABOUT: "ui.gadgets.tables"
\ No newline at end of file
+ABOUT: "ui.gadgets.tables"
"gl-utilities"
"text-rendering"
} ;
-
USING: help.markup help.syntax kernel ui.gadgets ;
HELP: draw-interior
-{ $values { "gadget" gadget } { "pen" object } }
+{ $values { "gadget" gadget } { "pen" object } }
{ $contract "Draws the interior of a gadget by making OpenGL calls. The " { $snippet "interior" } " slot may be set to objects implementing this generic word." } ;
HELP: draw-boundary
-{ $values { "gadget" gadget } { "pen" object } }
+{ $values { "gadget" gadget } { "pen" object } }
{ $contract "Draws the boundary of a gadget by making OpenGL calls. The " { $snippet "boundary" } " slot may be set to objects implementing this generic word." } ;
ARTICLE: "ui-pen-protocol" "UI pen protocol"
{ $var-description "The current clipping rectangle." } ;
HELP: draw-gadget*
-{ $values { "gadget" gadget } }
+{ $values { "gadget" gadget } }
{ $contract "Draws the gadget by making OpenGL calls. The top-left corner of the gadget should be drawn at the location stored in the " { $link origin } " variable." }
{ $notes "This word should not be called directly. To force a gadget to redraw, call " { $link relayout-1 } "." } ;
draw-string
} ;
-ABOUT: "text-rendering"
\ No newline at end of file
+ABOUT: "text-rendering"
{ $command-map browser-gadget "multi-touch" }
"Browsers are instances of " { $link browser-gadget } "." ;
-ABOUT: "ui-browser"
\ No newline at end of file
+ABOUT: "ui-browser"
HELP: all-group-names
{ $values
-
+
{ "seq" sequence }
}
{ $description "Returns a sequence of group names as strings." } ;
HELP: uuid1
{ $values { "string" "a UUID string" } }
-{ $description
+{ $description
"Generates a UUID (version 1) from the host ID, sequence number, "
"and current time."
} ;
HELP: uuid3
{ $values { "namespace" string } { "name" string } { "string" "a UUID string" } }
-{ $description
+{ $description
"Generates a UUID (version 3) from the MD5 hash of a namespace "
"UUID and a name."
} ;
HELP: uuid4
{ $values { "string" "a UUID string" } }
-{ $description
- "Generates a UUID (version 4) from random bits."
+{ $description
+ "Generates a UUID (version 4) from random bits."
} ;
HELP: uuid5
{ $values { "namespace" string } { "name" string } { "string" "a UUID string" } }
-{ $description
- "Generates a UUID (version 5) from the SHA-1 hash of a namespace "
+{ $description
+ "Generates a UUID (version 5) from the SHA-1 hash of a namespace "
"UUID and a name."
} ;
ARTICLE: "uuid" "UUID (Universally Unique Identifier)"
"The " { $vocab-link "uuid" } " vocabulary is used to generate UUIDs. "
"The below words can be used to generate version 1, 3, 4, and 5 UUIDs as specified in RFC 4122."
-$nl
+$nl
"If all you want is a unique ID, you should probably call " { $link uuid1 } " or " { $link uuid4 } "."
{ $subsections
uuid1
;
ABOUT: "uuid"
-
-
{ $description "Throws an error if " { $snippet "x" } " is larger than " { $snippet "n" } "." } ;
HELP: v-min-value
-{ $values { "x" integer } { "n" integer } }
+{ $values { "x" integer } { "n" integer } }
{ $description "Throws an error if " { $snippet "x" } " is smaller than " { $snippet "n" } "." } ;
HELP: v-mode
HELP: wrap-indented-string
{ $values { "string" string } { "width" integer } { "indent" "string or integer" } { "newstring" string } }
{ $description "Given a " { $snippet "string" } ", alters the whitespace in the string so that each line has no more than " { $snippet "width" } " characters, unless there is a word longer than " { $snippet "width" } ". Linear whitespace between words is converted to a single space. The " { $snippet "indent" } " can be either a " { $link string } " or a number of spaces to prepend to each line." } ;
-
ARTICLE: "wrap" "Word wrapping"
"The " { $vocab-link "wrap" } " vocabulary implements word wrapping. Wrapping can take place based on simple strings, assumed to be monospace, or abstract word objects."
-{ $vocab-subsection "String word wrapping" "wrap.strings" }
+{ $vocab-subsection "String word wrapping" "wrap.strings" }
{ $vocab-subsection "Word object wrapping" "wrap.words" } ;
HELP: with-entities
{ $values { "entities" "a hash table of strings to strings" } { "quot" "a quotation ( -- )" } }
{ $description "Calls the quotation using the given table of entity values (symbolizing, eg, that " { $snippet "&foo;" } " represents " { $snippet "\"a\"" } ") on top of the default XML entities" } ;
-
"XML interpolation has two forms for each of the words " { $link POSTPONE: <XML } " and " { $link POSTPONE: [XML } ": a fry-like form and a locals form. To splice locals in, use the syntax " { $snippet "<-variable->" } ". To splice something in from the stack, in the style of " { $vocab-link "fry" } ", use the syntax " { $snippet "<->" } ". An XML interpolation form may only use one of these styles."
$nl
"These forms can be used where a tag might go, as in " { $snippet "[XML <foo><-></foo> XML]" } " or where an attribute might go, as in " { $snippet "[XML <foo bar=<->/> XML]" } ". When an attribute is spliced in, it is not included if the value is " { $snippet "f" } " and if the value is not a string, the value is put through " { $link present } ". Here is an example of the fry style of XML interpolation:"
-{ $example
+{ $example
"""USING: splitting xml.writer xml.syntax ;
"one two three" " " split
[ [XML <item><-></item> XML] ] map
HELP: BV{
{ $syntax "BV{ elements... }" }
{ $values { "elements" "a list of bytes" } }
-{ $description "Marks the beginning of a literal byte vector. Literal byte vectors are terminated by " { $link POSTPONE: } } "." }
+{ $description "Marks the beginning of a literal byte vector. Literal byte vectors are terminated by " { $link POSTPONE: } } "." }
{ $examples { $code "BV{ 1 2 3 12 }" } } ;
{ $vocab-subsection "MD5 checksum" "checksums.md5" }
{ $vocab-subsection "SHA checksums" "checksums.sha" }
{ $vocab-subsection "Adler-32 checksum" "checksums.adler-32" }
-{ $vocab-subsection "OpenSSL checksums" "checksums.openssl" }
+{ $vocab-subsection "OpenSSL checksums" "checksums.openssl" }
{ $vocab-subsection "Internet checksum" "checksums.internet" } ;
ABOUT: "checksums"
{ $values { "n" "a non-negative integer" } { "class" class } }
{ $description "Outputs a builtin class whose instances are precisely those having a given pointer tag." }
{ $notes "The parameter " { $snippet "n" } " must be between 0 and the return value of " { $link num-types } "." } ;
-
{ $description "Parses a stack effect from the current input line." }
{ $examples "This word is used by " { $link POSTPONE: ( } " to parse stack effect declarations." }
$parsing-note ;
-
"Performs hook method combination . See " { $link POSTPONE: HOOK: } "."
} ;
-{ standard-combination hook-combination } related-words
\ No newline at end of file
+{ standard-combination hook-combination } related-words
HELP: fgetc
{ $values { "alien" "a C FILE* handle" } { "byte/f" { $maybe "an integer from 0 to 255" } } }
-{ $description "Reads a single byte from a C FILE* handle, and outputs " { $link f } " on end of file." }
+{ $description "Reads a single byte from a C FILE* handle, and outputs " { $link f } " on end of file." }
{ $errors "Throws an error if the input operation failed." } ;
HELP: fputc
{ $see-also "integers" "rationals" "floats" "complex-numbers" } ;
ABOUT: "arithmetic"
-
HELP: toggle
{ $values
- { "variable" "a variable, by convention a symbol" }
+ { "variable" "a variable, by convention a symbol" }
}
{ $description "Changes the boolean value of a variable to its opposite." } ;
HELP: with-global
{ $values
- { "quot" quotation }
+ { "quot" quotation }
}
{ $description "Runs the quotation in the global namespace." } ;
HELP: parser-quiet?
{ $var-description "A boolean controlling whether the parser will print various notes. Switched on by default. If a source file is being run for its effect on " { $link output-stream } ", this variable should remain switched on, to prevent parser notes from polluting the output." } ;
-
{ $description "Sets the logical library for subsequent " { $link POSTPONE: FUNCTION: } " and " { $link POSTPONE: SUBROUTINE: } " definitions. The given library name must have been opened with a previous call to " { $link add-fortran-library } "." } ;
HELP: add-fortran-library
-{ $values { "name" string } { "soname" string } { "fortran-abi" symbol } }
+{ $values { "name" string } { "soname" string } { "fortran-abi" symbol } }
{ $description "Opens the shared library in the file specified by " { $snippet "soname" } " under the logical name " { $snippet "name" } " so that it may be used in subsequent " { $link POSTPONE: LIBRARY: } " and " { $link fortran-invoke } " calls. Functions and subroutines from the library will be defined using the specified " { $snippet "fortran-abi" } ", which must be one of the supported " { $link "alien.fortran-abis" } "." }
;
{ $list
{ { $vocab-link "audio.engine" } " provides a high-level OpenAL-based engine for playing audio clips." }
{ { $vocab-link "audio.loader" } " reads PCM data from files on disk into " { $link audio } " objects. " { $vocab-link "audio.wav" } " and " { $vocab-link "audio.aiff" } " support specific audio file formats." }
-{ { $vocab-link "audio.vorbis" } " implements an " { $snippet "audio.engine" } " compatible generator object for decoding Ogg Vorbis audio data from a stream." }
+{ { $vocab-link "audio.vorbis" } " implements an " { $snippet "audio.engine" } " compatible generator object for decoding Ogg Vorbis audio data from a stream." }
} ;
ABOUT: "audio"
HELP: <standard-audio-engine>
{ $values
-
+
{ "engine" audio-engine }
}
{ $description "Constructs an " { $link audio-engine } " instance by calling " { $link <audio-engine> } " with the default values of " { $link f } " for the " { $snippet "device-name" } " and 16 for the " { $snippet "voice-count" } ". The engine is returned in the stopped state; to start audio processing, use " { $link start-audio } " or " { $link start-audio* } "." } ;
HELP: audio-listener
{ $class-description "A tuple class that trivially implements the " { $link "audio.engine-listener" } " with accessors on its tuple slots."
{ $list
- { { $snippet "position" } " provides the " { $link audio-position } "." }
+ { { $snippet "position" } " provides the " { $link audio-position } "." }
{ { $snippet "gain" } " provides the " { $link audio-gain } "." }
{ { $snippet "velocity" } " provides the " { $link audio-velocity } "." }
{ { $snippet "orientation" } " provides the " { $link audio-orientation } "." }
{ "listener" "an object implementing the " { $link "audio.engine-listener" } }
{ "orientation" audio-orientation }
}
-{ $description "Returns the orientation of the listener. The orientation must be returned in an " { $snippet "audio-orientation" } " tuple with the following slots:"
+{ $description "Returns the orientation of the listener. The orientation must be returned in an " { $snippet "audio-orientation" } " tuple with the following slots:"
{ $list
{ { $snippet "forward" } " is a 3-component vector indicating the direction the listener is facing." }
{ { $snippet "up" } " is a 3-component vector indicating the \"up\" direction for the listener. This vector does not need to be normal to the " { $snippet "forward" } " vector." }
HELP: audio-source
{ $class-description "A tuple class that trivially implements the " { $link "audio.engine-sources" } " with accessors on its tuple slots."
{ $list
- { { $snippet "position" } " provides the " { $link audio-position } "." }
+ { { $snippet "position" } " provides the " { $link audio-position } "." }
{ { $snippet "gain" } " provides the " { $link audio-gain } "." }
{ { $snippet "velocity" } " provides the " { $link audio-velocity } "." }
{ { $snippet "relative?" } " provides the " { $link audio-relative? } " value." }
IN: balloon-bomber
HELP: run-balloon
-{ $description
+{ $description
"Run the Balloon Bomber emulator in a new window." $nl
{ $link rom-root } " must be set to the directory containing the "
-"location of the Balloon Bomber ROM files. See "
+"location of the Balloon Bomber ROM files. See "
{ $link { "balloon-bomber" "balloon-bomber" } } " for details."
} ;
"ballbomb/tn04"
"ballbomb/tn05-1"
}
-"These are the same ROM files as used by MAME. To run the game use the "
+"These are the same ROM files as used by MAME. To run the game use the "
{ $link run-balloon } " word." $nl
-"Keys:"
+"Keys:"
{ $table
{ "Backspace" "Insert Coin" }
{ "1" "1 Player" }
IN: bitcoin.client
HELP: bitcoin-server
-{ $values
- { "string" string }
+{ $values
+ { "string" string }
}
-{ $description
+{ $description
"Returns the hostname of the json-rpc server for the bitcoin client. "
"This defaults to 'localhost' or the value of the 'bitcoin-server' "
"variable."
{ $see-also bitcoin-port bitcoin-user bitcoin-password } ;
HELP: bitcoin-port
-{ $values
- { "n" number }
+{ $values
+ { "n" number }
}
-{ $description
+{ $description
"Returns the port of the json-rpc server for the bitcoin client. "
"This defaults to '8332' or the value of the 'bitcoin-port' "
"variable."
{ $see-also bitcoin-server bitcoin-user bitcoin-password } ;
HELP: bitcoin-user
-{ $values
- { "string" string }
+{ $values
+ { "string" string }
}
-{ $description
+{ $description
"Returns the username required to authenticate with the json-rpc "
"server for the bitcoin client. This defaults to empty or the "
"value of the 'bitcoin-user' variable."
{ $see-also bitcoin-port bitcoin-server bitcoin-password } ;
HELP: bitcoin-password
-{ $values
- { "string" string }
+{ $values
+ { "string" string }
}
-{ $description
+{ $description
"Returns the password required to authenticate with the json-rpc "
"server for the bitcoin client. This returns the "
"value of the 'bitcoin-password' variable."
{ $see-also bitcoin-port bitcoin-server bitcoin-user } ;
HELP: get-addresses-by-label
-{ $values
- { "label" string }
- { "seq" sequence }
+{ $values
+ { "label" string }
+ { "seq" sequence }
}
-{ $description
+{ $description
"Returns the list of addresses with the given label."
} ;
HELP: get-balance
-{ $values
- { "n" number }
+{ $values
+ { "n" number }
}
-{ $description
+{ $description
"Returns the server's available balance."
} ;
HELP: get-block-count
-{ $values
- { "n" number }
+{ $values
+ { "n" number }
}
-{ $description
+{ $description
"Returns the number of blocks in the longest block chain."
} ;
HELP: get-block-number
-{ $values
- { "n" number }
+{ $values
+ { "n" number }
}
-{ $description
+{ $description
"Returns the block number of the latest block in the longest block chain."
} ;
HELP: get-connection-count
-{ $values
- { "n" number }
+{ $values
+ { "n" number }
}
-{ $description
+{ $description
"Returns the number of connections to other nodes."
} ;
HELP: get-difficulty
-{ $values
- { "n" number }
+{ $values
+ { "n" number }
}
-{ $description
+{ $description
"Returns the proof-of-work difficulty as a multiple of the minimum "
"difficulty."
} ;
HELP: get-generate
-{ $values
- { "?" boolean }
+{ $values
+ { "?" boolean }
}
-{ $description
+{ $description
"Returns true if the server is trying to generate bitcoins, false "
"otherwise."
} ;
HELP: set-generate
-{ $values
- { "gen" boolean }
- { "n" number }
+{ $values
+ { "gen" boolean }
+ { "n" number }
}
-{ $description
+{ $description
"If 'gen' is true, the server starts generating bitcoins. If 'gen' is "
"'false' then the server stops generating bitcoins. 'n' is the number "
"of CPU's to use while generating. A value of '-1' means use all the "
} ;
HELP: get-info
-{ $values
+{ $values
{ "result" assoc }
}
-{ $description
+{ $description
"Returns an assoc containing server information."
} ;
HELP: get-label
-{ $values
- { "address" string }
- { "label" string }
+{ $values
+ { "address" string }
+ { "label" string }
}
-{ $description
+{ $description
"Returns the label associated with the given address."
} ;
HELP: set-label
-{ $values
- { "address" string }
- { "label" string }
+{ $values
+ { "address" string }
+ { "label" string }
}
-{ $description
+{ $description
"Sets the label associateed with the given address."
} ;
HELP: remove-label
-{ $values
- { "address" string }
+{ $values
+ { "address" string }
}
-{ $description
+{ $description
"Removes the label associated with the given address."
} ;
HELP: get-new-address
-{ $values
- { "address" string }
+{ $values
+ { "address" string }
}
-{ $description
+{ $description
"Returns a new bitcoin address for receiving payments."
} ;
HELP: get-new-labelled-address
-{ $values
- { "label" string }
- { "address" string }
+{ $values
+ { "label" string }
+ { "address" string }
}
-{ $description
+{ $description
"Returns a new bitcoin address for receiving payments. The given "
"label is associated with the new address."
} ;
HELP: get-received-by-address
-{ $values
- { "address" string }
+{ $values
+ { "address" string }
{ "amount" number }
}
-{ $description
+{ $description
"Returns the total amount received by the address in transactions "
"with at least one confirmation."
} ;
HELP: get-confirmed-received-by-address
-{ $values
- { "address" string }
+{ $values
+ { "address" string }
{ "minconf" number }
{ "amount" number }
}
-{ $description
+{ $description
"Returns the total amount received by the address in transactions "
"with at least 'minconf' confirmations."
} ;
HELP: get-received-by-label
-{ $values
- { "label" string }
+{ $values
+ { "label" string }
{ "amount" number }
}
-{ $description
+{ $description
"Returns the total amount received by addresses with 'label' in transactions "
"with at least one confirmation."
} ;
HELP: get-confirmed-received-by-label
-{ $values
- { "label" string }
+{ $values
+ { "label" string }
{ "minconf" number }
{ "amount" number }
}
-{ $description
+{ $description
"Returns the total amount received by the addresses with 'label' in transactions "
"with at least 'minconf' confirmations."
} ;
HELP: list-received-by-address
-{ $values
- { "minconf" number }
+{ $values
+ { "minconf" number }
{ "include-empty" boolean }
{ "seq" sequence }
}
-{ $description
+{ $description
"Return a sequence containing an assoc of data about the payments an "
"address has received. 'include-empty' indicates whether addresses that "
"haven't received any payments should be included. 'minconf' is the "
} ;
HELP: list-received-by-label
-{ $values
- { "minconf" number }
+{ $values
+ { "minconf" number }
{ "include-empty" boolean }
{ "seq" sequence }
}
-{ $description
+{ $description
"Return a sequence containing an assoc of data about the payments that "
"addresses with the given label have received. 'include-empty' "
" indicates whether addresses that "
} ;
HELP: send-to-address
-{ $values
- { "address" string }
+{ $values
+ { "address" string }
{ "amount" number }
{ "?" boolean }
}
-{ $description
+{ $description
"Sends 'amount' from the server's available balance to 'address'. "
"'amount' is rounded to the nearest 0.01. Returns a boolean indicating "
"if the call succeeded."
} ;
HELP: stop
-{ $description
+{ $description
"Stops the bitcoin server."
} ;
HELP: list-transactions
-{ $values
- { "count" number }
+{ $values
+ { "count" number }
{ "include-generated" boolean }
{ "seq" sequence }
}
-{ $description
+{ $description
"Return's a sequence containing up to 'count' most recent transactions."
"This requires a patched bitcoin server so may not work with old or unpatched "
"servers."
} ;
-
-
USING: help.syntax help.markup brainfuck strings ;
-IN: brainfuck
+IN: brainfuck
HELP: run-brainfuck
{ $values { "code" string } }
HELP: get-brainfuck
{ $values { "code" string } { "result" string } }
-{ $description "Returns the output from a brainfuck program as a result string." }
+{ $description "Returns the output from a brainfuck program as a result string." }
{ $see-also run-brainfuck } ;
ARTICLE: { "cpu-8080" "cpu-8080" } "Intel 8080 CPU Emulator"
"The cpu-8080 library provides an emulator for the Intel 8080 CPU"
" instruction set. It is complete enough to emulate some 8080"
-" based arcade games." $nl
+" based arcade games." $nl
"The emulated CPU can load 'ROM' files from disk using the "
{ $link load-rom } " and " { $link load-rom* } " words. These expect "
"the " { $link rom-root } " variable to be set to the path "
"containing the ROM file's." ;
-ABOUT: { "cpu-8080" "cpu-8080" }
+ABOUT: { "cpu-8080" "cpu-8080" }
USING: help.markup help.syntax sequences strings ;
IN: cpu.8080.emulator
-HELP: load-rom
+HELP: load-rom
{ $values { "filename" string } { "cpu" cpu } }
-{ $description
-"Read the ROM file into the cpu's memory starting at address 0000. "
+{ $description
+"Read the ROM file into the cpu's memory starting at address 0000. "
"The filename is relative to the path stored in the " { $link rom-root }
" variable. An exception is thrown if this variable is not set."
}
HELP: load-rom*
{ $values { "seq" sequence } { "cpu" cpu } }
-{ $description
+{ $description
"Loads one or more ROM files into the cpu's memory. Each file is "
"loaded at a particular starting address. 'seq' is a sequence of "
"2 element arrays. The first element is the address and the second "
{ $see-also load-rom } ;
HELP: rom-root
-{ $description
+{ $description
"Holds the path where the ROM files are stored. Used for expanding "
"the relative filenames passed to " { $link load-rom } " and "
{ $link load-rom* } "."
HELP: FONT:
{ $syntax "\"testing\" <label> FONT: 18 serif bold ... ;" }
-{ $description "Used after a gadget to change font settings. Attributes can be in any order: the first number is set as the size, the style attributes like bold and italic will set the bold? and italic? slots, and font-names like serif or monospace will set the name slot." } ;
\ No newline at end of file
+{ $description "Used after a gadget to change font settings. Attributes can be in any order: the first number is set as the size, the style attributes like bold and italic will set the bold? and italic? slots, and font-names like serif or monospace will set the name slot." } ;
HELP: line>obj
{ $values { "line" string } }
{ $description "Process a line from the object file within the current parsing context." } ;
-
{ game-world begin-game-world end-game-world tick-game-world } related-words
ARTICLE: "game.worlds" "Game worlds"
-"The " { $vocab-link "game.worlds" } " vocabulary provides a " { $link world } " subclass that integrates with " { $vocab-link "game.loop" } " and optionally " { $vocab-link "game.input" } " and " { $vocab-link "audio.engine" } " to quickly provide game infrastructure."
+"The " { $vocab-link "game.worlds" } " vocabulary provides a " { $link world } " subclass that integrates with " { $vocab-link "game.loop" } " and optionally " { $vocab-link "game.input" } " and " { $vocab-link "audio.engine" } " to quickly provide game infrastructure."
{ $subsections
game-world
game-attributes
{ $class-description { $snippet "buffer-upload-pattern" } " values aid the graphics driver in optimizing access to " { $link buffer } " objects by declaring the frequency with which the buffer will be supplied new data."
{ $list
{ { $link stream-upload } " declares that the buffer data will only be used a few times before being deallocated by " { $link dispose } " or replaced by " { $link allocate-buffer } "." }
-{ { $link static-upload } " declares that the buffer data will be provided once and accessed frequently without modification." }
+{ { $link static-upload } " declares that the buffer data will be provided once and accessed frequently without modification." }
{ { $link dynamic-upload } " declares that the buffer data will be frequently modified." }
}
"A " { $snippet "buffer-upload-pattern" } " is only a declaration and does not actually control access to the underlying buffer data." } ;
{ $list
{ { $link draw-usage } " declares that the buffer will be supplied with data from CPU memory and read from by the GPU for vertex or texture image data." }
{ { $link read-usage } " declares that the buffer will be supplied with data from other GPU resources and read from primarily by the CPU." }
-{ { $link copy-usage } " declares that the buffer will both receive and supply data primarily for other GPU resources." }
+{ { $link copy-usage } " declares that the buffer will both receive and supply data primarily for other GPU resources." }
}
"A " { $snippet "buffer-usage-pattern" } " is only a declaration and does not actually control access to the underlying buffer data." } ;
{ "component-order" component-order } { "component-type" component-type } { "samples" { $maybe integer } } { "dim" { $maybe sequence } }
{ "renderbuffer" renderbuffer }
}
-{ $description "Creates a new " { $link renderbuffer } " object. If " { $snippet "samples" } " is not " { $link f } ", it specifies the multisampling level to use. If " { $snippet "dim" } " is not " { $link f } ", image memory of the given dimensions will be allocated for the renderbuffer; otherwise, memory will have to be allocated separately with " { $link allocate-renderbuffer } "." }
+{ $description "Creates a new " { $link renderbuffer } " object. If " { $snippet "samples" } " is not " { $link f } ", it specifies the multisampling level to use. If " { $snippet "dim" } " is not " { $link f } ", image memory of the given dimensions will be allocated for the renderbuffer; otherwise, memory will have to be allocated separately with " { $link allocate-renderbuffer } "." }
{ $notes "Renderbuffer objects require OpenGL 3.0 or one of the " { $snippet "GL_ARB_framebuffer_object" } " or " { $snippet "GL_EXT_framebuffer_object" } " extensions. Multisampled renderbuffers require OpenGL 3.0 or one of the " { $snippet "GL_ARB_framebuffer_object" } " or " { $snippet "GL_EXT_framebuffer_multisample" } " extensions." } ;
HELP: <system-attachment>
{ "Boolean vector types: " { $link bvec2-uniform } ", " { $link bvec3-uniform } ", " { $link bvec4-uniform } }
}
}
-{ "Matrix uniforms take their values either from row-major Factor " { $link sequence } "s of sequences of floats, or from " { $link alien } "s or " { $link float-array } "s referencing packed column-major arrays of floats. Matrix types are:"
+{ "Matrix uniforms take their values either from row-major Factor " { $link sequence } "s of sequences of floats, or from " { $link alien } "s or " { $link float-array } "s referencing packed column-major arrays of floats. Matrix types are:"
{ $list
{ { $link mat2-uniform } ", " { $link mat2x3-uniform } ", " { $link mat2x4-uniform } }
{ { $link mat3x2-uniform } ", " { $link mat3-uniform } ", " { $link mat3x4-uniform } }
{ $list
{ "The " { $snippet "ptr" } " slot contains a " { $link byte-array } ", " { $link alien } ", or " { $link buffer-ptr } " value referencing the beginning of the index array." }
{ "The " { $snippet "count" } " slot contains an " { $link integer } " value specifying the number of indexes to supply from the array." }
-{ "The " { $snippet "index-type" } " slot contains an " { $link index-type } " value specifying whether the array consists of " { $link ubyte-indexes } ", " { $link ushort-indexes } ", or " { $link uint-indexes } "." }
+{ "The " { $snippet "index-type" } " slot contains an " { $link index-type } " value specifying whether the array consists of " { $link ubyte-indexes } ", " { $link ushort-indexes } ", or " { $link uint-indexes } "." }
} } ;
HELP: index-range
{ { $link points-mode } " causes each element to generate a point." }
{ { $link lines-mode } " causes each pair of elements to generate a disconnected line." }
{ { $link line-strip-mode } " causes each consecutive pair of elements to generate a connected strip of lines." }
-{ { $link line-loop-mode } " causes each consecutive pair of elements to generate a connected loop of lines, with an extra line connecting the last and first elements." }
+{ { $link line-loop-mode } " causes each consecutive pair of elements to generate a connected loop of lines, with an extra line connecting the last and first elements." }
{ { $link triangles-mode } " causes every 3 elements to generate an independent triangle." }
-{ { $link triangle-strip-mode } " causes every consecutive group of 3 elements to generate a connected strip of triangles." }
+{ { $link triangle-strip-mode } " causes every consecutive group of 3 elements to generate a connected strip of triangles." }
{ { $link triangle-fan-mode } " causes a triangle to be generated from the first element and every subsequent consecutive pair of elements in a fan pattern." } } ;
{ primitive-mode points-mode lines-mode line-strip-mode line-loop-mode triangles-mode triangle-strip-mode triangle-fan-mode } related-words
HELP: <multi-vertex-array>
{ $values
{ "vertex-formats" "a list of " { $link buffer-ptr } "/" { $link vertex-format } " pairs" }
- { "program-instance" program-instance }
+ { "program-instance" program-instance }
{ "vertex-array" vertex-array }
}
{ $description "Creates a new " { $link vertex-array } " to feed data to " { $snippet "program-instance" } " from the set of " { $link buffer } "s specified in " { $snippet "vertex-formats" } ". The first element of each pair in " { $snippet "vertex-formats" } " can be either a " { $link buffer-ptr } " or a " { $link buffer } "; in the latter case, vertex data in the associated format is read from the beginning of the buffer." } ;
HELP: get-blend-state
{ $values
-
+
{ "blend-state" blend-state }
}
{ $description "Retrieves the current GPU " { $link blend-state } "." } ;
HELP: get-depth-range-state
{ $values
-
+
{ "depth-range-state" depth-range-state }
}
{ $description "Retrieves the current GPU " { $link depth-range-state } "." } ;
HELP: get-depth-state
{ $values
-
+
{ "depth-state" depth-state }
}
{ $description "Retrieves the current GPU " { $link depth-state } "." } ;
HELP: get-line-state
{ $values
-
+
{ "line-state" line-state }
}
{ $description "Retrieves the current GPU " { $link line-state } "." } ;
HELP: get-mask-state
{ $values
-
+
{ "mask-state" mask-state }
}
{ $description "Retrieves the current GPU " { $link mask-state } "." } ;
HELP: get-multisample-state
{ $values
-
+
{ "multisample-state" multisample-state }
}
{ $description "Retrieves the current GPU " { $link multisample-state } "." } ;
HELP: get-point-state
{ $values
-
+
{ "point-state" point-state }
}
{ $description "Retrieves the current GPU " { $link point-state } "." } ;
HELP: get-scissor-state
{ $values
-
+
{ "scissor-state" scissor-state }
}
{ $description "Retrieves the current GPU " { $link scissor-state } "." } ;
HELP: get-stencil-state
{ $values
-
+
{ "stencil-state" stencil-state }
}
{ $description "Retrieves the current GPU " { $link stencil-state } "." } ;
HELP: get-triangle-cull-state
{ $values
-
+
{ "triangle-cull-state" triangle-cull-state }
}
{ $description "Retrieves the current GPU " { $link triangle-cull-state } "." } ;
HELP: get-triangle-state
{ $values
-
+
{ "triangle-state" triangle-state }
}
{ $description "Retrieves the current GPU " { $link triangle-state } "." } ;
HELP: get-viewport-state
{ $values
-
+
{ "viewport-state" viewport-state }
}
{ $description "Retrieves the current GPU " { $link viewport-state } "." } ;
{ $class-description "The " { $snippet "cull" } " slot of the " { $link triangle-cull-state } " determines which triangle faces are culled, if any."
{ $list
{ { $link cull-all } " culls all triangles." }
-{ { $link cull-front } " culls front-facing triangles." }
-{ { $link cull-back } " culls back-facing triangles." }
+{ { $link cull-front } " culls front-facing triangles." }
+{ { $link cull-back } " culls back-facing triangles." }
} } ;
HELP: triangle-cull-state
HELP: cube-map-face
{ $class-description "A " { $snippet "cube-map-face" } " tuple references a single face of a " { $link texture-cube-map } " object for use with " { $link allocate-texture } ", " { $link update-texture } ", or " { $link read-texture } "."
{ $list
-{ "The " { $snippet "texture" } " slot indicates the cube map texture being referenced." }
+{ "The " { $snippet "texture" } " slot indicates the cube map texture being referenced." }
{ "The " { $snippet "axis" } " slot indicates which face to reference: " { $link +X } ", " { $link +Y } ", " { $link +Z } ", " { $link -X } ", " { $link -Y } ", or " { $link -Z } "." }
} } ;
HELP: write-dot
{ $values
- { "graph" graph } { "path" "a pathname string" } { "encoding" "a character encoding" }
+ { "graph" graph } { "path" "a pathname string" } { "encoding" "a character encoding" }
}
{ $description "Converts " { $snippet "graph" } " into its equivalent DOT code, saving the file to " { $snippet "path" } " using the given character " { $snippet "encoding" } "." } ;
IN: id3
HELP: mp3>id3
-{ $values
- { "path" "a path string" }
+{ $values
+ { "path" "a path string" }
{ "id3/f" "a tuple storing ID3v2 metadata or f" } }
{ $description "Return a tuple containing the ID3 information parsed out of the MP3 file, or " { $link f } " if no metadata is present. Words to access the ID3v1 information are here:"
{ $list
{ $description
"Encodes the specified " { $link hashtable } " as an INI configuration."
} ;
-
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: help.syntax help.markup cpu.8080.emulator ;
-IN: lunar-rescue
+IN: lunar-rescue
-HELP: run-lunar
-{ $description
+HELP: run-lunar
+{ $description
"Run the Lunar Rescue emulator in a new window." $nl
{ $link rom-root } " must be set to the directory containing the "
-"location of the Lunar Rescue ROM files. See "
+"location of the Lunar Rescue ROM files. See "
{ $link { "lunar-rescue" "lunar-rescue" } } " for details."
} ;
"lrescue/lrescue.5"
"lrescue/lrescue.6"
}
-"These are the same ROM files as used by MAME. To run the game use the "
+"These are the same ROM files as used by MAME. To run the game use the "
{ $link run-lunar } " word." $nl
-"Keys:"
+"Keys:"
{ $table
{ "Backspace" "Insert Coin" }
{ "1" "1 Player" }
HELP: stirling-fact
{ $values { "n" integer } { "fact" integer } }
{ $description "James Stirling's factorial approximation." } ;
-
IN: math.binpack
HELP: binpack
-{ $values { "items" sequence } { "#bins" "number of bins" } { "bins" "packed bins" } }
+{ $values { "items" sequence } { "#bins" "number of bins" } { "bins" "packed bins" } }
{ $description "Packs a sequence of numbers into the specified number of bins." } ;
HELP: map-binpack
-{ $values { "items" sequence } { "quot" { $quotation ( item -- weight ) } } { "#bins" "number of bins" } { "bins" "packed bins" } }
+{ $values { "items" sequence } { "quot" { $quotation ( item -- weight ) } } { "#bins" "number of bins" } { "bins" "packed bins" } }
{ $description "Packs a sequence of items into the specified number of bins, using the quotation to determine the weight." } ;
-
double-blas-matrix
complex-float-blas-matrix
complex-double-blas-matrix
-}
+}
"There are BOA constructors for all vector and matrix types, which provide the most flexibility in specifying memory layout:"
{ $subsections
<float-blas-vector>
V/n
Vneg
}
-"Vector addition:"
+"Vector addition:"
{ $subsections
n*V+V!
n*V+V
POSTPONE: svector{ POSTPONE: dvector{
POSTPONE: cvector{ POSTPONE: zvector{
} related-words
-
HELP: DERIVATIVE:
{ $description "Defines the derivative of a word by setting its " { $snippet "derivative" } " word property. Reads a word followed by " { $snippet "n" } " quotations, giving the " { $snippet "n" } " partial derivatives of the word with respect to each of its arguments successively. Each quotation should take " { $snippet "n + 1" } " inputs, where the first input is an increment and the last " { $snippet "n" } " inputs are the point at which to evaluate the derivative. The derivative should be a linear function of the increment, and should have the same number of outputs as the original word." }
-{ $examples
+{ $examples
{ $unchecked-example "USING: math math.functions math.derivatives.syntax ;"
"DERIVATIVE: sin [ cos * ]"
"DERIVATIVE: * [ nip * ] [ drop * ]" "" }
{ "word" word }
}
{ $description "Similar to " { $link execute } ", but promotes word to operate on duals." }
-{ $notes "Uses the derivative word-prop, which holds a list of quotations giving the partial derivatives of the word with respect to each of its arguments. This can be set using " { $link POSTPONE: DERIVATIVE: } ". Once a derivative has been defined for a word, dual-op makes it easy to extend the definition to dual numbers." }
-{ $examples
- { $unchecked-example "USING: math math.dual math.derivatives.syntax math.functions ;"
- "DERIVATIVE: sin [ cos * ]"
+{ $notes "Uses the derivative word-prop, which holds a list of quotations giving the partial derivatives of the word with respect to each of its arguments. This can be set using " { $link POSTPONE: DERIVATIVE: } ". Once a derivative has been defined for a word, dual-op makes it easy to extend the definition to dual numbers." }
+{ $examples
+ { $unchecked-example "USING: math math.dual math.derivatives.syntax math.functions ;"
+ "DERIVATIVE: sin [ cos * ]"
"M: dual sin \\sin dual-op ;" "" }
- { $unchecked-example "USING: math math.dual math.derivatives.syntax ;"
+ { $unchecked-example "USING: math math.dual math.derivatives.syntax ;"
"DERIVATIVE: * [ drop ] [ nip ]"
": d* ( x y -- x*y ) \ * dual-op ;" "" }
} ;
HELP: ema
{ $values { "seq" sequence } { "n" "number of periods" } { "newseq" sequence } }
-{ $description
- "Returns the Exponential Moving Average with the specified periodicity, calculated by:\n"
- { $list
+{ $description
+ "Returns the Exponential Moving Average with the specified periodicity, calculated by:\n"
+ { $list
"A = 2.0 / (N + 1)"
"EMA[t] = (A * SEQ[t]) + ((1-A) * EMA[t-1])" }
} ;
HELP: macd
{ $values { "seq" sequence } { "n1" "short number of periods" } { "n2" "long number of periods" } { "newseq" sequence } }
-{ $description
+{ $description
"Returns the Moving Average Converge of the sequence, calculated by:\n"
{ $list "MACD[t] = EMA2[t] - EMA1[t]" }
} ;
{ $description "Reverse Haar wavelet transform function." }
{ $notes "The sequence length should be a power of two." }
{ $examples { $example "USING: math.transforms.haar prettyprint ;" "{ 3 2 -1 -2 3 0 4 1 } rev-haar ." "{ 7 1 6 6 3 -5 4 2 }" } } ;
-
HELP: memcached-server
{ $var-description
"Holds an " { $link inet } " object with the address of "
- "an Memcached server."
+ "an Memcached server."
} ;
HELP: with-memcached
{ $description
"Close the connection to the " { $link memcached-server } "."
} ;
-
{ $description "Defines a method on " { $snippet "generic" } " for " { $snippet "class" } " which executes the new " { $snippet "implementation" } " code, then invokes the parent class method on " { $snippet "generic" } "." } ;
ARTICLE: "method-chains" "Method chaining syntax"
-"The " { $vocab-link "method-chains" } " vocabulary provides syntax for extending method implementations in class hierarchies."
+"The " { $vocab-link "method-chains" } " vocabulary provides syntax for extending method implementations in class hierarchies."
{ $subsections
POSTPONE: AFTER:
POSTPONE: BEFORE:
"(inserts object identified by the update selector if it doesn't exist in the collection)" } ;
HELP: PARTIAL?
-{ $values
+{ $values
{ "value" "partial?" }
}
{ $description "key which refers to a partially loaded object" } ;
HELP: lasterror
{ $values
-
+
{ "error" "error message or f" }
}
{ $description "Checks if the last operation resulted in an error on the MongoDB side"
HELP: load-collection-list
{ $values
-
+
{ "collection-list" "list of collections in the current database" }
}
{ $description "Returns a list of all collections that exist in the current database" } ;
HELP: load-index-list
{ $values
-
+
{ "index-list" "list of indexes" }
}
{ $description "Returns a list of all indexes that exist in the current database" } ;
{ "quot" "quotation to execute with the given mdb instance as context" }
}
{ $description "executes a quotation with the given mdb instance in its context" } ;
-
-
"" }
;
-ABOUT: "mongodb"
\ No newline at end of file
+ABOUT: "mongodb"
{ $description
"Requests the time from the specified NTP time server."
} ;
-
HELP: cl-marker
{ $values
-
+
{ "event" cl-event }
}
{ $description "Inserts a marker into the current command queue." } ;
HELP: cl-platforms
{ $values
-
+
{ "platforms" "sequence of cl-platform"}
}
{ $description "Returns the platforms available for OpenCL computation on this hardware." } ;
"""H{ { "foo" 1 } { "bar" 2 } }""" }
}
;
-
IN: parser-combinators.simple
HELP: 'digit'
-{ $values
+{ $values
{ "parser" "a parser object" } }
-{ $description
+{ $description
"Return a parser that consumes a single digit from "
"the input string. The numeric value of the digit "
" consumed is the result of the parse." }
{ $example "USING: lists.lazy parser-combinators parser-combinators.simple prettyprint ;" "\"123\" 'digit' parse-1 ." "1" } } ;
HELP: 'integer'
-{ $values
+{ $values
{ "parser" "a parser object" } }
-{ $description
+{ $description
"Return a parser that consumes an integer from "
"the input string. The numeric value of the integer "
" consumed is the result of the parse." }
{ $examples
{ $example "USING: lists.lazy parser-combinators parser-combinators.simple prettyprint ;" "\"123\" 'integer' parse-1 ." "123" } } ;
HELP: 'string'
-{ $values
+{ $values
{ "parser" "a parser object" } }
-{ $description
+{ $description
"Return a parser that consumes a string enclosed in "
"quotations from the input string. The string value "
" consumed is the result of the parse." }
{ $example "USING: lists.lazy parser-combinators parser-combinators.simple prettyprint ;" "\"\\\"foo\\\"\" 'string' parse-1 ." "\"foo\"" } } ;
HELP: 'bold'
-{ $values
+{ $values
{ "parser" "a parser object" } }
-{ $description
+{ $description
"Return a parser that consumes a string enclosed in "
"the '*' character from the input string. This is "
"commonly used in markup languages to indicate bold "
{ $example "USING: kernel parser-combinators parser-combinators.simple prettyprint sequences ;" "\"*foo*\" 'bold' [ \"<strong>\" \"</strong>\" surround ] <@ parse-1 ." "\"<strong>foo</strong>\"" } ;
HELP: 'italic'
-{ $values
+{ $values
{ "parser" "a parser object" } }
-{ $description
+{ $description
"Return a parser that consumes a string enclosed in "
"the '_' character from the input string. This is "
"commonly used in markup languages to indicate italic "
{ $example "USING: parser-combinators parser-combinators.simple prettyprint ;" "\"_foo_\" 'italic' parse-1 ." "\"foo\"" }
{ $example "USING: kernel parser-combinators parser-combinators.simple prettyprint sequences ;" "\"_foo_\" 'italic' [ \"<emphasis>\" \"</emphasis>\" surround ] <@ parse-1 ." "\"<emphasis>foo</emphasis>\"" } } ;
HELP: comma-list
-{ $values
+{ $values
{ "element" "a parser object" } { "parser" "a parser object" } }
-{ $description
+{ $description
"Return a parser that parses comma separated lists of elements. "
"'element' should be a parser that can parse the elements. The "
"result of the parser is a sequence of the parsed elements." }
HELP: <pop3-account>
{ $values
-
+
{ "pop3-account" pop3-account }
}
{ $description "creates a " { $link pop3-account } " object with defaults for the port and timeout slots." } ;
HELP: account
{ $values
-
+
{ "pop3-account" pop3-account }
}
{ $description "You only need to call " { $link connect } " after calling this word to reconnect to the latest accessed POP3 account." }
HELP: capa
{ $values
-
+
{ "array" array }
}
{ $description "Queries the mail server capabilities, as described in RFC 2449. It is advised to check for command support before calling the appropriate words (e.g. TOP UIDL)." } ;
HELP: consolidate
{ $values
-
+
{ "seq" sequence }
}
{ $description "Builds a sequence of email tuples, iterating over each email top and consolidating its headers with its number, uidl, and size." } ;
HELP: headers
{ $values
-
+
{ "assoc" assoc }
}
{ $description "Gathers and associates the From:, Subject:, and To: headers of each message." } ;
HELP: list
{ $values
-
+
{ "assoc" assoc }
}
{ $description "Lists each message with its number and size in bytes" } ;
HELP: count
{ $values
-
+
{ "n" fixnum }
}
{ $description "Gets the number of messages in the mailbox." } ;
HELP: uidls
{ $values
-
+
{ "assoc" assoc }
}
{ $description "Gets the POP3 UIDL (Unique IDentification Listing) of every specific message in the mailbox together with its ordinal number. UIDL provides a mechanism that avoids numbering issues between POP3 sessions by assigning a permanent and unique ID for each message." } ;
}
}
$nl
-"The messages marked for deletion are actually deleted only when " { $link close } " is called. This should be the last command you issue. "
+"The messages marked for deletion are actually deleted only when " { $link close } " is called. This should be the last command you issue. "
{ $subsections close }
{ $examples
{ $code
HELP: set-progress-bar
{ $values
- { "ratio/float" "a real number between 0 and 1" }
+ { "ratio/float" "a real number between 0 and 1" }
}
{ $description "Sets the progress-bar model in the current scope to the percent that the task has been completed." } ;
HELP: with-file-reader-progress
{ $values
- { "path" "a pathname string" } { "encoding" "an encoding" } { "quot" quotation }
+ { "path" "a pathname string" } { "encoding" "an encoding" } { "quot" quotation }
}
{ $description "Opens a file for reading, displays a progress bar, and calls the quotation for processing the file. The progress bar will automtically update every 100 milliseconds, but only if the quotation yields (by calling " { $link yield } ") so that the UI has a chance to redraw." }
{ $examples
HELP: with-progress-bar
{ $values
- { "quot" quotation }
+ { "quot" quotation }
}
{ $description "Makes a new model for a progress bar for a task that is 0% complete, sets this model in a dynamic variable in a new scope, and calls a quotation that has access to this model. Progress can be updated with " { $link set-progress-bar } "." } ;
{ { $snippet "{ name attributes... }" } " - a slot which can hold any object, with optional attributes" }
{ { $snippet "{ name class attributes... }" } " - a slot specialized to a specific class, with optional attributes" }
}
-"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
+"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
HELP: TUPLE:
{ $syntax """TUPLE: name slots ;
{ { $snippet "{ name attributes... }" } " - a slot which can hold any object, with optional attributes" }
{ { $snippet "{ name class attributes... }" } " - a slot specialized to a specific class, with optional attributes" }
}
-"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
+"Slot attributes are lists of slot attribute specifiers followed by values; a slot attribute specifier is one of " { $link initial: } " or " { $link read-only } ". See " { $link "tuple-declarations" } " for details." } ;
{
POSTPONE: ROLE:
"The role superclass:"
{ $subsections role }
"Syntax for making a new role:"
-{ $subsection POSTPONE: ROLE: }
+{ $subsection POSTPONE: ROLE: }
"Syntax for making tuples that use roles:"
-{ $subsection POSTPONE: TUPLE: }
+{ $subsection POSTPONE: TUPLE: }
"Errors with roles:"
{ $subsections multiple-inheritance-attempted role-slot-overlap } ;
IN: s3
HELP: buckets
-{ $values
- { "seq" "a sequence of " { $link bucket } " objects" }
+{ $values
+ { "seq" "a sequence of " { $link bucket } " objects" }
}
-{ $description
+{ $description
"Returns a list of " { $link bucket } " objects containing data on the buckets available on S3."}
{ $examples
{ $unchecked-example "USING: s3 ;" "buckets ." "{ }" }
;
HELP: create-bucket
-{ $values
- { "bucket" string }
+{ $values
+ { "bucket" string }
}
-{ $description
+{ $description
"Creates a bucket with the given name."
-}
+}
{ $examples
{ $unchecked-example "USING: s3 ;" "\"testbucket\" create-bucket" "" }
}
;
HELP: delete-bucket
-{ $values
- { "bucket" string }
+{ $values
+ { "bucket" string }
}
-{ $description
+{ $description
"Deletes the bucket with the given name."
-}
+}
{ $examples
{ $unchecked-example "USING: s3 ;" "\"testbucket\" delete-bucket" "" }
}
;
HELP: keys
-{ $values
- { "bucket" string }
- { "seq" "a sequence of " { $link key } " objects"}
+{ $values
+ { "bucket" string }
+ { "seq" "a sequence of " { $link key } " objects"}
}
-{ $description
+{ $description
"Returns a sequence of " { $link key } " objects. Each object in the sequence has information about the keys contained within the bucket."
-}
+}
{ $examples
{ $unchecked-example "USING: s3 ;" "\"testbucket\" keys . " "{ }" }
}
;
HELP: get-object
-{ $values
+{ $values
{ "bucket" string }
{ "key" string }
{ "response" "The HTTP response object"}
{ "data" "The data returned from the http request"}
}
-{ $description
+{ $description
"Does an HTTP request to retrieve the object in the bucket with the given key."
-}
+}
{ $examples
{ $unchecked-example "USING: s3 ;" "\"testbucket\" \"mykey\" http-get " "" }
}
{ "key" string }
{ "headers" assoc }
}
-{ $description
+{ $description
"Stores the object under the key in the given bucket. The object has "
"the given mimetype. 'headers' should contain key/values for any headers to "
"be associated with the object. 'data' is any Factor object that can be "
"used as the 'data' slot in <post-data>. If it's a <pathname> it stores "
"the contents of the file. If it's a stream, it's the contents of the "
"stream, etc."
-}
+}
{ $examples
{ $unchecked-example "USING: s3 ;" "\"hello\" binary encode \"text/plain\" \"testbucket\" \"hello.txt\" H{ { \"x-amz-acl\" \"public-read\" } } put-object" "" }
{ $unchecked-example "USING: s3 ;" "\"hello.txt\" <pathname> \"text/plain\" \"testbucket\" \"hello.txt\" H{ { \"x-amz-acl\" \"public-read\" } } put-object" "" }
;
HELP: delete-object
-{ $values
+{ $values
{ "bucket" string }
{ "key" string }
}
-{ $description
+{ $description
"Deletes the object in the bucket with the given key."
-}
+}
{ $examples
{ $unchecked-example "USING: s3 ;" "\"testbucket\" \"mykey\" delete-object" "" }
}
"The " { $vocab-link "s3" } " vocabulary provides a wrapper to the Amazon "
"Simple Storage Service API."
$nl
-"To use the api you must set the variables " { $link key-id } " and "
+"To use the api you must set the variables " { $link key-id } " and "
{ $link secret-key } " to your Amazon S3 key and secret key respectively. Once "
"this is done you can call any of the words below."
{ $subsections buckets
! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: help.syntax help.markup cpu.8080.emulator ;
-IN: space-invaders
+IN: space-invaders
HELP: run-invaders
-{ $description
+{ $description
"Run the Space Invaders emulator in a new window." $nl
{ $link rom-root } " must be set to the directory containing the "
-"location of the Space Invaders ROM files. See "
+"location of the Space Invaders ROM files. See "
{ $link { "space-invaders" "space-invaders" } } " for details."
} ;
"invaders/invaders.g"
"invaders/invaders.h"
}
-"These are the same ROM files as used by MAME. To run the game use the "
+"These are the same ROM files as used by MAME. To run the game use the "
{ $link run-invaders } " word." $nl
-"Keys:"
+"Keys:"
{ $table
{ "Backspace" "Insert Coin" }
{ "1" "1 Player" }
"If you save the Factor image while a game is running, when you restart "
"the image the game continues where it left off." ;
-ABOUT: { "space-invaders" "space-invaders" }
+ABOUT: { "space-invaders" "space-invaders" }
USING: help.syntax help.markup assocs ;
-IN: trees.avl
+IN: trees.avl
HELP: AVL{
{ $syntax "AVL{ { key value }... }" }
USING: help.syntax help.markup assocs ;
-IN: trees.splay
+IN: trees.splay
HELP: SPLAY{
{ $syntax "SPLAY{ { key value }... }" }
} ;
HELP: add-timer
-{ $values { "word" word } }
+{ $values { "word" word } }
{ $description "annotates the word with timing code which stores timing information globally. You can then view the info with print-word-timings"
} ;
HELP: add-timers
-{ $values { "vocab" string } }
+{ $values { "vocab" string } }
{ $description "annotates all the words in the vocab with timer code. After profiling you can remove the annotations with reset-vocab"
} ;
HELP: reset-vocab
-{ $values { "vocab" string } }
+{ $values { "vocab" string } }
{ $description "removes the annotations from all the words in the vocab"
} ;
{ $description "Resets the wordtimer hash and runs the quotation. After the quotation has run it prints out the timed words"
} ;
-
+
ARTICLE: "wordtimer" "Word Timer"
"The " { $vocab-link "wordtimer" } " vocabulary measures accumulated execution time for words. If you just want to profile the accumulated time taken by all words in a vocab you can use " { $link profile-vocab } ". If you need more fine grained control then do the following: First annotate individual words with the " { $link add-timer } " word or whole vocabularies with " { $link add-timers } ". Then use " { $link wordtimer-call } " to invoke a quotation and print out the timings." ;
-
+
ABOUT: "wordtimer"