@@ -16,6 +16,8 @@ format:
1616 useTextContentForMissingTitles : false
1717 preview-links : true
1818 slide-number : true
19+ toc : true
20+ toc-depth : 1
1921 theme : [solarized, custom.scss]
2022 transition : fade
2123date : 2025-11-16
@@ -132,7 +134,7 @@ play(Rock(), Paper())
132134
133135# Arrays and <br > Linear Algebra
134136
135- ## Arrays
137+ ## Arrays{.scrollable}
136138
137139Julia has built-in support for multi-dimensional tensors:
138140
@@ -478,6 +480,53 @@ v = randn(20_000_000);
478480
479481# Good practices
480482
483+ ## Packaging
484+
485+ Julia has a built-in package manager:
486+
487+ ``` julia
488+ julia> # Press ] to enter the Pkg REPL mode
489+
490+ (@v1 .12 ) pkg> activate MyLocalEnvironment
491+ Activating new project at ` /private/tmp/MyLocalEnvironment`
492+
493+ (MyLocalEnvironment) pkg> add Example
494+ Updating registry at ` /var/folders/v2/hmy3kzgj4tb3xsy8qkltxd0r0000gn/T/tmp.tmYxNNrwBP/registries/General.toml`
495+ Resolving package versions...
496+ Installed Example ─ v0.5.5
497+ Updating ` /private/tmp/MyLocalEnvironment/Project.toml`
498+ [7876 af07] + Example v0.5.5
499+ Updating ` /private/tmp/MyLocalEnvironment/Manifest.toml`
500+ [7876 af07] + Example v0.5.5
501+ Precompiling packages finished.
502+ 1 dependency successfully precompiled in 1 seconds
503+
504+ (MyLocalEnvironment) pkg> status
505+ Status ` /private/tmp/MyLocalEnvironment/Project.toml`
506+ [7876 af07] Example v0.5.5
507+ ```
508+
509+ ## Virtual environments
510+
511+ Virtual environments are defined by two files:
512+
513+ * `Project.toml`: only top-level dependencies, with compatibility specifications (automatically generated by Pkg, but can be edited by users)
514+ * `Manifest.toml`: full snapshot of all packages in the environment, for reproducibility (fully machine-generated, do not touch it)
515+
516+ ## Virtual environments (cont.)
517+
518+ `Project.toml`:
519+ ``` `{. toml}
520+ {{< include Project. toml > }}
521+ ``` `
522+
523+ ## Virtual environments (cont.)
524+
525+ `Manifest.toml`:
526+ ``` `{. toml}
527+ {{< include Manifest. toml > }}
528+ ``` `
529+
481530## Testing
482531
483532``` {julia}
@@ -494,8 +543,6 @@ using Test, Random
494543end ;
495544```
496545
497- ## Packaging
498-
499546# Conclusions
500547
501548## Further resources
0 commit comments