Skip to content

Commit 8918b2f

Browse files
committed
refactor: replace codelst with codly
1 parent ee72377 commit 8918b2f

File tree

9 files changed

+122
-100
lines changed

9 files changed

+122
-100
lines changed

flake.lock

Lines changed: 13 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
typst-dev.url = "github:typst/typst";
88
typst-packages = {
99
flake = false;
10-
url = "github:typst/packages";
10+
url = "github:typst/packages/main";
1111
};
1212
pkgs-by-name-for-flake-parts.url = "github:drupol/pkgs-by-name-for-flake-parts";
1313
};

resources/typst/python-graph.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
size: 1em,
88
)
99
render(
10-
read("../../resources/graphviz/python.dot"),
10+
file: "../../../resources/graphviz/python.dot"),
1111
labels: (
1212
"pzf6dnxg8gf04xazzjdwarm7s03cbrgz-python3-3.10.12": [python3-3.10.12],
1313
"6947mfg2jlid97cnvzvc6cvv6wpj2yhg-bzip2-1.0.8": [bzip2-1.0.8],

src/thesis/2-reproducibility.typ

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -332,17 +332,16 @@ reproducibility at build time, but not at run time.
332332
#figure(
333333
{
334334
sourcefile(
335-
file: "montecarlo-pi.c",
336-
lang: "c",
337-
read("../../resources/sourcecode/montecarlo-pi.c"),
335+
lang: "C",
336+
file: "../../../resources/sourcecode/montecarlo-pi.c",
338337
)
339338
},
340-
caption: [`montecarlo-pi.c`],
339+
caption: [Sourcecode of montecarlo-pi.c],
341340
) <montecarlo-pi.c>
342341

343342
#figure(
344343
{
345-
shell(read("../../resources/sourcecode/montecarlo-pi-compilation.log"))
344+
shell(file: "../../../resources/sourcecode/montecarlo-pi-compilation.log")
346345
},
347346
caption: [
348347
Building the same source code multiple times always yields the same binary
@@ -365,7 +364,7 @@ the validity of the algorithm but rather is a characteristic of its
365364
probabilistic approach to problem-solving.
366365

367366
#figure(
368-
shell(read("../../resources/sourcecode/montecarlo-pi.c.log")),
367+
shell(file: "../../../resources/sourcecode/montecarlo-pi.c.log"),
369368
caption: [
370369
Running the binary multiple times does not always yields the same result
371370
],
@@ -398,9 +397,8 @@ key attributes for creating reliable and maintainable systems in the long run.
398397
#figure(
399398
{
400399
sourcefile(
401-
file: "montecarlo-pi.c",
402-
lang: "c",
403-
read("../../resources/sourcecode/montecarlo-pi-fix.c"),
400+
file: "../../../resources/sourcecode/montecarlo-pi-fix.c",
401+
lang: "C",
404402
)
405403
},
406404
caption: [`montecarlo-pi-fix.c` with deterministic random number generator],
@@ -418,9 +416,8 @@ build time.
418416
#figure(
419417
{
420418
sourcefile(
421-
file: "datetime.c",
422-
lang: "c",
423-
read("../../resources/sourcecode/datetime.c"),
419+
lang: "C",
420+
file: "../../../resources/sourcecode/datetime.c",
424421
)
425422
},
426423
caption: [Sourcecode of `datetime.c`, a C program with macros],
@@ -433,7 +430,7 @@ code. In such a case, runtime reproducibility between the original and another
433430
user is not assured.
434431

435432
#figure(
436-
shell(read("../../resources/sourcecode/datetime.c.log")),
433+
shell(file: "../../../resources/sourcecode/datetime.c.log"),
437434
caption: [
438435
An example of program that it neither reproducible at build time and
439436
run time.
@@ -468,9 +465,8 @@ pretty much impossible. We will consider these challenges in more detail in
468465

469466
#figure(
470467
sourcefile(
471-
file: "nodejs.dockerfile",
472-
lang: "dockerfile",
473-
read("../../resources/sourcecode/nodejs.dockerfile"),
468+
lang: "Dockerfile",
469+
file: "../../../resources/sourcecode/nodejs.dockerfile",
474470
),
475471
caption: [An example of `Dockerfile`],
476472
) <dockerfile-example>
@@ -1550,9 +1546,8 @@ reproducibility.
15501546

15511547
#figure(
15521548
sourcefile(
1553-
file: "composer.json",
15541549
lang: "json",
1555-
read("../../resources/sourcecode/composer.json"),
1550+
file: "../../../resources/sourcecode/composer.json",
15561551
),
15571552
caption: [A `composer.json` file, used by the PHP package manager, Composer],
15581553
) <composer-json>
@@ -1608,7 +1603,7 @@ Version information like commit identifiers can be used to precisely identify
16081603
the source code used to build a program.
16091604

16101605
#figure(
1611-
shell(read("../../resources/sourcecode/listing-typst-version.log")),
1606+
shell(file: "../../../resources/sourcecode/listing-typst-version.log"),
16121607
caption: [Example of program including a commit ID],
16131608
) <listing-typst-version>
16141609

@@ -1665,7 +1660,7 @@ the directory based on a specific criterion, such as their names or modification
16651660
timestamps.
16661661

16671662
#figure(
1668-
shell(read("../../resources/sourcecode/tar-sort-name-flag.log")),
1663+
shell(file: "../../../resources/sourcecode/tar-sort-name-flag.log"),
16691664
caption: [
16701665
Use of `--sort=name` flag to ensure a stable order of files in an archive
16711666
],
@@ -1703,7 +1698,7 @@ file system ordering, from specific file and archive formats.
17031698
==== Locale Environment Variables
17041699

17051700
#figure(
1706-
shell(read("../../resources/sourcecode/date-format-flags.log")),
1701+
shell(file: "../../../resources/sourcecode/date-format-flags.log"),
17071702
caption: [Use `LC_ALL` and `-u` flags to configure the date format],
17081703
) <listing-date-format-flags>
17091704

@@ -1745,7 +1740,7 @@ First, we compile the sourcecode twice, creating `build1` and `build2`:
17451740

17461741
#figure(
17471742
shell(
1748-
read("../../resources/sourcecode/bash/bash-gcc-not-reproducible-builds.log"),
1743+
file: "../../../resources/sourcecode/bash/bash-gcc-not-reproducible-builds.log",
17491744
),
17501745
caption: [
17511746
Compilation of non-reproducible programs and the use of their checksums for
@@ -1756,7 +1751,7 @@ First, we compile the sourcecode twice, creating `build1` and `build2`:
17561751
Then, we use `diffoscope` to compare these builds:
17571752

17581753
#figure(
1759-
shell(read("../../resources/sourcecode/bash/bash-diffoscope-comparison.log")),
1754+
shell(file: "../../../resources/sourcecode/bash/bash-diffoscope-comparison.log"),
17601755
) <bash-diffoscope-comparison>
17611756

17621757
The tool will generate a detailed report (@diffoscope-report) highlighting the
@@ -1789,7 +1784,7 @@ during the build process, ensuring consistency across compilations and thus
17891784
contributing to reproducibility.
17901785

17911786
#figure(
1792-
shell(read("../../resources/sourcecode/bash/bash-fixing-builds.log")),
1787+
shell(file: "../../../resources/sourcecode/bash/bash-fixing-builds.log"),
17931788
caption: [Fix builds using an environment variable],
17941789
) <bash-fixing-builds>
17951790

0 commit comments

Comments
 (0)