-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.qmd
186 lines (125 loc) · 6.07 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
engine: knitr
knitr: true
syntax-definition: "./Assets/zig.xml"
---
```{r}
#| include: false
source("./zig_engine.R")
knitr::opts_chunk$set(
auto_main = FALSE,
build_type = "run"
)
```
::: {.content-visible when-format="html"}
# Welcome {.unnumbered}
Welcome! This is the initial page for the "Open Access" HTML version of the book "Introduction to Zig: a project-based book",
written by [Pedro Duarte Faria](https://pedro-faria.netlify.app/).
This is an open book that provides an introduction to the [Zig programming language](https://ziglang.org/),
which is a new general-purpose, and low-level language for building robust and optimal software.
## Support the project! {.unnumbered}
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:
{{< include ./Assets/button.html >}}
### Sending donations directly
You can also donate some amount directly to the author of the project via:
- PayPal Donation.
- Revolut.
These are good ways 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.
### PayPal
{{< include ./Assets/paypal-button.html >}}
### Revolut
You can send money via Swift Payment with the following bank and Swift details:
```
Recipient: Pedro Duarte Faria
BIC/SWIFT Code: REVOSGS2
Account number: 6124512226
Name and address of the bank: Revolut Technologies Singapore Pte. Ltd, 6 Battery Road, Floor 6-01, 049909, Singapore, Singapore
Corresponding BIC: CHASGB2L
```
If you do have a Revolut account, you can scan the following QR code:
{{< include ./Assets/revolut-button.html >}}
:::
## About this book {.unnumbered}
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.
## About the author {.unnumbered}
Pedro Duarte Faria have a bachelor degree in Economics from Federal University of Ouro Preto - Brazil.
Currently, he is a Data Platform Engineer at [Blip](https://www.blip.ai/en/)[^blip], and
an Associate Developer for Apache Spark 3.0 certified by Databricks.
[^blip]: <https://www.blip.ai/en/>
The author have more than 4 years of experience in the data industry. Developing data products, pipelines,
reports and analysis for research institutions and some of the largest companies in the
brazilian financial sector, such as the BMG Bank, Sodexo and Pan Bank.
But Pedro is also a passionate software developer that loves to
learn and teach about programming.
Although Pedro uses many different languages in his work, he is specialized in the R programming language, and have given several
lectures and courses about it, inside graduate centers (such as PPEA-UFOP^[<https://ppea.ufop.br/>]),
in addition to federal and state organizations (such as FJP-MG^[<http://fjp.mg.gov.br/>]).
Personal Website: <https://pedro-faria.netlify.app/>
Linkedin: <https://www.linkedin.com/in/pedro-faria-a68140209/>
Mastodon: [\@pedropark99\@fosstodon.org](https://fosstodon.org/@pedropark99)
Twitter (X): [\@PedroPark9](https://twitter.com/PedroPark9)
## License {.unnumbered}
Copyright © 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].
[^cc-license]: <https://creativecommons.org/licenses/by/4.0/>
![](Figures/creative-commoms-88x31.png){width=88px}
## Book compilation metadata {.unnumbered}
This book was compiled using the following versions of [Zig](https://ziglang.org) and [Quarto](https://quarto.org):
```{r}
#| echo: false
#| results: 'asis'
source("./Scripts/zig-quarto-versions.R")
```
## Book citation {.unnumbered}
You can use the following BibTex entry to cite this book:
```
@book{pedro2024,
author = {Pedro Duarte Faria},
title = {Introduction to Zig},
subtitle = {a project-based book},
month = {October},
edition = {1},
year = {2024},
address = {Belo Horizonte},
url = {https://github.com/pedropark99/zig-book}
}
```
## Corresponding author and maintainer {.unnumbered}
Pedro Duarte Faria
Contact: [pedropark99\@gmail.com](mailto:[email protected])
Personal website: <https://pedro-faria.netlify.app/>
## Acknowledgments {.unnumbered}
This book is also a product of many conversations and exchanges that we had
with different people from the Zig community. I (Pedro Duarte Faria) am incredibly
grateful for these conversations, and also, for some direct contributions that we
had. Below we have a list of the people involved (name of the person with their usename in GitHub):
```{r}
#| echo: false
#| results: "asis"
c <- read.csv("contributors.txt")
n <- nrow(c)
user_names <- sprintf("(%s)", c$user_name)
user_names <- gsub("@", "\\\\@", user_names)
vec <- vector("character", n)
for (i in seq_len(n)) {
vec[i] <- paste(c$name[i], user_names[i])
}
cat(paste(vec, collapse = ", "), sep = "\n")
```