diff --git a/basis/help/cookbook/cookbook.factor b/basis/help/cookbook/cookbook.factor index ebc711d527..4367725e29 100644 --- a/basis/help/cookbook/cookbook.factor +++ b/basis/help/cookbook/cookbook.factor @@ -361,7 +361,7 @@ ARTICLE: "cookbook-pitfalls" "Pitfalls to avoid" { "When a source file uses two vocabularies which define words with the same name, the order of the vocabularies in the " { $link POSTPONE: USE: } " or " { $link POSTPONE: USING: } " forms is important. The " { $link POSTPONE: QUALIFIED: } " word implements qualified naming, which can be used to resolve ambiguities." } { "If a literal object appears in a word definition, the object itself is pushed on the stack when the word executes, not a copy. If you intend to mutate this object, you must " { $link clone } " it first. See " { $link "syntax-literals" } "." } { "For a discussion of potential issues surrounding the " { $link f } " object, see " { $link "booleans" } "." } - { "Factor's object system is quite flexible. Careless usage of union, mixin and predicate classes can lead to similar problems to those caused by ``multiple inheritance'' in other languages. In particular, it is possible to have two classes such that they have a non-empty intersection and yet neither is a subclass of the other. If a generic word defines methods on two such classes, various disambiguation rules are applied to ensure method dispatch remains deterministic, however they may not be what you expect. See " { $link "method-order" } " for details." } + { "Factor's object system is quite flexible. Careless usage of union, mixin and predicate classes can lead to similar problems to those caused by “multiple inheritance” in other languages. In particular, it is possible to have two classes such that they have a non-empty intersection and yet neither is a subclass of the other. If a generic word defines methods on two such classes, various disambiguation rules are applied to ensure method dispatch remains deterministic, however they may not be what you expect. See " { $link "method-order" } " for details." } { "Performance-sensitive code should have a static stack effect so that it can be compiled by the optimizing word compiler, which generates more efficient code than the non-optimizing quotation compiler. See " { $link "inference" } " and " { $link "compiler" } "." $nl "This means that methods defined on performance sensitive, frequently-called core generic words such as " { $link nth } " should have static stack effects which are consistent with each other, since a generic word will only have a static stack effect if all methods do." diff --git a/basis/help/help-docs.factor b/basis/help/help-docs.factor index 6b77f656c0..8384799dbd 100644 --- a/basis/help/help-docs.factor +++ b/basis/help/help-docs.factor @@ -340,7 +340,7 @@ HELP: $values HELP: $instance { $values { "element" "an array with shape " { $snippet "{ class }" } } } { $description - "Produces the text ``a " { $emphasis "class" } "'' or ``an " { $emphasis "class" } "'', depending on the first letter of " { $emphasis "class" } "." + "Produces the text “a " { $emphasis "class" } "” or “an " { $emphasis "class" } "”, depending on the first letter of " { $emphasis "class" } "." } { $examples { $markup-example { $instance string } } @@ -351,7 +351,7 @@ HELP: $instance HELP: $maybe { $values { "element" "an array with shape " { $snippet "{ class }" } } } { $description - "Produces the text ``a " { $emphasis "class" } " or f'' or ``an " { $emphasis "class" } " or f'', depending on the first letter of " { $emphasis "class" } "." + "Produces the text “a " { $emphasis "class" } " or f” or “an " { $emphasis "class" } " or f”, depending on the first letter of " { $emphasis "class" } "." } { $examples { $markup-example { $maybe string } } @@ -360,7 +360,7 @@ HELP: $maybe HELP: $quotation { $values { "element" "an array with shape " { $snippet "{ effect }" } } } { $description - "Produces the text ``a quotation with stack effect " { $emphasis "effect" } "''." + "Produces the text “a quotation with stack effect " { $emphasis "effect" } "”." } { $examples { $markup-example { $quotation "( obj -- )" } } diff --git a/basis/help/tutorial/tutorial.factor b/basis/help/tutorial/tutorial.factor index 72b37fecec..813eef4ea2 100644 --- a/basis/help/tutorial/tutorial.factor +++ b/basis/help/tutorial/tutorial.factor @@ -11,7 +11,7 @@ $nl { $code "USE: tools.scaffold" } "Then, ask the scaffold tool to create a new vocabulary named " { $snippet "palindrome" } ":" { $code "\"resource:work\" \"palindrome\" scaffold-vocab" } -"If you look at the output, you will see that a few files were created in your ``work'' directory. The following phrase will print the full path of your work directory:" +"If you look at the output, you will see that a few files were created in your “work” directory. The following phrase will print the full path of your work directory:" { $code "\"work\" resource-path ." } "The work directory is one of several " { $link "vocabs.roots" } " where Factor searches for vocabularies. It is possible to define new vocabulary roots; see " { $link "add-vocab-roots" } ". To keep things simple in this tutorial, we'll just use the work directory, though." $nl @@ -66,7 +66,7 @@ ARTICLE: "first-program-test" "Testing your first program" { $code "\"hello\"" } "Note that the stack display in the listener now shows this string. Having supplied the input, we call our word:" { $code "palindrome?" } -"The stack display should now have a boolean false - " { $link f } " - which is the word's output. Since ``hello'' is not a palindrome, this is what we expect. We can get rid of this boolean by calling " { $link drop } ". The stack should be empty after this is done." +"The stack display should now have a boolean false - " { $link f } " - which is the word's output. Since “hello” is not a palindrome, this is what we expect. We can get rid of this boolean by calling " { $link drop } ". The stack should be empty after this is done." $nl "Now, let's try it with a palindrome; we will push the string and call the word in the same line of code:" { $code "\"racecar\" palindrome?" } @@ -120,7 +120,7 @@ $nl { $code "filter" } "Now the stack should contain the following string:" { "\"AmanaplanacanalPanama\"" } -"This is almost what we want; we just need to convert the string to lower case now. This can be done by calling " { $link >lower } "; the " { $snippet ">" } " prefix is a naming convention for conversion operations, and should be read as ``to'':" +"This is almost what we want; we just need to convert the string to lower case now. This can be done by calling " { $link >lower } "; the " { $snippet ">" } " prefix is a naming convention for conversion operations, and should be read as “to”:" { $code ">lower" } "Finally, let's print the top of the stack and discard it:" { $code "." }