Chapter L: Standing on the Shoulders of Giants

Every story has to have an ending.

Blix: Unless you’re like Why and you just vanish before ever finishing the book.

Well then, this would be the one way in which I could surpass Why. I can’t match his rhetoric or his plot or his vivid imagination, but at least I can finish a guide to a programming language.

At some moments while writing this book I felt like a five year attempting to shoot a basketball, holding the ball between both my hands even though it’s twice the size of my head. Pushing forward with arms but also my whole body, jumping off the ground, only for the ball to go half the distance of an adult’s throw, before bouncing pathetically on the ground.

Why the Lucky Stiff’s artistry and creativity may never be matched.

However, there is one huge, glaring, notable area where Why failed, and that is that his Poignant Guide to Ruby was never completed.

Like that five-year-old, grabbing on to his father’s leg in an attempt to trip him, I have grabbed on to the one weakness of Why’s Poignant Guide to Ruby which is visible at my eye-level. I am going to attempt to tackle the giant by doing the one thing he was unable to do, and finish this book.

Thank you for accompanying me on this journey. Thank you for letting me show you the truth of the beauty of Zig (and Ruby).

Thank you for letting me show you things that are certainly not true. I hope that you will be discerning and opinionated and discriminating in determining what those untrue things are and refusing to allow such lies into your codebases.

I hope that you will continue your Zig learning experience, that you will not let your curiosity be satiated by this small sampling of what the language has to offer, but that you continue to read other resources, such as:

The Official Language Reference (also included in every Zig download as langref.html)

Ziglings (learn Zig by fixing broken programs)

Zig.guide (a far shorter Zig guide with a far shorter domain name)

I hope that if you encounter bugs or issues with the Zig language or Zig packages, you will investigate and understand them and share your findings. The first step to creating bug-free programs is creating a community that is intolerant of bugs. That means being willing to put in the work to improve programs, not just for yourself with local patches and workarounds, but for the whole community with bug reports and pull requests.

In that spirit, if you see any typos, broken links, or examples that don’t run, please let me know. As GitHub has started sprinkling ads for their AI “programmer” into their website, they are not my first choice of hosting provider. However, I have put this guide on GitHub specifically to make it easy to contribute fixes.

GitHub - MatthiasPortzel/zig-guide

If you, like me, are not a fan of GitHub/Microsoft’s dominance in the code-sharing space, you can email me a patch file. Git is inherently decentralized, and has a mechanism for serializing a plaintext transportable format. My email is on my home page:

MatthiasPortzel.com

You can generate a patch file (for manual emailing) by running:

git format-patch -1 <commit-hash>

Thank you to Blix the Cat Actor for coming out of retirement for this role. You can see more of him by re-starting your Ruby-learning journey with Why’s Poignant Guide. And thank you to Why for reminding me that you can really write whatever you want on the internet.

Why’s Poignant Guide to Ruby

I want to give a thanks to Matthew Lugg for agreeing to be quoted in the section on integer types (although I did not explain the nature or premise of this guide at the time).

I want to give a thank to Andrew Kelley, the creator of the Zig programming language. I honestly believe that Andrew’s ability to translate the imperfect and broken shapes of real world problems into understandable and logical programming language primitives constitutes a type of genius. If you, like me, appreciate the genius of the Zig programming language and want to see it, and the ecosystem around it, continue to develop you can support the Zig core team by giving to the Zig Software Foundation. (The Zig Software Foundation is a U.S. 501(c)(3) non-profit, meaning that donations are tax deductible.)

Zig Software Foundation

If you want to support me, you can offer me a job writing Zig or Ruby.

YOU: What about the time machine? Do I build it? Do I get my memories back?

Well that’s your story. I hope that you do. I hope that you’re able to use Zig in order to create a device which defies all human (scientific and spiritual) understanding of the universe in order to undo the calamities of the future and prevent death, suffering, and ignorance. But I can’t promise that you will.

In fact, I can’t even promise that you did used to know Zig and then had your memory wiped.

YOU: But…

I mean, how would you know?

Maybe the key to fulfillment and happiness in your life is not found in time travel or a programming language. Maybe it’s in the few things that you do have, and in your potential to create more good things, and in community with others.

I wish you best of luck and look forward to seeing what you create.

Soli Deo gloria