Spelling fixes to documentation.
parent
4d38a02316
commit
9f34c9c676
|
@ -43,7 +43,7 @@ HELP: fnv1a-1024
|
|||
{ $class-description "Fowler-Noll-Vo checksum algorithm, v1a, 1024-bit." } ;
|
||||
|
||||
ARTICLE: "checksums.fnv1" "Fowler-Noll-Vo checksum"
|
||||
"The Fowler-Noll-Vo checksum algorithm is another simple and fast checksum. It comes in 32, 64, 128, 256, 512 and 1024-bit versions, each in 1 and 1a variants. The 1a variants tend to produce a slightly better result. See http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash for more details."
|
||||
"The Fowler-Noll-Vo checksum algorithm is another simple and fast checksum. It comes in 32, 64, 128, 256, 512 and 1024-bit versions, each in 1 and 1a variants. The 1a variants tend to produce a slightly better result. See " { $url "http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash" } " for more details."
|
||||
{ $subsections
|
||||
fnv1-32
|
||||
fnv1a-32
|
||||
|
|
|
@ -49,7 +49,7 @@ $nl
|
|||
"objc-calling"
|
||||
"objc-subclassing"
|
||||
}
|
||||
"A utility library is built to faciliate the development of Cocoa applications in Factor:"
|
||||
"A utility library is built to facilitate the development of Cocoa applications in Factor:"
|
||||
{ $subsections
|
||||
"cocoa-application-utils"
|
||||
"cocoa-dialogs"
|
||||
|
|
|
@ -158,7 +158,7 @@ ARTICLE: "db-tuples" "High-level tuple/database integration"
|
|||
{ $subsections "db.types" }
|
||||
"Useful words:"
|
||||
{ $subsections "db-tuples-words" }
|
||||
"For porting db.tuples to other databases:"
|
||||
"For porting " { $vocab-link "db.tuples" } " to other databases:"
|
||||
{ $subsections "db-tuples-protocol" }
|
||||
;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ ARTICLE: "delegate" "Delegation"
|
|||
$nl
|
||||
"A " { $emphasis "protocol" } " is a collection of related generic words. An object is said to " { $emphasis "consult" } " another object if it implements a protocol by forwarding all methods onto the other object."
|
||||
$nl
|
||||
"Using this vocabulary, protocols can be defined and consulation can be set up without any repetitive boilerplate."
|
||||
"Using this vocabulary, protocols can be defined and consultation can be set up without any repetitive boilerplate."
|
||||
$nl
|
||||
"Unlike " { $link "tuple-subclassing" } ", which expresses " { $emphasis "is-a" } " relationships by statically including the methods and slots of the superclass in all subclasses, consultation forwards generic word calls to another distinct object."
|
||||
$nl
|
||||
|
|
|
@ -135,7 +135,7 @@ PROTOCOL: silly-protocol do-me ;
|
|||
! Method should be there
|
||||
[ ] [ T{ a-tuple } do-me ] unit-test
|
||||
|
||||
! Now try removing the consulation
|
||||
! Now try removing the consultation
|
||||
[ [ ] ] [
|
||||
"IN: delegate.tests" <string-reader> "delegate-test" parse-stream
|
||||
] unit-test
|
||||
|
|
|
@ -18,7 +18,7 @@ HELP: (write-farkup)
|
|||
{ $description "Converts a Farkup syntax tree node to XML." } ;
|
||||
|
||||
ARTICLE: "farkup-ast" "Farkup syntax tree nodes"
|
||||
"The " { $link parse-farkup } " word outputs a tree of nodes corresponding to the Farkup syntax of the input string. This tree can be programatically traversed and mutated before being passed on to " { $link write-farkup } "."
|
||||
"The " { $link parse-farkup } " word outputs a tree of nodes corresponding to the Farkup syntax of the input string. This tree can be programmatically traversed and mutated before being passed on to " { $link write-farkup } "."
|
||||
{ $subsections
|
||||
heading1
|
||||
heading2
|
||||
|
|
|
@ -173,7 +173,7 @@ ARTICLE: "http.client.options" "OPTIONS requests with the HTTP client"
|
|||
{ $subsections
|
||||
<options-request>
|
||||
}
|
||||
"RFC2616 does not define any use for an entity body, yet allows for the inclusion of one as part of the OPTIONS method. This is not supported with this version of the http.client. The current implementation of http-options only supports a " { $link url } " request with no corresponding post-data, as per the stack effect." ;
|
||||
"RFC2616 does not define any use for an entity body, yet allows for the inclusion of one as part of the OPTIONS method. This is not supported with this version of the " { $vocab-link "http.client" } ". The current implementation of " { $link http-options } " only supports a " { $link url } " request with no corresponding post-data, as per the stack effect." ;
|
||||
|
||||
ARTICLE: "http.client.trace" "TRACE requests with the HTTP client"
|
||||
"Basic usage involves passing a " { $link url } " and getting a " { $link response } " and data back:"
|
||||
|
|
|
@ -84,7 +84,7 @@ ARTICLE: "io.mmap.examples" "Memory-mapped file examples"
|
|||
" [ reverse! drop ] each"
|
||||
"] with-mapped-array"
|
||||
}
|
||||
"Normalize a file containing packed quadrupes of floats:"
|
||||
"Normalize a file containing packed quadruples of floats:"
|
||||
{ $code
|
||||
"USING: kernel io.mmap math.vectors math.vectors.simd" "sequences specialized-arrays ;"
|
||||
"SPECIALIZED-ARRAY: float-4"
|
||||
|
|
|
@ -57,7 +57,7 @@ $nl
|
|||
"This slot is required for secure server sockets." ;
|
||||
|
||||
ARTICLE: "ssl-ephemeral-rsa" "Ephemeral RSA key bits"
|
||||
"The " { $snippet "ephemeral-key-bits" } " slot of a " { $link secure-config } " contains the length of the empheral RSA key, in bits."
|
||||
"The " { $snippet "ephemeral-key-bits" } " slot of a " { $link secure-config } " contains the length of the ephemeral RSA key, in bits."
|
||||
$nl
|
||||
"The default value is 1024, and anything less than that is considered insecure. This slot is required for secure server sockets." ;
|
||||
|
||||
|
@ -113,7 +113,7 @@ HELP: accept-secure-handshake
|
|||
{ $errors "Throws " { $link upgrade-on-non-socket } " or " { $link upgrade-buffers-full } " if used improperly." } ;
|
||||
|
||||
ARTICLE: "ssl-upgrade" "Upgrading existing connections"
|
||||
"Some protocols, such as HTTPS, require that the connection be established as an SSL/TLS connection. Others, such as secure SMTP and POP3 require that the client and server initiate an SSL/TLS handshake upon the client sending a plain-text request. The latter use-case is accomodated by a pair of words."
|
||||
"Some protocols, such as HTTPS, require that the connection be established as an SSL/TLS connection. Others, such as secure SMTP and POP3 require that the client and server initiate an SSL/TLS handshake upon the client sending a plain-text request. The latter use-case is accommodated by a pair of words."
|
||||
$nl
|
||||
"Upgrading a connection to a secure socket by initiating an SSL/TLS handshake with the server:"
|
||||
{ $subsections send-secure-handshake }
|
||||
|
|
|
@ -55,7 +55,7 @@ HELP: unique-primes
|
|||
{ $description "Generates a sequence of " { $snippet "n" } " unique prime numbers with exactly " { $snippet "numbits" } " bits." } ;
|
||||
|
||||
ARTICLE: "math.primes" "Prime numbers"
|
||||
"The " { $vocab-link "math.primes" } " vocabulary implements words related to prime numbers. Serveral useful vocabularies exist for testing primality. The Sieve of Eratosthenes in " { $vocab-link "math.primes.erato" } " is useful for testing primality below five million. For larger integers, " { $vocab-link "math.primes.miller-rabin" } " is a fast probabilstic primality test. The " { $vocab-link "math.primes.lucas-lehmer" } " vocabulary implements an algorithm for finding huge Mersenne prime numbers." $nl
|
||||
"The " { $vocab-link "math.primes" } " vocabulary implements words related to prime numbers. Several useful vocabularies exist for testing primality. The Sieve of Eratosthenes in " { $vocab-link "math.primes.erato" } " is useful for testing primality below five million. For larger integers, " { $vocab-link "math.primes.miller-rabin" } " is a fast probabilistic primality test. The " { $vocab-link "math.primes.lucas-lehmer" } " vocabulary implements an algorithm for finding huge Mersenne prime numbers." $nl
|
||||
"Testing if a number is prime:"
|
||||
{ $subsections prime? }
|
||||
"Generating prime numbers:"
|
||||
|
|
|
@ -31,7 +31,7 @@ $nl
|
|||
$nl
|
||||
"On PowerPC, or older x86 chips without SSE, software fallbacks are used for all high-level vector operations. SIMD code can run with no loss in functionality, just decreased performance."
|
||||
$nl
|
||||
"The primities in the " { $vocab-link "math.vectors.simd.intrinsics" } " vocabulary do not have software fallbacks, but they should not be called directly in any case." ;
|
||||
"The primitives in the " { $vocab-link "math.vectors.simd.intrinsics" } " vocabulary do not have software fallbacks, but they should not be called directly in any case." ;
|
||||
|
||||
ARTICLE: "math.vectors.simd.types" "SIMD vector types"
|
||||
"Each SIMD vector type is named " { $snippet "scalar-count" } ", where " { $snippet "scalar" } " is a scalar C type and " { $snippet "count" } " is a vector dimension."
|
||||
|
|
|
@ -279,7 +279,7 @@ ARTICLE: "peg.ebnf.semantic-action" "Semantic Action"
|
|||
"matched rule that returns success or failure. The result of the parse is decided by "
|
||||
"the result of the semantic action. The stack effect for the quotation is "
|
||||
{ $snippet ( ast -- ? ) } ". "
|
||||
"A semantic action follows the rule it applies to and is delimeted by '?[' and ']?'."
|
||||
"A semantic action follows the rule it applies to and is delimited by '?[' and ']?'."
|
||||
{ $examples
|
||||
{ $example
|
||||
"USING: prettyprint peg.ebnf math math.parser ;"
|
||||
|
@ -431,7 +431,7 @@ $nl
|
|||
"working in one pass. There is no tokenization occurring over the whole string "
|
||||
"followed by the parse of that result. It tokenizes as it needs to. You can even "
|
||||
"switch tokenizers multiple times during a grammar. Rules use the tokenizer that "
|
||||
"was defined lexically before the rule. This is usefull in the JavaScript grammar:"
|
||||
"was defined lexically before the rule. This is useful in the JavaScript grammar:"
|
||||
{ $examples
|
||||
{ $code
|
||||
"EBNF: javascript"
|
||||
|
|
|
@ -199,7 +199,7 @@ $nl
|
|||
}
|
||||
"Creating " { $link "network-addressing" } " from URLs:"
|
||||
{ $subsections url-addr }
|
||||
"The URL implemention encodes and decodes components of " { $link url } " instances automatically, but sometimes this functionality is needed for non-URL strings."
|
||||
"The URL implementation encodes and decodes components of " { $link url } " instances automatically, but sometimes this functionality is needed for non-URL strings."
|
||||
{ $subsections "url-encoding" }
|
||||
"Utility words used by the URL implementation:"
|
||||
{ $subsections "url-utilities" } ;
|
||||
|
|
|
@ -16,7 +16,7 @@ ARTICLE: "xml.writer" "Writing XML"
|
|||
pprint-xml>string
|
||||
pprint-xml
|
||||
}
|
||||
"Certain variables can be changed to mainpulate prettyprinting"
|
||||
"Certain variables can be changed to manipulate prettyprinting"
|
||||
{ $subsections
|
||||
sensitive-tags
|
||||
indenter
|
||||
|
|
|
@ -125,30 +125,30 @@ ARTICLE: "tuple-inheritance-example" "Tuple subclassing example"
|
|||
"Rectangles, parallelograms and circles are all shapes. We support two operations on shapes:"
|
||||
{ $list
|
||||
"Computing the area"
|
||||
"Computing the perimiter"
|
||||
"Computing the perimeter"
|
||||
}
|
||||
"Rectangles and parallelograms use the same algorithm for computing the area, whereas they use different algorithms for computing perimiter. Also, rectangles and parallelograms both have " { $snippet "width" } " and " { $snippet "height" } " slots. We can exploit this with subclassing:"
|
||||
"Rectangles and parallelograms use the same algorithm for computing the area, whereas they use different algorithms for computing perimeter. Also, rectangles and parallelograms both have " { $snippet "width" } " and " { $snippet "height" } " slots. We can exploit this with subclassing:"
|
||||
{ $code
|
||||
"USING: accessors kernel math math.constants math.functions ;"
|
||||
"GENERIC: area ( shape -- n )"
|
||||
"GENERIC: perimiter ( shape -- n )"
|
||||
"GENERIC: perimeter ( shape -- n )"
|
||||
""
|
||||
"TUPLE: shape ;"
|
||||
""
|
||||
"TUPLE: circle < shape radius ;"
|
||||
"M: circle area radius>> sq pi * ;"
|
||||
"M: circle perimiter radius>> 2 * pi * ;"
|
||||
"M: circle perimeter radius>> 2 * pi * ;"
|
||||
""
|
||||
"TUPLE: quad < shape width height ;"
|
||||
"M: quad area [ width>> ] [ height>> ] bi * ;"
|
||||
""
|
||||
"TUPLE: rectangle < quad ;"
|
||||
"M: rectangle perimiter [ width>> 2 * ] [ height>> 2 * ] bi + ;"
|
||||
"M: rectangle perimeter [ width>> 2 * ] [ height>> 2 * ] bi + ;"
|
||||
""
|
||||
": hypot ( a b -- c ) [ sq ] bi@ + sqrt ;"
|
||||
""
|
||||
"TUPLE: parallelogram < quad skew ;"
|
||||
"M: parallelogram perimiter"
|
||||
"M: parallelogram perimeter"
|
||||
" [ width>> 2 * ] [ [ height>> ] [ skew>> ] bi hypot 2 * ] bi + ;"
|
||||
} ;
|
||||
|
||||
|
|
|
@ -396,7 +396,7 @@ $nl
|
|||
HELP: distribute-buckets
|
||||
{ $values { "alist" "an alist" } { "initial" object } { "quot" { $quotation "( obj -- assoc )" } } { "buckets" "a new array" } }
|
||||
{ $description "Sorts the entries of " { $snippet "assoc" } " into buckets, using the quotation to yield a set of keys for each entry. The hashcode of each key is computed, and the entry is placed in all corresponding buckets. Each bucket is initially cloned from " { $snippet "initial" } "; this should either be an empty vector or a one-element vector containing a pair." }
|
||||
{ $notes "This word is used in the implemention of " { $link hash-case-quot } " and " { $link standard-combination } "." } ;
|
||||
{ $notes "This word is used in the implementation of " { $link hash-case-quot } " and " { $link standard-combination } "." } ;
|
||||
|
||||
HELP: dispatch ( n array -- )
|
||||
{ $values { "n" "a fixnum" } { "array" "an array of quotations" } }
|
||||
|
|
|
@ -61,7 +61,7 @@ $nl
|
|||
"errors-post-mortem"
|
||||
"errors-anti-examples"
|
||||
}
|
||||
"When Factor encouters a critical error, it calls the following word:"
|
||||
"When Factor encounters a critical error, it calls the following word:"
|
||||
{ $subsections die } ;
|
||||
|
||||
ARTICLE: "continuations.private" "Continuation implementation details"
|
||||
|
|
|
@ -94,25 +94,25 @@ M: circle area radius>> sq pi * ;
|
|||
[ 12 ] [ 4 3 2 <parallelogram> area ] unit-test
|
||||
[ t ] [ 2 <circle> area 4 pi * = ] unit-test
|
||||
|
||||
GENERIC: perimiter ( shape -- n )
|
||||
GENERIC: perimeter ( shape -- n )
|
||||
|
||||
: rectangle-perimiter ( l w -- n ) + 2 * ;
|
||||
: rectangle-perimeter ( l w -- n ) + 2 * ;
|
||||
|
||||
M: rectangle perimiter
|
||||
M: rectangle perimeter
|
||||
[ width>> ] [ height>> ] bi
|
||||
rectangle-perimiter ;
|
||||
rectangle-perimeter ;
|
||||
|
||||
: hypotenuse ( a b -- c ) [ sq ] bi@ + sqrt ;
|
||||
|
||||
M: parallelogram perimiter
|
||||
M: parallelogram perimeter
|
||||
[ width>> ]
|
||||
[ [ height>> ] [ skew>> ] bi hypotenuse ] bi
|
||||
rectangle-perimiter ;
|
||||
rectangle-perimeter ;
|
||||
|
||||
M: circle perimiter 2 * pi * ;
|
||||
M: circle perimeter 2 * pi * ;
|
||||
|
||||
[ 14 ] [ 4 3 <rectangle> perimiter ] unit-test
|
||||
[ 30.0 ] [ 10 4 3 <parallelogram> perimiter ] unit-test
|
||||
[ 14 ] [ 4 3 <rectangle> perimeter ] unit-test
|
||||
[ 30.0 ] [ 10 4 3 <parallelogram> perimeter ] unit-test
|
||||
|
||||
PREDICATE: very-funny < funnies number? ;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespaces assocs ;
|
|||
IN: hashtables
|
||||
|
||||
ARTICLE: "hashtables.private" "Hashtable implementation details"
|
||||
"This hashtable implementation uses only one auxilliary array in addition to the hashtable tuple itself. The array stores keys in even slots and values in odd slots. Values are looked up with a hashing strategy that uses linear probing to resolve collisions."
|
||||
"This hashtable implementation uses only one auxiliary array in addition to the hashtable tuple itself. The array stores keys in even slots and values in odd slots. Values are looked up with a hashing strategy that uses linear probing to resolve collisions."
|
||||
$nl
|
||||
"There are two special objects: the " { $link ((tombstone)) } " marker and the " { $link ((empty)) } " marker. Neither of these markers can be used as hashtable keys."
|
||||
$nl
|
||||
|
|
|
@ -242,7 +242,7 @@ CONSTANT: google-slides
|
|||
{ $slide "Unicode strings"
|
||||
"Strings are sequences of 21-bit Unicode code points"
|
||||
"Efficient implementation: ASCII byte string unless it has chars > 127"
|
||||
"If a byte char has high bit set, the remaining 14 bits come from auxilliary vector"
|
||||
"If a byte char has high bit set, the remaining 14 bits come from auxiliary vector"
|
||||
}
|
||||
{ $slide "Unicode strings"
|
||||
"Unicode-aware case conversion, char classes, collation, word breaks, and so on..."
|
||||
|
|
|
@ -72,7 +72,7 @@ ARTICLE: "images.viewer" "Displaying Images"
|
|||
"The " { $vocab-link "images.viewer" } " vocabulary uses the " { $vocab-link "opengl.textures" }
|
||||
" vocabulary to display any instance of " { $link image } "."$nl
|
||||
"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 containted 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 "
|
||||
{ $link notify-connections } " when you want to update the image. To stop refreshing the image, call " { $link stop-control } "."
|
||||
" To start refreshing again, call " { $link start-control } "."
|
||||
|
|
|
@ -15,7 +15,7 @@ ARTICLE: { "lunar-rescue" "lunar-rescue" } "Lunar Rescue Emulator"
|
|||
"Provides an emulation of the original 8080 Arcade Game 'Lunar Rescue'." $nl
|
||||
"More information on the arcade game can be obtained from " { $url "http://www.mameworld.net/maws/romset/lrescue" } "." $nl
|
||||
"To play the game you need the ROM files for the arcade game. They should "
|
||||
"be placed in a directory called 'lrescue' in the location specified by "
|
||||
"be placed in a directory called " { $code lrescue } " in the location specified by "
|
||||
"the variable " { $link rom-root } ". The specific files needed are:"
|
||||
{ $list
|
||||
"lrescue/lrescue.1"
|
||||
|
|
|
@ -224,7 +224,7 @@ var price = (order == null ? null : order.price);""" }
|
|||
}
|
||||
! { $slide "Stack languages are fundamental"
|
||||
! "Very simple semantics"
|
||||
! "Easy to generate stack code programatically"
|
||||
! "Easy to generate stack code programmatically"
|
||||
! "Everything is almost entirely library code in Factor"
|
||||
! "Factor is easy to extend"
|
||||
! }
|
||||
|
|
|
@ -90,7 +90,7 @@ CONSTANT: vpri-slides
|
|||
}
|
||||
}
|
||||
{ $slide "Object system"
|
||||
"We can compute perimiters now."
|
||||
"We can compute perimeters now."
|
||||
{ $code "100 20 <rectangle> perimeter ." }
|
||||
{ $code "3 <circle> perimeter ." }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue