Releases: pedropark99/zig-book
v1.7.0
v1.7.0
In this release we essentially updated the book to the latest stable release of Zig (0.16).
Not only that, the current version of the book also compiles now successfully in Windows. This was not previously possible because the previous versions of the book tried to use resources from the OS that were available only at runtime in Windows. So, this is a big win for the community, now that the book can be compiled in a different OS.
What's Changed
- Change how compilation steps are described in the book by @pedropark99 in #224
- Solves confusion about arrays vs slices by @pedropark99 in #225
- fix: change 'give it to' to 'give to it' by @alexandergill in #165
- Fix typo in section 13.1 by @el2e10 in #160
- Flush stdout after printing encoded and decoded text by @vincentme in #231
- Rename GeneralPurposeAllocator to DebugAllocator for Zig 0.16 by @ChrisGVE in #232
- Remove reddit reference by @pedropark99 in #233
New Contributors
- @alexandergill made their first contribution in #165
- @el2e10 made their first contribution in #160
- @vincentme made their first contribution in #231
- @ChrisGVE made their first contribution in #232
Full Changelog: v1.6.0...v1.7.0
v1.6.0
Main objective
This release adds a big refactoring to the book. The main objective of this update is to bring the book up-to-date with the latest master version (0.16) of the Zig compiler. So, basically, with this release, all examples in the book and the ZigExamples should compile successfully with the latest (0.16) version of the Zig compiler.
The changes includes:
- alter many of the code examples exposed across the book to fit the latest changes in the
std.Iotype; - alter many code examples that performs filesystem operations, since the File and Dir types were moved to std.Io module, which altered many function calls;
- remove the "Important note for Windows users" section from the first chapter of the book (with the new IO API in Zig, this problem became irrelevant);
- remove the "Thread pools" section from Chapter 16, mainly because the default/standard implementation of Thread pools offered by the Zig Standard Library was removed at 0.16.
Specific Zig compiler version used to compile the book: 0.16.0-dev.2676+4e2cec265
New Contributors
- @brendanny made their first contribution in #213
Full Changelog: v1.5.1...v1.6.0
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