Skip to content

Commit

Permalink
misc: fix typo in flake
Browse files Browse the repository at this point in the history
  • Loading branch information
codgician committed May 15, 2024
1 parent ae2a56d commit 00ae7b7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
slidePkgs = builtins.map mkSlidePkg slides;
in
rec {
packages = (builtins.listToAttrs (builtins.map (p: { name = p.name; value = p; }) slidePkgs)) // {
packages = (builtins.listToAttrs (builtins.map (p: { name = p.pname; value = p; }) slidePkgs)) // {
default = lib.seelies.mkSite {
inherit pkgs lib slidePkgs;
name = "seelies";
Expand Down
29 changes: 20 additions & 9 deletions slides/nix-intro/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ date: 2024.05.20

### Environment issues

::: { .fragment .fade-in-then-semi-out }
- Software today is almost **never self-contained**.
- Dependencies, both build time and run time, needs to be **compatible**.
- Components need to be able to **find** dependencies.
- Components may depend on **non-software artifacts** (e.g. databases).
:::

::: { .notes }

Expand Down Expand Up @@ -107,7 +109,7 @@ Building and deploying monolithic software could still be complex.

*Aren't we wasting storage spaces?*

::: { .fragment .incremental }
::: { .incremental }
- Split into layers and share common bases.
- Fetch files on-demand? (e.g. Zero Install System).
- Storage today is getting cheaper anyway...
Expand All @@ -125,11 +127,17 @@ Splitting monolithic architecture can never be fine-grained, because its motavat

::: { .incremental }
- Each component provide a set of constraints:
- Hard clauses, e.g. dependencies must exist.
- Soft clauses (weighted), e.g. version as new as possible.
- Goal: Satisfy all hard caluses, and maximize satisfied soft clauses.
- MAXSAT solver. e.g. rpm, apt, etc.
- MAXSAT is NP-complete.
- Hard clauses, e.g. a dependency must exist.
- Soft clauses, e.g. version as new as possible.
- Satisfy all hard clauses. Maximize satisfied soft clauses.
:::

::: { .fragment .fade-in style="color:red" }
MAXSAT problem (NP-complete).
:::

::: { .fragment .fade-in }
Implement pseudo-solvers, e.g. rpm, apt, etc.
:::

::: { .notes }
Expand Down Expand Up @@ -185,14 +193,14 @@ $$
$$

::: { .r-stack }
::: { .fragment .fade-out data-fragment-index="0" }
::: { .fragment .fade-out data-fragment-index="1" }
$$
\begin{CD}
x = 1, y = 2 @> f(x, y) = x + y >> 1 + 2 = 3
\end{CD}
$$
:::
::: { .fragment .current-visible data-fragment-index="0" }
::: { .fragment .current-visible data-fragment-index="1" }
$$
\begin{CD}
\text{gcc, libc, source, ...} @> \text{./configure, make, make install} >> \text{binary}
Expand All @@ -201,8 +209,11 @@ $$
:::
:::

---
## Dealing side-effects

## Derivation

## Nix Store


# Nix: as package manager
Expand Down

0 comments on commit 00ae7b7

Please sign in to comment.