Skip to content

Commit

Permalink
Merge pull request #72 from pedropark99/amazon
Browse files Browse the repository at this point in the history
Add amazon links to buy book
  • Loading branch information
pedropark99 authored Oct 13, 2024
2 parents a8bbda6 + ca4e8e1 commit a68b507
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 15 deletions.
21 changes: 21 additions & 0 deletions Assets/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<style>
.btn {
border-radius: 5px;
background-color: #4f73e8;
border: #4f73e8;
opacity: 1;
transition: 0.3s;
}

.btn:hover {
background-color: #2144b6;
border: #2144b6;
}
</style>


<a href="https://www.amazon.com/dp/B0DJYMDRLP">
<button class="btn btn-primary" type="button">
Buy the book on Amazon!
</button>
</a>
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Contributing

You can contribute to this project in different ways. For example, these are some reasons why you could
First, you can contribute to this project by purchasing an eBook or a physical copy of this book on Amazon (link below).
This is a good way to support directly the author of the project, which helps to foster
more contents like this, and it makes possible for the author to keep writing helpful tools and
materials for the community.

<https://www.amazon.com/dp/B0DJYMDRLP>


But you can still contribute to this project in other ways. For example, these are some reasons why you could
[open new issues](https://github.com/pedropark99/zig-book/issues)
on the official repository of the project:

Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,49 @@
<a href=""><img src="Cover/cover-artv3.png" width="250" height="366" class="cover" align="right"/></a>

Hey! This is the official repository for the book "Introduction to Zig: a project-based book", written by Pedro Duarte Faria.
This book is still under active development, and, as a result, it's content might change drastically in the near future.
To know more about the book, checkout the [About this book](#about-this-book) section below.
You can read the current version of the book in your web browser: <https://pedropark99.github.io/zig-book/>.

The book is built using the publishing system [Quarto](https://quarto.org)
in conjunction with a little bit of R code (`zig_engine.R`), that is responsible for calling
the Zig compiler to compile and run the Zig code examples.


## Support the project!

If you like this project, and you want to support it, you can buy an eBook or a physical copy
of the book on Amazon (link below). This is a good way to support directly the author of the project, which helps to foster
more contents like this, and it makes possible for the author to keep writing helpful tools and
materials for the community.

<https://www.amazon.com/dp/B0DJYMDRLP>


## About this book

This an open (i.e. it is open-source), technical and introductory book for the [Zig programming language](https://ziglang.org/),
which is a new general purpose, and low-level programming language for building optimal and robust software.

Official repository of the book: <https://github.com/pedropark99/zig-book>.

This book is designed for both beginners and experienced developers. It explores the exciting world of Zig through small
and simple projects (in a similar style to the famous "Python Crash Course" book from Eric Matthes).
Some of these projects are: a Base64 encoder/decoder, a HTTP Server and an image filter.

As you work through the book, you will learn:

- The syntax of the language, and how it compares to C, C++ and Rust.
- Data structures, memory allocators, filesystem and I/O.
- Optionals as a new paradigm to handle nullability.
- How to test and debug a Zig application.
- Errors as values, and how to handle them.
- How to build C and Zig code with the build system that is embedded into the language.
- Zig interoperability with C.
- Parallelism with threads and SIMD.
- And more.



## How to build the book

This book depends on the three main pieces of software:
Expand Down
4 changes: 2 additions & 2 deletions _freeze/index/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "fd96a2440f10e4f553e00d48dd1a57dd",
"hash": "2d8dece2d9f600988e9fda0011b41fde",
"result": {
"engine": "knitr",
"markdown": "---\nengine: knitr\nknitr: true\nsyntax-definition: \"./Assets/zig.xml\"\n---\n\n\n\n\n\n\n\n\n::: {.content-visible when-format=\"html\"}\n\n# Welcome {.unnumbered}\n\nWelcome! This is the initial page for the \"Open Access\" HTML version of the book \"Introduction to Zig: a project-based book\",\nwritten by [Pedro Duarte Faria](https://pedro-faria.netlify.app/).\nThis is an open book that provides an introduction to the [Zig programming language](https://ziglang.org/),\nwhich is a new general-purpose, and low-level language for building robust and optimal software.\n\n## About this book {.unnumbered}\n\nThis an open book, meaning that, it is open-source, and it will always be open\nfor anyone that wants to read it. However, this book is still under construction 🚧 and active development,\nso, its contents might change drastically in the near future.\n\nAlso, this is a project-based book, which means that we learn how to use the Zig programming language\nthrough small and simple projects, in a similar style to the famous \"Python Crash Course\" book from Eric Matthes.\n\nOfficial book's repository: <https://github.com/pedropark99/zig-book>\n\n:::\n\n\n## About the author {.unnumbered}\n\nPedro Duarte Faria have a bachelor degree in Economics from Federal University of Ouro Preto - Brazil.\nCurrently, he is a Data Platform Engineer at [Blip](https://www.blip.ai/en/)[^blip], and\nan Associate Developer for Apache Spark 3.0 certified by Databricks.\n\n[^blip]: <https://www.blip.ai/en/>\n\n\nThe author have more than 4 years of experience in the data industry. Developing data products, pipelines,\nreports and analysis for research institutions and some of the largest companies in the\nbrazilian financial sector, such as the BMG Bank, Sodexo and Pan Bank.\n\nBut Pedro is also a passionate software developer that loves to\nlearn and teach about programming.\nAlthough Pedro uses many different languages in his work, he is specialized in the R programming language, and have given several\nlectures and courses about it, inside graduate centers (such as PPEA-UFOP^[<https://ppea.ufop.br/>]),\nin addition to federal and state organizations (such as FJP-MG^[<http://fjp.mg.gov.br/>]).\n\n\nPersonal Website: <https://pedro-faria.netlify.app/>\n\nLinkedin: <https://www.linkedin.com/in/pedro-faria-a68140209/>\n\nMastodon: [\\@pedropark99\\@fosstodon.org](https://fosstodon.org/@pedropark99)\n\nTwitter (X): [\\@PedroPark9](https://twitter.com/PedroPark9)\n\n## License {.unnumbered}\n\nCopyright © 2024 Pedro Duarte Faria. This book is licensed by the [CC-BY 4.0 Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/)[^cc-license].\n\n[^cc-license]: <https://creativecommons.org/licenses/by/4.0/>\n\n![](Figures/creative-commoms-88x31.png){width=88px}\n\n\n## Book compilation metadata {.unnumbered}\n\nThis book was compiled using the following versions of [Zig](https://ziglang.org) and [Quarto](https://quarto.org):\n\n\n\n\n- System version: Linux, 6.8.0-45-generic, NA, x86_64.\n- Zig version: 0.14.0-dev.1166+bb7050106.\n- Quarto version: 1.5.56.\n\n\n\n\n## Book citation {.unnumbered}\n\nYou can use the following BibTex entry to cite this book:\n\n```\n@book{pedro2024,\n author = {Pedro Duarte Faria},\n title = {Introduction to Zig},\n subtitle = {a project-based book},\n month = {October},\n edition = {1},\n year = {2024},\n address = {Belo Horizonte},\n url = {https://github.com/pedropark99/zig-book}\n}\n```\n\n## Corresponding author and maintainer {.unnumbered}\n\nPedro Duarte Faria\n\nContact: [pedropark99\\@gmail.com](mailto:[email protected])\n\nPersonal website: <https://pedro-faria.netlify.app/>\n\n\n## Acknowledgments {.unnumbered}\n\nThis book is also a product of many conversations and exchanges that we had\nwith different people from the Zig community. I (Pedro Duarte Faria) am incredibly\ngrateful for these conversations, and also, for some direct contributions that we\nhad. Below we have a list of the people involved (name of the person with their usename in GitHub):\n\n\n\n\nCalin Martinconi (\\@martinconic), Steffen Roller (\\@sroller), Chris Boesch (\\@chrboesch), Lv Sihan (\\@Pokryton), saurabh sharma. (\\@esskayesss), slackline (\\@slackline), Markus Kurz (\\@kurz-m), Rubin Simons (\\@rubin55)\n",
"markdown": "---\nengine: knitr\nknitr: true\nsyntax-definition: \"./Assets/zig.xml\"\n---\n\n\n\n\n\n\n\n\n\n::: {.content-visible when-format=\"html\"}\n\n# Welcome {.unnumbered}\n\nWelcome! This is the initial page for the \"Open Access\" HTML version of the book \"Introduction to Zig: a project-based book\",\nwritten by [Pedro Duarte Faria](https://pedro-faria.netlify.app/).\nThis is an open book that provides an introduction to the [Zig programming language](https://ziglang.org/),\nwhich is a new general-purpose, and low-level language for building robust and optimal software.\n\n## Support the project! {.unnumbered}\n\nIf you like this project, and you want to support it, you can buy an eBook or a physical copy\nof the book on Amazon (link below). This is a good way to support directly the author of the project, which helps to foster\nmore contents like this, and it makes possible for the author to keep writing helpful tools and\nmaterials for the community.\n\n\n<style>\n .btn {\n border-radius: 5px;\n background-color: #4f73e8;\n border: #4f73e8;\n opacity: 1;\n transition: 0.3s;\n }\n\n .btn:hover {\n background-color: #2144b6;\n border: #2144b6;\n }\n</style>\n\n\n<a href=\"https://www.amazon.com/dp/B0DJYMDRLP\">\n <button class=\"btn btn-primary\" type=\"button\">\n\tBuy the book on Amazon!\n </button>\n</a>\n\n\n\n:::\n\n\n## About this book {.unnumbered}\n\nThis an open (i.e. it is open-source), technical and introductory book for the [Zig programming language](https://ziglang.org/),\nwhich is a new general purpose, and low-level programming language for building optimal and robust software.\n\nOfficial repository of the book: <https://github.com/pedropark99/zig-book>.\n\nThis book is designed for both beginners and experienced developers. It explores the exciting world of Zig through small\nand simple projects (in a similar style to the famous \"Python Crash Course\" book from Eric Matthes).\nSome of these projects are: a Base64 encoder/decoder, a HTTP Server and an image filter.\n\nAs you work through the book, you will learn:\n\n- The syntax of the language, and how it compares to C, C++ and Rust.\n- Data structures, memory allocators, filesystem and I/O.\n- Optionals as a new paradigm to handle nullability.\n- How to test and debug a Zig application.\n- Errors as values, and how to handle them.\n- How to build C and Zig code with the build system that is embedded into the language.\n- Zig interoperability with C.\n- Parallelism with threads and SIMD.\n- And more.\n\n\n## About the author {.unnumbered}\n\nPedro Duarte Faria have a bachelor degree in Economics from Federal University of Ouro Preto - Brazil.\nCurrently, he is a Data Platform Engineer at [Blip](https://www.blip.ai/en/)[^blip], and\nan Associate Developer for Apache Spark 3.0 certified by Databricks.\n\n[^blip]: <https://www.blip.ai/en/>\n\n\nThe author have more than 4 years of experience in the data industry. Developing data products, pipelines,\nreports and analysis for research institutions and some of the largest companies in the\nbrazilian financial sector, such as the BMG Bank, Sodexo and Pan Bank.\n\nBut Pedro is also a passionate software developer that loves to\nlearn and teach about programming.\nAlthough Pedro uses many different languages in his work, he is specialized in the R programming language, and have given several\nlectures and courses about it, inside graduate centers (such as PPEA-UFOP^[<https://ppea.ufop.br/>]),\nin addition to federal and state organizations (such as FJP-MG^[<http://fjp.mg.gov.br/>]).\n\n\nPersonal Website: <https://pedro-faria.netlify.app/>\n\nLinkedin: <https://www.linkedin.com/in/pedro-faria-a68140209/>\n\nMastodon: [\\@pedropark99\\@fosstodon.org](https://fosstodon.org/@pedropark99)\n\nTwitter (X): [\\@PedroPark9](https://twitter.com/PedroPark9)\n\n## License {.unnumbered}\n\nCopyright © 2024 Pedro Duarte Faria. This book is licensed by the [CC-BY 4.0 Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/)[^cc-license].\n\n[^cc-license]: <https://creativecommons.org/licenses/by/4.0/>\n\n![](Figures/creative-commoms-88x31.png){width=88px}\n\n\n## Book compilation metadata {.unnumbered}\n\nThis book was compiled using the following versions of [Zig](https://ziglang.org) and [Quarto](https://quarto.org):\n\n\n\n\n\n- System version: Linux, 6.8.0-45-generic, NA, x86_64.\n- Zig version: 0.14.0-dev.1166+bb7050106.\n- Quarto version: 1.5.56.\n\n\n\n\n\n## Book citation {.unnumbered}\n\nYou can use the following BibTex entry to cite this book:\n\n```\n@book{pedro2024,\n author = {Pedro Duarte Faria},\n title = {Introduction to Zig},\n subtitle = {a project-based book},\n month = {October},\n edition = {1},\n year = {2024},\n address = {Belo Horizonte},\n url = {https://github.com/pedropark99/zig-book}\n}\n```\n\n## Corresponding author and maintainer {.unnumbered}\n\nPedro Duarte Faria\n\nContact: [pedropark99\\@gmail.com](mailto:[email protected])\n\nPersonal website: <https://pedro-faria.netlify.app/>\n\n\n## Acknowledgments {.unnumbered}\n\nThis book is also a product of many conversations and exchanges that we had\nwith different people from the Zig community. I (Pedro Duarte Faria) am incredibly\ngrateful for these conversations, and also, for some direct contributions that we\nhad. Below we have a list of the people involved (name of the person with their usename in GitHub):\n\n\n\n\n\nCalin Martinconi (\\@martinconic), Steffen Roller (\\@sroller), Chris Boesch (\\@chrboesch), Lv Sihan (\\@Pokryton), saurabh sharma. (\\@esskayesss), slackline (\\@slackline), Markus Kurz (\\@kurz-m), Rubin Simons (\\@rubin55)\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down
38 changes: 35 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ <h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#welcome" id="toc-welcome" class="nav-link active" data-scroll-target="#welcome">Welcome</a>
<ul class="collapse">
<li><a href="#support-the-project" id="toc-support-the-project" class="nav-link" data-scroll-target="#support-the-project">Support the project!</a></li>
<li><a href="#about-this-book" id="toc-about-this-book" class="nav-link" data-scroll-target="#about-this-book">About this book</a></li>
<li><a href="#about-the-author" id="toc-about-the-author" class="nav-link" data-scroll-target="#about-the-author">About the author</a></li>
<li><a href="#license" id="toc-license" class="nav-link" data-scroll-target="#license">License</a></li>
Expand Down Expand Up @@ -297,11 +298,42 @@ <h1 class="title">Introduction to Zig</h1>
<section id="welcome" class="level1 unnumbered">
<h1 class="unnumbered">Welcome</h1><p><img src="Cover/cover-artv3.png" title="Introduction to Zig" class="quarto-cover-image img-fluid"></p>
<p>Welcome! This is the initial page for the “Open Access” HTML version of the book “Introduction to Zig: a project-based book”, written by <a href="https://pedro-faria.netlify.app/">Pedro Duarte Faria</a>. This is an open book that provides an introduction to the <a href="https://ziglang.org/">Zig programming language</a>, which is a new general-purpose, and low-level language for building robust and optimal software.</p>
<section id="support-the-project" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="support-the-project">Support the project!</h2>
<p>If you like this project, and you want to support it, you can buy an eBook or a physical copy of the book on Amazon (link below). This is a good way to support directly the author of the project, which helps to foster more contents like this, and it makes possible for the author to keep writing helpful tools and materials for the community.</p>
<style>
.btn {
border-radius: 5px;
background-color: #4f73e8;
border: #4f73e8;
opacity: 1;
transition: 0.3s;
}

.btn:hover {
background-color: #2144b6;
border: #2144b6;
}
</style>
<p><a href="https://www.amazon.com/dp/B0DJYMDRLP"> <button class="btn btn-primary" type="button"> Buy the book on Amazon! </button> </a></p>
</section>
<section id="about-this-book" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="about-this-book">About this book</h2>
<p>This an open book, meaning that, it is open-source, and it will always be open for anyone that wants to read it. However, this book is still under construction 🚧 and active development, so, its contents might change drastically in the near future.</p>
<p>Also, this is a project-based book, which means that we learn how to use the Zig programming language through small and simple projects, in a similar style to the famous “Python Crash Course” book from Eric Matthes.</p>
<p>Official book’s repository: <a href="https://github.com/pedropark99/zig-book" class="uri">https://github.com/pedropark99/zig-book</a></p>
<p>This an open (i.e.&nbsp;it is open-source), technical and introductory book for the <a href="https://ziglang.org/">Zig programming language</a>, which is a new general purpose, and low-level programming language for building optimal and robust software.</p>
<p>Official repository of the book: <a href="https://github.com/pedropark99/zig-book" class="uri">https://github.com/pedropark99/zig-book</a>.</p>
<p>This book is designed for both beginners and experienced developers. It explores the exciting world of Zig through small and simple projects (in a similar style to the famous “Python Crash Course” book from Eric Matthes). Some of these projects are: a Base64 encoder/decoder, a HTTP Server and an image filter.</p>
<p>As you work through the book, you will learn:</p>
<ul>
<li>The syntax of the language, and how it compares to C, C++ and Rust.</li>
<li>Data structures, memory allocators, filesystem and I/O.</li>
<li>Optionals as a new paradigm to handle nullability.</li>
<li>How to test and debug a Zig application.</li>
<li>Errors as values, and how to handle them.</li>
<li>How to build C and Zig code with the build system that is embedded into the language.</li>
<li>Zig interoperability with C.</li>
<li>Parallelism with threads and SIMD.</li>
<li>And more.</li>
</ul>
</section>
<section id="about-the-author" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="about-the-author">About the author</h2>
Expand Down
Loading

0 comments on commit a68b507

Please sign in to comment.