fixing grammar and typos

This commit is contained in:
tovedetered 2024-05-03 17:34:03 -04:00
parent 9ce4a7d6f0
commit 63a6557d40
3 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,5 @@
// // WARNING: AS OF Zig 0.13.x Async is no longer supported.
// Until further notice skip to #092_interfaces.zig
// Six Facts: // Six Facts:
// //
// 1. The memory space allocated to your program for the // 1. The memory space allocated to your program for the

View File

@ -2,15 +2,15 @@
// Until now, we've only been printing our output in the console, // Until now, we've only been printing our output in the console,
// which is good enough for fighting alien and hermit bookkeeping. // which is good enough for fighting alien and hermit bookkeeping.
// //
// However, many other task require some interaction with the file system, // However, many other tasks require some interaction with the file system,
// which is the underlying structure for organizing files on your computer. // which is the underlying structure for organizing files on your computer.
// //
// The File System provide a hierarchical structure for storing files // The File System provide a hierarchical structure for storing files
// by organizing files into directories, which hold files and other directories, // by organizing files into directories, which hold files and other directories,
// thus creating a tree structure for navigating. // thus creating a tree-like structure for navigating.
// //
// Fortunately, zig standard library provide a simple api for interacting // Fortunately, the zig standard library provides a simple API for interacting
// with the file system, see the detail documentation here // with the file system, to learn more, see the detailed documentation here
// //
// https://ziglang.org/documentation/master/std/#std.fs // https://ziglang.org/documentation/master/std/#std.fs
// //
@ -29,7 +29,7 @@ pub fn main() !void {
// then we'll try to make a new directory /output/ // then we'll try to make a new directory /output/
// to put our output files. // to put our output files.
cwd.makeDir("output") catch |e| switch (e) { cwd.makeDir("output") catch |e| switch (e) {
// there are chance you might want to run this // there is a chance you might want to run this
// program more than once and the path might already // program more than once and the path might already
// been created, so we'll have to handle this error // been created, so we'll have to handle this error
// by doing nothing // by doing nothing

View File

@ -5,7 +5,7 @@
// with content `It's zigling time!`(18 byte total) // with content `It's zigling time!`(18 byte total)
// //
// Now there no point in writing to a file if we don't read from it am I right? // Now there no point in writing to a file if we don't read from it am I right?
// let's wrote a program to read the content of the file that we just created. // let's write a program to read the contents of the file we just created.
// //
// I am assuming you've created the appropriate files for this to work. // I am assuming you've created the appropriate files for this to work.
// //
@ -37,10 +37,10 @@ pub fn main() !void {
// this should print out : `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA` // this should print out : `AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA`
std.debug.print("{s}\n", .{content}); std.debug.print("{s}\n", .{content});
// okay, seem like threat of violence is not the answer in this case // okay, seems like threats of violence are not the answer in this case
// can you go here to find a way to read the content ? // can you go here to find a way to read the content ?
// https://ziglang.org/documentation/master/std/#std.fs.File // https://ziglang.org/documentation/master/std/#std.fs.File
// hint: you might find two answer that are both vaild in this case // hint: you might find two answers that are both vaild in this case
const byte_read = zig_read_the_file_or_i_will_fight_you(&content); const byte_read = zig_read_the_file_or_i_will_fight_you(&content);
// Woah, too screamy, I know you're excited for zigling time but tone it down a bit // Woah, too screamy, I know you're excited for zigling time but tone it down a bit