-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
branch Zig merge on main #97
Conversation
software/32.Zig/README.md
Outdated
# Workshop 32 - Introduction to Zig | ||
|
||
Welcome to this introductory workshop on Zig! Zig is a modern programming language that emphasizes robustness, performance and clarity. Today, you'll learn : | ||
✔️ how to install Zig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a capital letter for all new sentences after the ✔️
software/32.Zig/README.md
Outdated
|
||
Zig is a general-purpose programming language focused on robustness, performance, and simplicity. It offers manual memory management, safety features, built-in cross-compilation, and seamless C interoperability, making it ideal for system programming and high-performance applications. | ||
|
||
### Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the Prerequisites, it's not really useful. You can learn a new language even if you don't know C or other programming languages.
About the computer with internet access, if their are seeing this it means they are reading it with internet, they can also clone the repo but that's more rare 🤷🏻♂️
Instead you can see what was done for the rust workshop nb 13, they advised people to do the Tour of rust, you could do the same for Zig.
software/32.Zig/README.md
Outdated
|
||
📌 Tasks: | ||
|
||
create a file `main.zig` in a folder called `src` with your logic to print the "hello world" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create instead of create.
You can add this, it makes the instructions more clear even if they are simple :) and if the architecture becomes harder to understand they can use it to see what changed from the beginning to the end.
src
└── main.zig
software/32.Zig/README.md
Outdated
|
||
📚 Documentation: | ||
|
||
> 💡 Zig file has `zig` extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's pretty obvious that it has the zig extension because you asked the user to create a main.zig file.
software/32.Zig/README.md
Outdated
📚 Documentation: | ||
|
||
> 💡 Zig file has `zig` extension. | ||
> 💡 Now, that you have created a file `main.zig`, you can use other files. To use them in your `main.zig` you have to integrate the module ([read more](https://stackoverflow.com/questions/71186556/how-do-i-include-one-zig-file-from-another-zig-file)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrase "you can use other files", like witch type of files, json files, db files, ... When you write something you need to be very explicit even if you think that they will understand. You can say something like, now if you want to use the code that you wrote in another files you can use modueles and then add the link, try to add the more explicit senteces that you can.
|
||
When you compile and run palindrome.zig, the output should be: | ||
|
||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you are printing "madam is palindrome: true", you should create an main function with the example so the user can understand how you test it even if it seems that the palindrome function returns a boolean and you print it then in the main function.
software/32.Zig/README.md
Outdated
|
||
## Step 3 - Fibonacci sequence | ||
|
||
> ❗ We strongly advise you to use the resources given for this exercise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way you don't need to add this warning everytime, use it one time at the beginning.
|
||
📑 Description: | ||
|
||
For the third exercise, you need to create a function that generates and displays the Fibonacci sequence up to a specified number of elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think there could be another exercice that the fibonacci? I don't think imlementing the Fibonacci sequence will use Zig features that are useful + this step has already been done in rust workshop, try to not copy the steps and only change the langage, people comming from the rust workshop will change a few keywords and they will finish the step, they learned nothing but just replace keywords from rurst to zig.
Description
merging the zig workshop on main
Changes include
Checklist