Releases: pedropark99/zig-book
v1.5.1
In this release we've added a build script (build.zig) to the ZigExamples folder. With this build script you can quickly compile all Zig modules (more specifically, the ones that are meant to be successfully compiled) written inside the ZigExamples subfolders. To run this script, do these steps:
$ cd ZigExamples
$ zig buildIs important to emphasize that not all Zig modules written inside the ZigExamples subfolder are included into this build script. Specially because not all of these Zig modules are meant to be "compileable". Some of them, are examples of "broken programs" (kinda Ziglings-style).
The main objective of this build script is to be a second "weapon", or, a second strategy that we can use to determine if the current code examples exposed in the book can be successfully compiled by the latest version of the Zig compiler. In more details, sometimes inside the book, I expose some code snippets that are not "self-contained", meaning that, they need some extra code around them to actually form a valid Zig program. I mostly do that in the book for brevity purposes (is unnecessary to expose the same code multiple times to the reader). Because of that, these code snippets that are not "self-contained" are usually not compiled when we build the book. Since we don't actively compile them, we don't get an active and frequent status/feedback on whether they are still valid (or not) snippets of Zig code, on the latest version of the compiler. As consequence, they can be easily overlooked in the book's updates process.
Therefore, this build script can help us on solving this issue.
v1.5.0
This release represents a big update to the book. The main objective of this release is to update all code examples in the book to Zig 0.16. This includes:
- update Chapter 9 (Build System) and Chapter 15 (Image filter project) to include the latest changes in the Zig build system. Many methods from
std.Build.Stepandstd.Build.Compilewere moved to other places. - update
_char_index()method on the Base64 project to fix issue reported at #185. - fix issue reported at #191 .
- with the introduction of the new
ioargument in many I/O related functions in the Zig Standard Library, this PR also updates many code examples scattered across the book to account for this new argument. - add a new section in Chapter 13 (Filesystem and I/O) to describe this new
ioargument in the Zig I/O interface. - many code examples from chapter 13 were not being actively compiled during the book compilation process. This PR also fixes this.
- with the new I/O interface, the
std.netmodule was completed removed in favor ofstd.Io.net, and this changed completely how network operations are made in Zig. This affected mainly the HTTP server project. So, this PR also updates Chapter 7 to account for this big update. - the new I/O interface changed how "sleep operations" are performed. So, this PR also updates Chapter 16 to include these changes.
- add a
build.zigto root ofZigExamplesfolder. This build script is not ready yet, so, it will definitely fail on most machines. There is still much work to be done on it. Although most of the code examples exposed across the book are being actively compiled by the Zig compiler everytime that we build the book, not all code examples exposed in the book are "self-contained", and some of them are intentionally designed to fail. So, building this build script onZigExampleswill be, in the future, an "extra/complementary test" to the build process of the book, to test if all code examples are compatible with the latest version of Zig.
v1.4.0
This release brings a big update to the book. Most of the updates were in code examples, more specifically, to fit them into the new Writer and Reader interface that was introduced in Zig 0.15.
What's Changed
- Update book code examples to Zig 0.15. Reported at #182 and fixed by @pedropark99 in #183
- Change CSS style of code snippets when book is in dark mode. Reported at #113 and fixed by @pedropark99 in #183
- Move Allocator to be the first parameter in function by @gaissmai in #178
- Fix typo by @subdigital in #173
- Fix typo by @gaissmai in #174
- Fix typo by @gaissmai in #175
- Fix typo by @gaissmai in #179
- Fix typo by @ariel-anieli in #171
- Add new contributors to the list by @pedropark99 in #180
New Contributors
- @subdigital made their first contribution in #173
- @gaissmai made their first contribution in #174
- @ariel-anieli made their first contribution in #171
Full Changelog: v1.3.6...v1.4.0
v1.3.6
Some news
After a request from the community, I've decided to add an EPUB option on Leanpub 🥳🍾🥂🎉🎉🎉 . In other words, you can now buy an EPUB version of the book on Leanpub if you prefer.
Also, I've decided to add a Nix Flake file to the project. Now, you can easily build the book by using this Nix Flake. The instructions are in the README. This Nix Flake file was highly inspired in a Nix Flake developed in a fork of the project by @bengtfrost.
What's Changed
- Add a Nix Flake for reproducible development environment by @pedropark99 in #166
- Some small fixes on Chapter 1 by @pedropark99 in #164
- The latest version of the Zig compiler changed the Linked List API, so, we have updated the sections on Chapter 11 to reflect this change by @pedropark99 in #168
- Some updates on README.md were added @pedropark99 in #169
- Add a quick comparison between the Zig
deferand the Godeferby @pedropark99 in #170 - Add epub format configs by @pedropark99 in #170
Full Changelog: v1.3.5...v1.3.6
v1.3.5
What's Changed
- Clarify about explicit data type in variable/mutable objects by @pedropark99 in #157
- Add fix for base64 decode length by @pedropark99 in #158
- Improve runtime vs comptime example by @pedropark99 in #159
- Publish fixes on string section by @pedropark99 in #162
- fix: has/have grammar and typo by @stickyburn in #161
New Contributors
- @stickyburn made their first contribution in #161
Full Changelog: v1.3.1...v1.3.5
v1.3.1
What's Changed
- Corrections for Chapter 16 by @HamzaWahed in #138
- Some small corrections for Chapter 17 by @HamzaWahed in #137
- Some small corrections for chapter 12 by @HamzaWahed in #136
- Fix syntax of get's -> gets by @mtlynch in #142
- Fixing typos and grammar by @glystik in #141
- Grammar corrections at Unittests Chapter by @lj-ditrapani in #134
- Fix references to web socket technology by @pedropark99 in #150
- Add function to check for minimum compiler version required to compile the book by @pedropark99 in #151
- Add new section to explain
pubkeyword by @pedropark99 in #152
New Contributors
- @mtlynch made their first contribution in #142
- @glystik made their first contribution in #141
- @lj-ditrapani made their first contribution in #134
Full Changelog: v1.3.0...v1.3.1
v1.3.0
What's Changed
I have some great news on this release. I decided to follow a suggestion from the community, and now, a PDF version of the book is available to purchase on the Leanpub platform 🥳🎉🎉🎉🎊🍾🥂.
https://leanpub.com/introductiontozigaproject-basedbook
Now, let's talk about the actual improvements that we had on the book from last release:
- A code example in the Pointers chapter was changed to have better compatibility with older versions of Zig, by @pedropark99 in #124
- A typo on Chapter 1 was fixed by @maarteNNNN in #131
- An unnecessary swear word was removed from chapter 4 by @Raphexion in #130
- Links to the PDF version of the book on Leanpub were added to the project by @pedropark99 in #132
New Contributors
We also had some new contributors in the project!
- @maarteNNNN made their first contribution in #131
- @Raphexion made their first contribution in #130
Full Changelog: v1.2.6...v1.3.0
v1.2.6
What's Changed
- Fix typo in Chapter 1 by @jorge-j1m in #122
- Grammar issue by @loveholly in #118
- Fix typos by @dbud in #119
- Small corrections for Chapter 2 by @HamzaWahed in #116
- Some small corrections for Chapter 3 by @HamzaWahed in #117
- Some small corrections for Chapter 5 by @HamzaWahed in #123
- Fix errors in code samples by @alexwheezy in #121
New Contributors
We have some new contributors!!! 🥳🎉🎊🍾
- @jorge-j1m made their first contribution in #122
- @loveholly made their first contribution in #118
- @dbud made their first contribution in #119
- @alexwheezy made their first contribution in #121
Full Changelog: v1.2.5...v1.2.6
v1.2.5
What's Changed
This release add several small fixes across the book. The most important fix made in this release is related to the build.zig.zon file. As reported by @Zorgatone , my previous explanation of this file was completely wrong, and this was solved in this release at #115 .
- First, a fix over a code example that was broken in the Build system chapter by @pedropark99 in #103
- Then, a PR was added to fix several issues that were reported by the community on the last month, by @pedropark99 in #115
- A devcontainer configuration file was added to the project by @santif in #101
- Small fixes were made in Chapter 1 by @HamzaWahed in #114
- And also, some more fixes and suggestions were applied by @mwilbur in #112
- A small fix by @Zorgatone in #107
New Contributors
We also had several new contributors in this release, which is awesome 🥳🎉🎊🍾
- @santif made their first contribution in #101
- @HamzaWahed made their first contribution in #114
- @mwilbur made their first contribution in #112
- @Zorgatone made their first contribution in #107
Full Changelog: v1.2.0...v1.2.5
v1.2.0
The main improvement that this release brings is a complete refactoring of the Zig engine that is used by the book to compile and run every Zig code example exposed across the book.
This refactoring actually brings some important improvements for the Zig engine, which are:
- greatly improve readability and code organization in the Zig engine.
- reduce the risk for bugs.
- adds documentation to the Zig engine source code.
- adds a much better error report. In other words, now is much better to understand the error messages that are generated during the compilation process of the book.
What's Changed
- Big refactoring on the Zig engine used by the book by @pedropark99 in #98
- Fix issue on while loop reported at #97
- Fix duplicated results from stderr by @pedropark99 in #99
Full Changelog: v1.1.4...v1.2.0