From d82396c174325fded4be50b8ea0ab8c99e5e038d Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sat, 6 May 2023 15:38:13 -0600 Subject: [PATCH 1/7] fix typo well -> will --- exercises/001_hello.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/001_hello.zig b/exercises/001_hello.zig index 9534b60..2d95a10 100644 --- a/exercises/001_hello.zig +++ b/exercises/001_hello.zig @@ -11,7 +11,7 @@ // ... // } // -// Perhaps knowing this well help solve the errors we're getting +// Perhaps knowing this will help solve the errors we're getting // with this little program? // const std = @import("std"); From 6bdc1caaae4d47ff6cbcedccfe9caa4ed31557d1 Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sun, 7 May 2023 01:38:28 -0600 Subject: [PATCH 2/7] add missing word "to" --- exercises/072_comptime7.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/072_comptime7.zig b/exercises/072_comptime7.zig index 147b935..9bc30fb 100644 --- a/exercises/072_comptime7.zig +++ b/exercises/072_comptime7.zig @@ -1,6 +1,6 @@ // // There is also an 'inline while'. Just like 'inline for', it -// loops at compile time, allowing you do all sorts of +// loops at compile time, allowing you to do all sorts of // interesting things not possible at runtime. See if you can // figure out what this rather bonkers example prints: // From cc9f68c4e51e34b67b46eb1441cd272b4d82dc5c Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sun, 7 May 2023 02:04:30 -0600 Subject: [PATCH 3/7] Add missing word "of" --- exercises/076_sentinels.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/076_sentinels.zig b/exercises/076_sentinels.zig index 6f7abae..1af59da 100644 --- a/exercises/076_sentinels.zig +++ b/exercises/076_sentinels.zig @@ -69,7 +69,7 @@ pub fn main() void { } // Here's our generic sequence printing function. It's nearly -// complete, but there are a couple missing bits. Please fix +// complete, but there are a couple of missing bits. Please fix // them! fn printSequence(my_seq: anytype) void { const my_typeinfo = @typeInfo(@TypeOf(my_seq)); From 7af542bffb982e121607910ff85ae898f641741d Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sun, 7 May 2023 02:46:07 -0600 Subject: [PATCH 4/7] Remove repeated word "with" --- exercises/092_interfaces.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/092_interfaces.zig b/exercises/092_interfaces.zig index 8f0a937..0b6b087 100644 --- a/exercises/092_interfaces.zig +++ b/exercises/092_interfaces.zig @@ -86,7 +86,7 @@ const Insect = union(enum) { // Thanks to 'inline else', we can think of this print() as // being an interface method. Any member of this union with - // with a print() method can be treated uniformly by outside + // a print() method can be treated uniformly by outside // code without needing to know any other details. Cool! pub fn print(self: Insect) void { switch (self) { From b072c0014cf2c4bbda6e2b06e72626f65dfec883 Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sun, 7 May 2023 03:08:03 -0600 Subject: [PATCH 5/7] Fix reference to slice_ptr in example code --- exercises/096_memory_allocation.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/096_memory_allocation.zig b/exercises/096_memory_allocation.zig index 4a89702..8e348be 100644 --- a/exercises/096_memory_allocation.zig +++ b/exercises/096_memory_allocation.zig @@ -27,7 +27,7 @@ // std.debug.print("ptr={*}\n", .{ptr}); // // const slice_ptr = try allocator.alloc(f64, 5); -// std.debug.print("ptr={*}\n", .{ptr}); +// std.debug.print("slice_ptr={*}\n", .{slice_ptr}); // } // Instead of an simple integer or a constant sized slice, this From b10e47839843c836bb0ea98e6f29ad7b23678295 Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sun, 7 May 2023 03:24:10 -0600 Subject: [PATCH 6/7] Improve wording in some comments --- exercises/098_bit_manipulation2.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/098_bit_manipulation2.zig b/exercises/098_bit_manipulation2.zig index d5ee825..9323548 100644 --- a/exercises/098_bit_manipulation2.zig +++ b/exercises/098_bit_manipulation2.zig @@ -39,7 +39,7 @@ fn isPangram(str: []const u8) bool { // first we check if the string has at least 26 characters if (str.len < 26) return false; - // we uses a 32 bit variable of which we need 26 bit + // we uses a 32 bit variable of which we need 26 bits var bits: u32 = 0; // loop about all characters in the string @@ -50,8 +50,8 @@ fn isPangram(str: []const u8) bool { // // to do this, we use a little trick: // since the letters in the ASCI table start at 65 - // and are numbered by, we simply subtract the first - // letter (in this case the 'a') from the character + // and are numbered sequentially, we simply subtract the + // first letter (in this case the 'a') from the character // found, and thus get the position of the desired bit bits |= @as(u32, 1) << @truncate(u5, ascii.toLower(c) - 'a'); } From 2b2c396237d9e737590195ccddbadb8783d85cab Mon Sep 17 00:00:00 2001 From: Kim SHrier Date: Sun, 7 May 2023 03:33:55 -0600 Subject: [PATCH 7/7] Add missing word "a" --- exercises/099_formatting.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/099_formatting.zig b/exercises/099_formatting.zig index fc73338..07af3ba 100644 --- a/exercises/099_formatting.zig +++ b/exercises/099_formatting.zig @@ -22,7 +22,7 @@ // These can be used in different ways, but typically to convert // numerical values into various text representations. The // results can be used for direct output to a terminal or stored -// for later use or written to file. The latter is useful when +// for later use or written to a file. The latter is useful when // large amounts of data are to be processed by other programs. // // In Ziglings, we are concerned with the output to the console.