factor: Rename I[ ]I to [I I]. Fix places where we do "string"token without whitespace.
parent
33d96f7623
commit
43fb73fae6
|
@ -18,7 +18,7 @@ IN: alien.remote-control.tests
|
||||||
image-path :> image
|
image-path :> image
|
||||||
|
|
||||||
[
|
[
|
||||||
I[
|
[I
|
||||||
#include <vm/master.h>
|
#include <vm/master.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -34,7 +34,7 @@ int main(int argc, char **argv)
|
||||||
printf("Done.\n");
|
printf("Done.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
]I
|
I]
|
||||||
] with-string-writer
|
] with-string-writer
|
||||||
[ compile-file ] with-temp-directory
|
[ compile-file ] with-temp-directory
|
||||||
[ run-test ] with-temp-directory ;
|
[ run-test ] with-temp-directory ;
|
||||||
|
|
|
@ -18,7 +18,7 @@ HELP: architecture
|
||||||
{ $var-description "Bootstrap architecture name" } ;
|
{ $var-description "Bootstrap architecture name" } ;
|
||||||
|
|
||||||
HELP: bootstrap-startup-quot
|
HELP: bootstrap-startup-quot
|
||||||
{ $var-description "This image's startup quotation or " { $link f } ". "} ;
|
{ $var-description "This image's startup quotation or " { $link f } ". " } ;
|
||||||
|
|
||||||
HELP: define-sub-primitive
|
HELP: define-sub-primitive
|
||||||
{ $values { "quot" quotation } { "word" word } }
|
{ $values { "quot" quotation } { "word" word } }
|
||||||
|
|
|
@ -64,7 +64,7 @@ IN: compiler.cfg.stacks.local.tests
|
||||||
}
|
}
|
||||||
} [
|
} [
|
||||||
3 D 0 replace-loc [
|
3 D 0 replace-loc [
|
||||||
"eh",
|
"eh" ,
|
||||||
replaces get height-state get emit-changes
|
replaces get height-state get emit-changes
|
||||||
] V{ } make
|
] V{ } make
|
||||||
] cfg-unit-test
|
] cfg-unit-test
|
||||||
|
|
|
@ -7,4 +7,4 @@ textedit editor-class set-global
|
||||||
|
|
||||||
M: textedit editor-command ( file line -- command )
|
M: textedit editor-command ( file line -- command )
|
||||||
drop
|
drop
|
||||||
[ "open" , "-a" , "TextEdit", , ] { } make ;
|
[ "open" , "-a" , "TextEdit" , , ] { } make ;
|
||||||
|
|
|
@ -47,8 +47,8 @@ CONSTANT: key-tab 0x002b
|
||||||
CONSTANT: key-space 0x002c
|
CONSTANT: key-space 0x002c
|
||||||
CONSTANT: key-- 0x002d
|
CONSTANT: key-- 0x002d
|
||||||
CONSTANT: key-= 0x002e
|
CONSTANT: key-= 0x002e
|
||||||
CONSTANT: key-[ 0x002f
|
CONSTANT: key-lbracket 0x002f
|
||||||
CONSTANT: key-] 0x0030
|
CONSTANT: key-rbracket 0x0030
|
||||||
CONSTANT: key-\ 0x0031
|
CONSTANT: key-\ 0x0031
|
||||||
CONSTANT: key-#-non-us 0x0032
|
CONSTANT: key-#-non-us 0x0032
|
||||||
CONSTANT: key-; 0x0033
|
CONSTANT: key-; 0x0033
|
||||||
|
|
|
@ -269,7 +269,7 @@ HELP: n*quot
|
||||||
"[ + + + ]"
|
"[ + + + ]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{ $description "Construct a quotation containing the contents of " { $snippet "seq" } " repeated " { $snippet "n"} " times." } ;
|
{ $description "Construct a quotation containing the contents of " { $snippet "seq" } " repeated " { $snippet "n" } " times." } ;
|
||||||
|
|
||||||
ARTICLE: "shuffle-generalizations" "Generalized shuffle words"
|
ARTICLE: "shuffle-generalizations" "Generalized shuffle words"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
|
|
|
@ -34,7 +34,7 @@ IN: gobject-introspection.loader
|
||||||
: xml>type ( xml -- type )
|
: xml>type ( xml -- type )
|
||||||
dup name>> main>> {
|
dup name>> main>> {
|
||||||
{ "type" [ xml>simple-type ] }
|
{ "type" [ xml>simple-type ] }
|
||||||
{ "array"[ xml>array-type ] }
|
{ "array" [ xml>array-type ] }
|
||||||
{ "callback" [ xml>inner-callback-type ] }
|
{ "callback" [ xml>inner-callback-type ] }
|
||||||
{ "varargs" [ xml>varargs-type ] }
|
{ "varargs" [ xml>varargs-type ] }
|
||||||
} case ;
|
} case ;
|
||||||
|
|
|
@ -189,7 +189,7 @@ $nl
|
||||||
"Now if you press " { $command tool "common" refresh-all } ", the source file should reload without any errors. You can run unit tests again, and this time, they will all pass:"
|
"Now if you press " { $command tool "common" refresh-all } ", the source file should reload without any errors. You can run unit tests again, and this time, they will all pass:"
|
||||||
{ $code "\"palindrome\" test" }
|
{ $code "\"palindrome\" test" }
|
||||||
$nl
|
$nl
|
||||||
"Congratulations, you have now completed " { $link "first-program" } "!";
|
"Congratulations, you have now completed " { $link "first-program" } "!" ;
|
||||||
|
|
||||||
ARTICLE: "first-program" "Your first program"
|
ARTICLE: "first-program" "Your first program"
|
||||||
"In this tutorial, we will write a simple Factor program which prompts the user to enter a word, and tests if it is a palindrome (that is, the word is spelled the same backwards and forwards)."
|
"In this tutorial, we will write a simple Factor program which prompts the user to enter a word, and tests if it is a palindrome (that is, the word is spelled the same backwards and forwards)."
|
||||||
|
|
|
@ -40,6 +40,6 @@ IN: interpolate.tests
|
||||||
{ "Oops, I accidentally the whole economy..." } [
|
{ "Oops, I accidentally the whole economy..." } [
|
||||||
[let
|
[let
|
||||||
"economy" :> noun
|
"economy" :> noun
|
||||||
"accidentally" [ I[ Oops, I ${0} the whole ${noun}...]I ] with-string-writer
|
"accidentally" [ [I Oops, I ${0} the whole ${noun}...I] ] with-string-writer
|
||||||
]
|
]
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
|
@ -76,6 +76,6 @@ MACRO: interpolate ( str -- quot )
|
||||||
: interpolate-locals ( str -- quot )
|
: interpolate-locals ( str -- quot )
|
||||||
[ dup search [ [ ] ] [ [ get ] ] ?if ] interpolate-quot ;
|
[ dup search [ [ ] ] [ [ get ] ] ?if ] interpolate-quot ;
|
||||||
|
|
||||||
SYNTAX: I[
|
SYNTAX: [I
|
||||||
"]I" parse-multiline-string
|
"I]" parse-multiline-string
|
||||||
interpolate-locals append! ;
|
interpolate-locals append! ;
|
||||||
|
|
|
@ -3,13 +3,13 @@ kernel quotations sequences math ;
|
||||||
IN: math.statistics
|
IN: math.statistics
|
||||||
|
|
||||||
HELP: geometric-mean
|
HELP: geometric-mean
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the geometric mean of all elements in " { $snippet "seq" } ". The geometric mean measures the central tendency of a data set and minimizes the effects of extreme values." }
|
{ $description "Computes the geometric mean of all elements in " { $snippet "seq" } ". The geometric mean measures the central tendency of a data set and minimizes the effects of extreme values." }
|
||||||
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } geometric-mean ." "1.81712059283214" } }
|
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } geometric-mean ." "1.81712059283214" } }
|
||||||
{ $errors "Throws a " { $link signal-error. } " (square-root of 0) if the sequence is empty." } ;
|
{ $errors "Throws a " { $link signal-error. } " (square-root of 0) if the sequence is empty." } ;
|
||||||
|
|
||||||
HELP: harmonic-mean
|
HELP: harmonic-mean
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the harmonic mean of the elements in " { $snippet "seq" } ". The harmonic mean is appropriate when the average of rates is desired." }
|
{ $description "Computes the harmonic mean of the elements in " { $snippet "seq" } ". The harmonic mean is appropriate when the average of rates is desired." }
|
||||||
{ $notes "Positive reals only." }
|
{ $notes "Positive reals only." }
|
||||||
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } harmonic-mean ." "6/11" } }
|
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } harmonic-mean ." "6/11" } }
|
||||||
|
@ -21,13 +21,13 @@ HELP: kth-smallest
|
||||||
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 3 1 2 } 1 kth-smallest ." "2" } } ;
|
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 3 1 2 } 1 kth-smallest ." "2" } } ;
|
||||||
|
|
||||||
HELP: mean
|
HELP: mean
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the arithmetic mean of the elements in " { $snippet "seq" } "." }
|
{ $description "Computes the arithmetic mean of the elements in " { $snippet "seq" } "." }
|
||||||
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } mean ." "2" } }
|
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } mean ." "2" } }
|
||||||
{ $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ;
|
{ $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ;
|
||||||
|
|
||||||
HELP: median
|
HELP: median
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the median of " { $snippet "seq" } " by finding the middle element of the sequence using " { $link kth-smallest } ". If there is an even number of elements in the sequence, the median is not unique, so the mean of the two middle values is output." }
|
{ $description "Computes the median of " { $snippet "seq" } " by finding the middle element of the sequence using " { $link kth-smallest } ". If there is an even number of elements in the sequence, the median is not unique, so the mean of the two middle values is output." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } median ." "2" }
|
{ $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } median ." "2" }
|
||||||
|
@ -35,7 +35,7 @@ HELP: median
|
||||||
{ $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ;
|
{ $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ;
|
||||||
|
|
||||||
HELP: range
|
HELP: range
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the difference of the maximum and minimum values in " { $snippet "seq" } "." }
|
{ $description "Computes the difference of the maximum and minimum values in " { $snippet "seq" } "." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } range ." "2" }
|
{ $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } range ." "2" }
|
||||||
|
@ -52,20 +52,20 @@ HELP: minmax
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: sample-std
|
HELP: sample-std
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the sample standard deviation of " { $snippet "seq" } ", which is the square root of the sample variance. It measures how widely spread the values in a sequence are about the mean for a random subset of a dataset." }
|
{ $description "Computes the sample standard deviation of " { $snippet "seq" } ", which is the square root of the sample variance. It measures how widely spread the values in a sequence are about the mean for a random subset of a dataset." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: math.statistics prettyprint ;" "{ 7 8 9 } sample-std ." "1.0" } } ;
|
{ $example "USING: math.statistics prettyprint ;" "{ 7 8 9 } sample-std ." "1.0" } } ;
|
||||||
|
|
||||||
HELP: sample-ste
|
HELP: sample-ste
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the standard error of the mean for " { $snippet "seq" } ". It's defined as the standard deviation divided by the square root of the length of the sequence, and measures uncertainty associated with the estimate of the mean." }
|
{ $description "Computes the standard error of the mean for " { $snippet "seq" } ". It's defined as the standard deviation divided by the square root of the length of the sequence, and measures uncertainty associated with the estimate of the mean." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: math.statistics prettyprint ;" "{ -2 2 } sample-ste ." "2.0" }
|
{ $example "USING: math.statistics prettyprint ;" "{ -2 2 } sample-ste ." "2.0" }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: sample-var
|
HELP: sample-var
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $values { "seq" sequence } { "x" "a non-negative real number" } }
|
||||||
{ $description "Computes the variance of " { $snippet "seq" } ". It's a measurement of the spread of values in a sequence." }
|
{ $description "Computes the variance of " { $snippet "seq" } ". It's a measurement of the spread of values in a sequence." }
|
||||||
{ $notes "If the number of elements in " { $snippet "seq" } " is 1 or less, it outputs 0." }
|
{ $notes "If the number of elements in " { $snippet "seq" } " is 1 or less, it outputs 0." }
|
||||||
{ $examples
|
{ $examples
|
||||||
|
|
|
@ -45,7 +45,7 @@ HELP: bind-texture-unit
|
||||||
{ $description "Binds texture " { $snippet "id" } " to texture target " { $snippet "target" } " of texture unit " { $snippet "unit" } ". Equivalent to " { $snippet "unit glActiveTexture target id glBindTexture" } "." } ;
|
{ $description "Binds texture " { $snippet "id" } " to texture target " { $snippet "target" } " of texture unit " { $snippet "unit" } ". Equivalent to " { $snippet "unit glActiveTexture target id glBindTexture" } "." } ;
|
||||||
|
|
||||||
HELP: set-draw-buffers
|
HELP: set-draw-buffers
|
||||||
{ $values { "buffers" "A sequence of buffer words (e.g. " { $snippet "GL_BACK" } ", " { $snippet "GL_COLOR_ATTACHMENT0" } ")"} }
|
{ $values { "buffers" "A sequence of buffer words (e.g. " { $snippet "GL_BACK" } ", " { $snippet "GL_COLOR_ATTACHMENT0" } ")" } }
|
||||||
{ $description "Wrapper for " { $link glDrawBuffers } ". Sets up the buffers named in the sequence for simultaneous drawing." } ;
|
{ $description "Wrapper for " { $link glDrawBuffers } ". Sets up the buffers named in the sequence for simultaneous drawing." } ;
|
||||||
|
|
||||||
HELP: do-attribs
|
HELP: do-attribs
|
||||||
|
|
|
@ -16,14 +16,14 @@ HELP: gl-shader
|
||||||
HELP: vertex-shader
|
HELP: vertex-shader
|
||||||
{ $class-description { $snippet "vertex-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_VERTEX_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following vertex shader-specific functions are defined:"
|
{ $class-description { $snippet "vertex-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_VERTEX_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following vertex shader-specific functions are defined:"
|
||||||
{ $list
|
{ $list
|
||||||
{ { $link <vertex-shader> } " - Compile GLSL code into a vertex shader object "}
|
{ { $link <vertex-shader> } " - Compile GLSL code into a vertex shader object " }
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: fragment-shader
|
HELP: fragment-shader
|
||||||
{ $class-description { $snippet "fragment-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_FRAGMENT_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following fragment shader-specific functions are defined:"
|
{ $class-description { $snippet "fragment-shader" } " is the predicate class of " { $link gl-shader } " objects that refer to shaders of type " { $snippet "GL_FRAGMENT_SHADER" } ". In addition to the " { $snippet "gl-shader" } " words, the following fragment shader-specific functions are defined:"
|
||||||
{ $list
|
{ $list
|
||||||
{ { $link <fragment-shader> } " - Compile GLSL code into a fragment shader object "}
|
{ { $link <fragment-shader> } " - Compile GLSL code into a fragment shader object " }
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ HELP: at-least-n
|
||||||
} { $description
|
} { $description
|
||||||
"Returns a parser that matches n or more repetitions of the input parser."
|
"Returns a parser that matches n or more repetitions of the input parser."
|
||||||
} { $examples
|
} { $examples
|
||||||
{ $code "USING: peg peg.parsers prettyprint ;" "\"aaa\" \"a\" token 4 at-least-n parse => exception"}
|
{ $code "USING: peg peg.parsers prettyprint ;" "\"aaa\" \"a\" token 4 at-least-n parse => exception" }
|
||||||
{ $example "USING: peg peg.parsers prettyprint ;" "\"aaaa\" \"a\" token 4 at-least-n parse ." "V{ \"a\" \"a\" \"a\" \"a\" }" }
|
{ $example "USING: peg peg.parsers prettyprint ;" "\"aaaa\" \"a\" token 4 at-least-n parse ." "V{ \"a\" \"a\" \"a\" \"a\" }" }
|
||||||
{ $example "USING: peg peg.parsers prettyprint ;" "\"aaaaa\" \"a\" token 4 at-least-n parse ." "V{ \"a\" \"a\" \"a\" \"a\" \"a\" }" }
|
{ $example "USING: peg peg.parsers prettyprint ;" "\"aaaaa\" \"a\" token 4 at-least-n parse ." "V{ \"a\" \"a\" \"a\" \"a\" \"a\" }" }
|
||||||
} { $see-also exactly-n at-most-n from-m-to-n } ;
|
} { $see-also exactly-n at-most-n from-m-to-n } ;
|
||||||
|
@ -174,6 +174,6 @@ HELP: range-pattern
|
||||||
"range of characters from the first to the second, inclusive."
|
"range of characters from the first to the second, inclusive."
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $example "USING: peg peg.parsers prettyprint strings ;" "\"a\" \"_a-zA-Z\" range-pattern parse 1string ." "\"a\"" }
|
{ $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"}
|
{ $code "USING: peg peg.parsers prettyprint ;\n\"0\" \"^0-9\" range-pattern parse => exception" }
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
|
@ -7,7 +7,7 @@ HELP: tokenize
|
||||||
"Tokenize a string. Supported syntax:"
|
"Tokenize a string. Supported syntax:"
|
||||||
{ $list
|
{ $list
|
||||||
{ { $snippet "foo bar baz" } " - simple tokens" }
|
{ { $snippet "foo bar baz" } " - simple tokens" }
|
||||||
{ { $snippet "foo\\ bar" } " - token with an escaped space"}
|
{ { $snippet "foo\\ bar" } " - token with an escaped space" }
|
||||||
{ { $snippet "\"foo bar\"" } " - quoted token" }
|
{ { $snippet "\"foo bar\"" } " - quoted token" }
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
|
@ -44,7 +44,7 @@ HELP: <string>
|
||||||
{ $description "Creates a new string with the given length and all characters initially set to " { $snippet "ch" } "." } ;
|
{ $description "Creates a new string with the given length and all characters initially set to " { $snippet "ch" } "." } ;
|
||||||
|
|
||||||
HELP: 1string
|
HELP: 1string
|
||||||
{ $values { "ch" "a character"} { "str" string } }
|
{ $values { "ch" "a character" } { "str" string } }
|
||||||
{ $description "Outputs a string of one character." } ;
|
{ $description "Outputs a string of one character." } ;
|
||||||
|
|
||||||
HELP: >string
|
HELP: >string
|
||||||
|
|
|
@ -18,7 +18,7 @@ HELP: amb
|
||||||
;
|
;
|
||||||
|
|
||||||
HELP: cut-amb
|
HELP: cut-amb
|
||||||
{ $description "Reset the amb system. Calling this word resets the whole stack of " { $link amb } " calls and should not be done lightly."}
|
{ $description "Reset the amb system. Calling this word resets the whole stack of " { $link amb } " calls and should not be done lightly." }
|
||||||
{ $see-also amb fail }
|
{ $see-also amb fail }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ CONSTANT: key-locations H{
|
||||||
{ key-i { { 85 25 } { 10 10 } } }
|
{ key-i { { 85 25 } { 10 10 } } }
|
||||||
{ key-o { { 95 25 } { 10 10 } } }
|
{ key-o { { 95 25 } { 10 10 } } }
|
||||||
{ key-p { { 105 25 } { 10 10 } } }
|
{ key-p { { 105 25 } { 10 10 } } }
|
||||||
{ key-[ { { 115 25 } { 10 10 } } }
|
{ key-lbracket { { 115 25 } { 10 10 } } }
|
||||||
{ key-] { { 125 25 } { 10 10 } } }
|
{ key-rbracket { { 125 25 } { 10 10 } } }
|
||||||
{ key-\ { { 135 25 } { 15 10 } } }
|
{ key-\ { { 135 25 } { 15 10 } } }
|
||||||
|
|
||||||
{ key-caps-lock { { 0 35 } { 20 10 } } }
|
{ key-caps-lock { { 0 35 } { 20 10 } } }
|
||||||
|
|
|
@ -70,7 +70,7 @@ HELP: stop-control
|
||||||
{ $description "Removes the connection between the gadget and it's model" } ;
|
{ $description "Removes the connection between the gadget and it's model" } ;
|
||||||
ARTICLE: "images.viewer" "Displaying Images"
|
ARTICLE: "images.viewer" "Displaying Images"
|
||||||
"The " { $vocab-link "images.viewer" } " vocabulary uses the " { $vocab-link "opengl.textures" }
|
"The " { $vocab-link "images.viewer" } " vocabulary uses the " { $vocab-link "opengl.textures" }
|
||||||
" vocabulary to display any instance of " { $link image } "."$nl
|
" vocabulary to display any instance of " { $link image } "." $nl
|
||||||
"An " { $link image-gadget } " can be used for static images and " { $instance image-control }
|
"An " { $link image-gadget } " can be used for static images and " { $instance image-control }
|
||||||
" for changing images (for example a video feed). For changing images, the image should be contained in " { $instance model }
|
" for changing images (for example a video feed). For changing images, the image should be contained in " { $instance model }
|
||||||
". Change the model value with " { $link set-model } " or mutate the image and call "
|
". Change the model value with " { $link set-model } " or mutate the image and call "
|
||||||
|
|
|
@ -113,7 +113,7 @@ M: mb-writer dispose drop ;
|
||||||
] unit-test
|
] unit-test
|
||||||
] spawning-irc
|
] spawning-irc
|
||||||
|
|
||||||
[ { join_ "#factortest"} [
|
[ { join_ "#factortest" } [
|
||||||
"#factortest" <irc-channel-chat> [ %add-named-chat ] keep
|
"#factortest" <irc-channel-chat> [ %add-named-chat ] keep
|
||||||
{ ":factorbot!n=factorbo@some.where JOIN :#factortest"
|
{ ":factorbot!n=factorbo@some.where JOIN :#factortest"
|
||||||
":ircserver.net 353 factorbot @ #factortest :@factorbot "
|
":ircserver.net 353 factorbot @ #factortest :@factorbot "
|
||||||
|
|
|
@ -47,7 +47,7 @@ HELP: unpack-dual
|
||||||
ARTICLE: "math.dual" "Dual Numbers"
|
ARTICLE: "math.dual" "Dual Numbers"
|
||||||
"The " { $vocab-link "math.dual" } " vocabulary implements dual numbers, along with arithmetic methods for working with them. Many of the functions in " { $vocab-link "math.functions" } " are extended to work with dual numbers."
|
"The " { $vocab-link "math.dual" } " vocabulary implements dual numbers, along with arithmetic methods for working with them. Many of the functions in " { $vocab-link "math.functions" } " are extended to work with dual numbers."
|
||||||
$nl
|
$nl
|
||||||
"Dual numbers are ordered pairs " { $snippet "<o,e>"} "--an ordinary part and an epsilon part--with component-wise addition and multiplication defined by "{ $snippet "<o1,e1>*<o2,e2> = <o1*o2,e1*o2 + e2*o1>" } ". They are analagous to complex numbers with " { $snippet "i^2 = 0" } "instead of " { $snippet "i^2 = -1" } ". For well-behaved functions " { $snippet "f" } ", " { $snippet "f(<o1,e1>) = f(o1) + e1*f'(o1)" } ", where " { $snippet "f'"} " is the derivative of " { $snippet "f" } "."
|
"Dual numbers are ordered pairs " { $snippet "<o,e>" } "--an ordinary part and an epsilon part--with component-wise addition and multiplication defined by " { $snippet "<o1,e1>*<o2,e2> = <o1*o2,e1*o2 + e2*o1>" } ". They are analagous to complex numbers with " { $snippet "i^2 = 0" } "instead of " { $snippet "i^2 = -1" } ". For well-behaved functions " { $snippet "f" } ", " { $snippet "f(<o1,e1>) = f(o1) + e1*f'(o1)" } ", where " { $snippet "f'" } " is the derivative of " { $snippet "f" } "."
|
||||||
;
|
;
|
||||||
|
|
||||||
ABOUT: "math.dual"
|
ABOUT: "math.dual"
|
||||||
|
|
|
@ -39,6 +39,6 @@ HELP: <kochanek-bartels-curve>
|
||||||
{ $description "Creates a sequence of cubic hermite curves (each a sequence of polynomials) passing through the given points, generating tangents with the given tuning parameters." } ;
|
{ $description "Creates a sequence of cubic hermite curves (each a sequence of polynomials) passing through the given points, generating tangents with the given tuning parameters." } ;
|
||||||
|
|
||||||
ARTICLE: "math.splines" "Common parametric curves."
|
ARTICLE: "math.splines" "Common parametric curves."
|
||||||
"The curve creating functions create sequences of polynomials, one for each degree of the input points. The spline creating functions create sequences of these curve polynomial sequences. The " { $vocab-link "math.splines.viewer" } " vocabulary provides a gadget to evaluate the generated polynomials and view the results.";
|
"The curve creating functions create sequences of polynomials, one for each degree of the input points. The spline creating functions create sequences of these curve polynomial sequences. The " { $vocab-link "math.splines.viewer" } " vocabulary provides a gadget to evaluate the generated polynomials and view the results." ;
|
||||||
|
|
||||||
ABOUT: "math.splines"
|
ABOUT: "math.splines"
|
||||||
|
|
|
@ -125,7 +125,7 @@ HELP: cl-platform
|
||||||
HELP: cl-platforms
|
HELP: cl-platforms
|
||||||
{ $values
|
{ $values
|
||||||
|
|
||||||
{ "platforms" "sequence of cl-platform"}
|
{ "platforms" "sequence of cl-platform" }
|
||||||
}
|
}
|
||||||
{ $description "Returns the platforms available for OpenCL computation on this hardware." } ;
|
{ $description "Returns the platforms available for OpenCL computation on this hardware." } ;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ USING: help.markup help.syntax kernel ;
|
||||||
|
|
||||||
HELP: breset
|
HELP: breset
|
||||||
{ $values { "quot" { $quotation ( r -- v ) } } }
|
{ $values { "quot" { $quotation ( r -- v ) } } }
|
||||||
{ $description "Marks the boundary of the partial continuation. The quotation has stack effect " { $snippet "( r -- v )" } ", where " { $snippet "r" } " identifies the " { $link breset } " in scope and should be passed to "{ $link bshift } " to mark the boundary of the continuation." }
|
{ $description "Marks the boundary of the partial continuation. The quotation has stack effect " { $snippet "( r -- v )" } ", where " { $snippet "r" } " identifies the " { $link breset } " in scope and should be passed to " { $link bshift } " to mark the boundary of the continuation." }
|
||||||
{ $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ;
|
{ $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ;
|
||||||
|
|
||||||
HELP: bshift
|
HELP: bshift
|
||||||
|
|
|
@ -8,7 +8,7 @@ HELP: buckets
|
||||||
{ "seq" "a sequence of " { $link bucket } " objects" }
|
{ "seq" "a sequence of " { $link bucket } " objects" }
|
||||||
}
|
}
|
||||||
{ $description
|
{ $description
|
||||||
"Returns a list of " { $link bucket } " objects containing data on the buckets available on S3."}
|
"Returns a list of " { $link bucket } " objects containing data on the buckets available on S3." }
|
||||||
{ $examples
|
{ $examples
|
||||||
{ $unchecked-example "USING: s3 ;" "buckets ." "{ }" }
|
{ $unchecked-example "USING: s3 ;" "buckets ." "{ }" }
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ HELP: delete-bucket
|
||||||
HELP: keys
|
HELP: keys
|
||||||
{ $values
|
{ $values
|
||||||
{ "bucket" string }
|
{ "bucket" string }
|
||||||
{ "seq" "a sequence of " { $link key } " objects"}
|
{ "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."
|
"Returns a sequence of " { $link key } " objects. Each object in the sequence has information about the keys contained within the bucket."
|
||||||
|
@ -55,8 +55,8 @@ HELP: get-object
|
||||||
{ $values
|
{ $values
|
||||||
{ "bucket" string }
|
{ "bucket" string }
|
||||||
{ "key" string }
|
{ "key" string }
|
||||||
{ "response" "The HTTP response object"}
|
{ "response" "The HTTP response object" }
|
||||||
{ "data" "The data returned from the http request"}
|
{ "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."
|
"Does an HTTP request to retrieve the object in the bucket with the given key."
|
||||||
|
|
Loading…
Reference in New Issue