From 57738a8405220caeac0e7896b4871246d543e989 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sat, 29 Jul 2023 10:26:05 +0800 Subject: [PATCH] docs: fix typos Found via `typos --format brief` --- doc/rfc/0001-smarter-imports.md | 2 +- doc/site/blog/0-hello-wren.markdown | 2 +- doc/site/blog/1-0.2.0-and-beyond.markdown | 2 +- doc/site/blog/2-0.3.0-released.markdown | 2 +- doc/site/modules/core/object.markdown | 2 +- doc/site/modules/random/random.markdown | 2 +- src/vm/wren_compiler.c | 8 ++++---- src/vm/wren_debug.c | 2 +- src/vm/wren_value.h | 2 +- src/vm/wren_vm.c | 2 +- test/benchmark/delta_blue.dart | 6 +++--- test/benchmark/delta_blue.lua.inprogress | 8 ++++---- test/benchmark/delta_blue.py | 2 +- test/benchmark/delta_blue.wren | 6 +++--- test/core/list/join.wren | 2 +- ...it_empty_seperator.wren => split_empty_separator.wren} | 0 test/language/field/in_static_method_in_nested_class.wren | 2 +- ..._exponants.wren => scientific_multiple_exponents.wren} | 0 test/regression/561.wren | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) rename test/core/string/{split_empty_seperator.wren => split_empty_separator.wren} (100%) rename test/language/number/{scientific_multiple_exponants.wren => scientific_multiple_exponents.wren} (100%) diff --git a/doc/rfc/0001-smarter-imports.md b/doc/rfc/0001-smarter-imports.md index d2c36ad33..e53b1cb99 100644 --- a/doc/rfc/0001-smarter-imports.md +++ b/doc/rfc/0001-smarter-imports.md @@ -79,7 +79,7 @@ You aren't saying *where* that module should be found, you're saying *what* module you want. Assuming we get a package manager at some point, these kinds of "logical" imports will be common. So I want these too. -If you look at other langauges' package managers, you'll find many times a +If you look at other languages' package managers, you'll find many times a single package offers a number of separate libraries you can use. So I also want to support logical imports that contain a path too — the import would say both *what* package to look in and *where* in that package to look. diff --git a/doc/site/blog/0-hello-wren.markdown b/doc/site/blog/0-hello-wren.markdown index b1ae9d7ff..5658bd6d2 100644 --- a/doc/site/blog/0-hello-wren.markdown +++ b/doc/site/blog/0-hello-wren.markdown @@ -5,7 +5,7 @@ Welcome to the new Wren development blog! -Around November 2018 on the Wren mailing list, munificent announced that a new maintainer is taking over the development and maintainence of the Wren language. [The original post is here, with all the details.](https://groups.google.com/forum/#!topic/wren-lang/cMUwij-NIn0) +Around November 2018 on the Wren mailing list, munificent announced that a new maintainer is taking over the development and maintenance of the Wren language. [The original post is here, with all the details.](https://groups.google.com/forum/#!topic/wren-lang/cMUwij-NIn0) In short, [I'm (ruby0x1)](https://github.com/ruby0x1) taking over from [Bob (munificent)](https://github.com/munificent) as maintainer, but Bob is sticking around as a contributor! diff --git a/doc/site/blog/1-0.2.0-and-beyond.markdown b/doc/site/blog/1-0.2.0-and-beyond.markdown index 5e243b430..69f7eca16 100644 --- a/doc/site/blog/1-0.2.0-and-beyond.markdown +++ b/doc/site/blog/1-0.2.0-and-beyond.markdown @@ -66,7 +66,7 @@ We'll fix that with 0.3.0. The 0.3.0 goals in simple form: - VM / CLI split -- Build consistency/reliablity +- Build consistency/reliability - Web build for embedding in docs - Prebuilt releases diff --git a/doc/site/blog/2-0.3.0-released.markdown b/doc/site/blog/2-0.3.0-released.markdown index 81a97575d..63100af4e 100644 --- a/doc/site/blog/2-0.3.0-released.markdown +++ b/doc/site/blog/2-0.3.0-released.markdown @@ -11,7 +11,7 @@ Let's revisit our goals from [the last blog post](1-0.2.0-and-beyond.html), and mark what we managed to get done: - VM / CLI split [#](#vm--cli-split) -- Build consistency/reliablity [#](#build-consistencyreliability) +- Build consistency/reliability [#](#build-consistencyreliability) - Web build for embedding in docs [#](#web-build-for-embedding-in-docs) - Prebuilt releases [#](#prebuilt-releases) diff --git a/doc/site/modules/core/object.markdown b/doc/site/modules/core/object.markdown index 58d69cb5c..2b502e554 100644 --- a/doc/site/modules/core/object.markdown +++ b/doc/site/modules/core/object.markdown @@ -12,7 +12,7 @@ For all other objects, this returns `true` only if *obj1* and *obj2* refer to the exact same object in memory. This is similar to the built in `==` operator in Object except that this cannot -be overriden. It allows you to reliably access the built-in equality semantics +be overridden. It allows you to reliably access the built-in equality semantics even on user-defined classes. ## Methods diff --git a/doc/site/modules/random/random.markdown b/doc/site/modules/random/random.markdown index 71ecb2691..5cec14970 100644 --- a/doc/site/modules/random/random.markdown +++ b/doc/site/modules/random/random.markdown @@ -32,7 +32,7 @@ var random = Random.new() ### Random.**new**(seed) Creates a new generator initialized with [seed]. The seed can either be a -number, or a non-empty sequence of numbers. If the sequnce has more than 16 +number, or a non-empty sequence of numbers. If the sequence has more than 16 elements, only the first 16 are used. If it has fewer, the elements are cycled to generate 16 seed values. diff --git a/src/vm/wren_compiler.c b/src/vm/wren_compiler.c index 92b16cac0..e5a4dba5b 100644 --- a/src/vm/wren_compiler.c +++ b/src/vm/wren_compiler.c @@ -1835,7 +1835,7 @@ static void validateNumParameters(Compiler* compiler, int numArgs) } // Parses the rest of a comma-separated parameter list after the opening -// delimeter. Updates `arity` in [signature] with the number of parameters. +// delimiter. Updates `arity` in [signature] with the number of parameters. static void finishParameterList(Compiler* compiler, Signature* signature) { do @@ -2832,7 +2832,7 @@ void parsePrecedence(Compiler* compiler, Precedence precedence) return; } - // Track if the precendence of the surrounding expression is low enough to + // Track if the precedence of the surrounding expression is low enough to // allow an assignment inside this one. We can't compile an assignment like // a normal expression because it requires us to handle the LHS specially -- // it needs to be an lvalue, not an rvalue. So, for each of the kinds of @@ -3042,7 +3042,7 @@ static void forStatement(Compiler* compiler) // } // // It's not exactly this, because the synthetic variables `seq_` and `iter_` - // actually get names that aren't valid Wren identfiers, but that's the basic + // actually get names that aren't valid Wren identifiers, but that's the basic // idea. // // The important parts are: @@ -3948,7 +3948,7 @@ static void disallowAttributes(Compiler* compiler) } } -// Add an attribute to a given group in the compiler attribues map +// Add an attribute to a given group in the compiler attributes map static void addToAttributeGroup(Compiler* compiler, Value group, Value key, Value value) { diff --git a/src/vm/wren_debug.c b/src/vm/wren_debug.c index 2c4664867..f2553e9cd 100644 --- a/src/vm/wren_debug.c +++ b/src/vm/wren_debug.c @@ -341,7 +341,7 @@ static int dumpInstruction(WrenVM* vm, ObjFn* fn, int i, int* lastLine) break; default: - printf("UKNOWN! [%d]\n", bytecode[i - 1]); + printf("UNKNOWN! [%d]\n", bytecode[i - 1]); break; } diff --git a/src/vm/wren_value.h b/src/vm/wren_value.h index 2ca0cfdcd..3a794b69d 100644 --- a/src/vm/wren_value.h +++ b/src/vm/wren_value.h @@ -754,7 +754,7 @@ Value wrenStringFromByte(WrenVM* vm, uint8_t value); // empty string. Value wrenStringCodePointAt(WrenVM* vm, ObjString* string, uint32_t index); -// Search for the first occurence of [needle] within [haystack] and returns its +// Search for the first occurrence of [needle] within [haystack] and returns its // zero-based offset. Returns `UINT32_MAX` if [haystack] does not contain // [needle]. uint32_t wrenStringFind(ObjString* haystack, ObjString* needle, diff --git a/src/vm/wren_vm.c b/src/vm/wren_vm.c index 254d0b037..bc5c6e645 100644 --- a/src/vm/wren_vm.c +++ b/src/vm/wren_vm.c @@ -1415,7 +1415,7 @@ WrenHandle* wrenMakeCallHandle(WrenVM* vm, const char* signature) } } - // Add the signatue to the method table. + // Add the signature to the method table. int method = wrenSymbolTableEnsure(vm, &vm->methodNames, signature, signatureLength); diff --git a/test/benchmark/delta_blue.dart b/test/benchmark/delta_blue.dart index 5043f7dd6..ae5ae7009 100644 --- a/test/benchmark/delta_blue.dart +++ b/test/benchmark/delta_blue.dart @@ -153,7 +153,7 @@ abstract class Constraint { /** * Normal constraints are not input constraints. An input constraint * is one that depends on external state, such as the mouse, the - * keybord, a clock, or some arbitraty piece of imperative code. + * keyboard, a clock, or some arbitrary piece of imperative code. */ bool isInput() => false; } @@ -459,7 +459,7 @@ class Planner { /** * Attempt to satisfy the given constraint and, if successful, - * incrementally update the dataflow graph. Details: If satifying + * incrementally update the dataflow graph. Details: If satisfying * the constraint is successful, it may override a weaker constraint * on its output. The algorithm attempts to resatisfy that * constraint using some other method. This process is repeated @@ -652,7 +652,7 @@ class Plan { * In case 1, the added constraint is stronger than the stay * constraint and values must propagate down the entire length of the * chain. In case 2, the added constraint is weaker than the stay - * constraint so it cannot be accomodated. The cost in this case is, + * constraint so it cannot be accommodated. The cost in this case is, * of course, very low. Typical situations lie somewhere between these * two extremes. */ diff --git a/test/benchmark/delta_blue.lua.inprogress b/test/benchmark/delta_blue.lua.inprogress index e11f05718..364525abf 100644 --- a/test/benchmark/delta_blue.lua.inprogress +++ b/test/benchmark/delta_blue.lua.inprogress @@ -19,7 +19,7 @@ -- This implementation of the DeltaBlue benchmark is derived -- from the Smalltalk implementation by John Maloney and Mario -- Wolczko. Some parts have been translated directly, whereas --- others have been modified more aggresively to make it feel +-- others have been modified more aggressively to make it feel -- more like a JavaScript program. @@ -203,7 +203,7 @@ end -- -- Normal constraints are not input constraints. An input constraint -- is one that depends on external state, such as the mouse, the --- keybord, a clock, or some arbitraty piece of imperative code. +-- keyboard, a clock, or some arbitrary piece of imperative code. -- function Constraint:isInput () return false @@ -595,7 +595,7 @@ end -- -- Attempt to satisfy the given constraint and, if successful, --- incrementally update the dataflow graph. Details: If satifying +-- incrementally update the dataflow graph. Details: If satisfying -- the constraint is successful, it may override a weaker constraint -- on its output. The algorithm attempts to resatisfy that -- constraint using some other method. This process is repeated @@ -818,7 +818,7 @@ end -- In case 1, the added constraint is stronger than the stay -- constraint and values must propagate down the entire length of the -- chain. In case 2, the added constraint is weaker than the stay --- constraint so it cannot be accomodated. The cost in this case is, +-- constraint so it cannot be accommodated. The cost in this case is, -- of course, very low. Typical situations lie somewhere between these -- two extremes. -- diff --git a/test/benchmark/delta_blue.py b/test/benchmark/delta_blue.py index 39c0bb894..c97eeaacd 100644 --- a/test/benchmark/delta_blue.py +++ b/test/benchmark/delta_blue.py @@ -511,7 +511,7 @@ def chain_test(n): In case 1, the added constraint is stronger than the stay constraint and values must propagate down the entire length of the chain. In case 2, the added constraint is weaker than the stay - constraint so it cannot be accomodated. The cost in this case is, + constraint so it cannot be accommodated. The cost in this case is, of course, very low. Typical situations lie somewhere between these two extremes. """ diff --git a/test/benchmark/delta_blue.wren b/test/benchmark/delta_blue.wren index c2e6d66b4..cfb5df5cb 100644 --- a/test/benchmark/delta_blue.wren +++ b/test/benchmark/delta_blue.wren @@ -114,7 +114,7 @@ class Constraint { // Normal constraints are not input constraints. An input constraint // is one that depends on external state, such as the mouse, the - // keybord, a clock, or some arbitraty piece of imperative code. + // keyboard, a clock, or some arbitrary piece of imperative code. isInput { false } } @@ -436,7 +436,7 @@ class Planner { } // Attempt to satisfy the given constraint and, if successful, - // incrementally update the dataflow graph. Details: If satifying + // incrementally update the dataflow graph. Details: If satisfying // the constraint is successful, it may override a weaker constraint // on its output. The algorithm attempts to resatisfy that // constraint using some other method. This process is repeated @@ -599,7 +599,7 @@ var total = 0 // In case 1, the added constraint is stronger than the stay // constraint and values must propagate down the entire length of the // chain. In case 2, the added constraint is weaker than the stay -// constraint so it cannot be accomodated. The cost in this case is, +// constraint so it cannot be accommodated. The cost in this case is, // of course, very low. Typical situations lie somewhere between these // two extremes. var chainTest = Fn.new {|n| diff --git a/test/core/list/join.wren b/test/core/list/join.wren index b08ea1b44..f744aee09 100644 --- a/test/core/list/join.wren +++ b/test/core/list/join.wren @@ -1,7 +1,7 @@ // Handle empty list. System.print([].join(",") == "") // expect: true -// Handle a simple list with an empty delimeter. +// Handle a simple list with an empty delimiter. System.print([1, 2, 3].join("")) // expect: 123 // Handle a simple list with no separator. diff --git a/test/core/string/split_empty_seperator.wren b/test/core/string/split_empty_separator.wren similarity index 100% rename from test/core/string/split_empty_seperator.wren rename to test/core/string/split_empty_separator.wren diff --git a/test/language/field/in_static_method_in_nested_class.wren b/test/language/field/in_static_method_in_nested_class.wren index 479b96d43..39f362191 100644 --- a/test/language/field/in_static_method_in_nested_class.wren +++ b/test/language/field/in_static_method_in_nested_class.wren @@ -1,4 +1,4 @@ -// Refering to an instance method in a nested static class should *not* walk +// Referring to an instance method in a nested static class should *not* walk // out to find the nearest enclosing instance method. We could make that work, // but it's confusing to users, and would require some tricky work to make sure // the enclosing instance is closed over. diff --git a/test/language/number/scientific_multiple_exponants.wren b/test/language/number/scientific_multiple_exponents.wren similarity index 100% rename from test/language/number/scientific_multiple_exponants.wren rename to test/language/number/scientific_multiple_exponents.wren diff --git a/test/regression/561.wren b/test/regression/561.wren index 8e8fc0380..c645fe61f 100644 --- a/test/regression/561.wren +++ b/test/regression/561.wren @@ -1,4 +1,4 @@ -// This test caused an array oveflow in local variable array due to hidden +// This test caused an array overflow in local variable array due to hidden // variables of for loop // expect error line 91