Skip to content

Commit 30b4bbe

Browse files
committed
feat: add #eg function
1 parent f023a93 commit 30b4bbe

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

src/thesis/2-reproducibility.typ

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,8 @@ of software without legal or technical barriers. This flexibility is vital for
540540
verifying and replicating studies, as researchers can adapt the software for
541541
their specific needs without restrictions, though some licences may impose
542542
certain conditions. Additionally, open-source development tools provide
543-
excellent record-keeping capabilities, like version control systems (e.g.,
544-
`git`, Mercurial, Pijul), enabling researchers to track changes and understand
543+
excellent record-keeping capabilities, like version control systems #eg[
544+
`git`, Mercurial, Pijul], enabling researchers to track changes and understand
545545
the context of each update. This aspect is essential for reproducing and
546546
validating research findings.
547547

@@ -620,7 +620,7 @@ execution, a data analysis, a data transformation.
620620
- When evaluating a function, method, or procedure in any programming language,
621621
the input consists of the function itself along with its parameters. The
622622
output is the result of the function applied to these parameters, including
623-
any potential side effects (e.g., changes in the program's state).
623+
any potential side effects #eg[changes in the program's state].
624624

625625
#definition(term: "Computation", name: "def-computation")[
626626
A computation $c$ is a set of one or more functions $f:I times E → R$.
@@ -689,9 +689,9 @@ operations.
689689
In #gls("CS") (@functions-in-cs), a function necessitates an environment in
690690
which it will be evaluated, effectively making, to some extent, this environment
691691
an extra input parameter per se. This computational environment, which
692-
encompasses the hardware (e.g., filesystem, memory, #gls("CPU", long: false)),
693-
software (e.g., #gls("OS", long: false)) and date (e.g., the current date and
694-
time), may influence the function's behaviour and output. Consequently,
692+
encompasses the hardware #eg[(filesystem, memory, #gls("CPU", long: false)],
693+
software #eg[#gls("OS", long: false)] and date #eg[the current date and
694+
time], may influence the function's behaviour and output. Consequently,
695695
functions in #gls("CS") are inherently designed to interact with and adapt to
696696
their environment, thereby making them dynamic and versatile but also
697697
potentially non-deterministic.
@@ -743,9 +743,9 @@ reproducibility of the computations discussed.
743743
In the context of software compilation, an output is correct when it faithfully
744744
reflects the state of its transitive inputs. Basically, the output represents
745745
all direct and indirect dependencies used in the build process.
746-
"Transitive inputs" refer to not only the direct inputs (e.g., source code) but
747-
also to the inputs of those inputs (e.g., libraries, frameworks, compilers, data
748-
resources).
746+
"Transitive inputs" refer to not only the direct inputs #eg[source code] but
747+
also to the inputs of those inputs #eg[libraries, frameworks, compilers, data
748+
resources].
749749

750750
From the point of view of the software build process as shown in
751751
@inputs-outputs-part1, the inputs are all the source code files, configuration
@@ -1016,8 +1016,8 @@ unique" is used because, in theory, it is possible for two different inputs to
10161016
produce the same hash, an occurrence known as a #emph[collision]. The ability to
10171017
find collisions undermines the security of the algorithm. There are different
10181018
types of algorithms to calculate a checksum
1019-
(e.g., #gls("MD5", long: false), #gls("SHA1", long: false),
1020-
#gls("SHA2", long: false)). Older algorithms like #gls("MD5", long: false) have
1019+
#eg[#gls("MD5", long: false), #gls("SHA1", long: false),
1020+
#gls("SHA2", long: false)]. Older algorithms like #gls("MD5", long: false) have
10211021
known vulnerabilities that allow collision attacks while more modern algorithms
10221022
like SHA-256 (#gls("SHA2", long: false)) are currently considered to be pretty
10231023
much impossible to crack.
@@ -1371,7 +1371,7 @@ source code. This variance highlights a significant reproducibility challenge,
13711371
as achieving bitwise identical results across architectures is *not feasible* as
13721372
of today.
13731373

1374-
Compilers (e.g., GCC, Rustc, #LaTeX, Typst) also play a role in software
1374+
Compilers #eg[GCC, Rustc, #LaTeX, Typst] also play a role in software
13751375
development, transforming high-level code into machine-level instructions.
13761376
However, not all compilers operate deterministically. In this context,
13771377
non-determinism refers to the phenomenon where compilers produce different

src/thesis/3-tools.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ been pinned to a specific commit at lines 1 and 7.
477477
consistently, regardless of any upstream updates. While using a digest to pin
478478
the base image ensures immutability, the `apk` package manager does not
479479
support a similar mechanism, only tags are supported. It's important to be
480-
aware of the limitations of the tools (e.g., the `apk` package manager) used
480+
aware of the limitations of the tools #eg[the `apk` package manager] used
481481
in the base image, as even with precautions, variability in the build process
482482
may still be introduced.
483483
]

src/thesis/4-conclusion.typ

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ the intermediary VM layer. On Linux based architectures, the performance are not
190190
as good as running the software natively without containerisation, but it
191191
remains acceptable for most use cases. Although initiatives like DevContainer
192192
#cite(<devcontainer>, form: "normal") aim to offer a more integrated experience
193-
with #glspl("IDE", long: false) (e.g., Visual Studio Code
194-
#cite(<vscode>, form: "normal")), working within a container introduces an
193+
with #glspl("IDE", long: false) #eg[Visual Studio Code
194+
#cite(<vscode>, form: "normal")], working within a container introduces an
195195
additional layer of complexity. This can be particularly challenging to manage
196196
when dealing with aspects such as networking, storage, and security.
197197

@@ -306,7 +306,7 @@ consistency and reliability in package management.
306306
choice. With two decades of maturity and robustness, the Nix ecosystem is, in
307307
my view, currently the best concept for implementing reproducibility in
308308
#gls("SE"). I am convinced that Nix, or a similar technology that embraces the
309-
same principles (e.g., @guixwebsite, @lix, @aux), has the potential to
309+
same principles #eg[@guixwebsite, @lix, @aux], has the potential to
310310
revolutionise the way software is built, used, audited, deployed and shared.
311311
]
312312

@@ -347,7 +347,7 @@ evaluation.
347347
Achieving software build reproducibility across different operating systems and
348348
architectures is not feasible for certain types of build outputs, typically
349349
binaries (@ch2-r13y-utopia). Binary build outputs depend on the #gls("CPU")
350-
architecture (e.g., `x86`, `ARM`) because converting source code into machine
350+
architecture #eg[`x86`, `ARM`] because converting source code into machine
351351
code uses a set of #gls("CPU") instructions directly inherited from the
352352
#gls("CPU") architecture. Therefore, obtaining binaries that are identical
353353
across every architecture is unlikely to occur. This inherent dependency means

src/thesis/imports/workarounds.typ

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,10 @@
5454
));h(-8.0pt)
5555
}
5656

57+
#let eg = content => {
58+
[
59+
(e.g., #content)
60+
]
61+
}
62+
5763
#show "LaTeX": LaTeX

0 commit comments

Comments
 (0)