maintenance/talks/fosdem-2021/declaratively/talk.tex

624 lines
19 KiB
TeX

% The comment below tells Rubber to compile the .dot files.
%
% rubber: module graphics
% rubber: rules rules.ini
% Make sure URLs are broken on hyphens.
% See <https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url>.
\RequirePackage[hyphens]{url}
\documentclass[aspectratio=169]{beamer}
\usetheme{default}
\usefonttheme{structurebold}
% Nice sans-serif font.
\usepackage[sfdefault,lining]{FiraSans} %% option 'sfdefault' activates Fira Sans as the default text font
\renewcommand*\oldstylenums[1]{{\firaoldstyle #1}}
% Nice monospace font.
\usepackage{inconsolata}
%% \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref,xspace,multicol}
\usecolortheme{seagull} % white on black
\usepackage[absolute,overlay]{textpos}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,trees,shadows,positioning}
\usepackage{fancyvrb} % for '\Verb'
\usepackage{xifthen} % for '\isempty'
% Remember the position of every picture.
\tikzstyle{every picture}+=[remember picture]
\tikzset{onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}} % \pgfkeysalso doesn't change the path
}}
% Colors.
\definecolor{guixred1}{RGB}{226,0,38} % red P
\definecolor{guixorange1}{RGB}{243,154,38} % guixorange P
\definecolor{guixyellow}{RGB}{254,205,27} % guixyellow P
\definecolor{guixred2}{RGB}{230,68,57} % red S
\definecolor{guixred3}{RGB}{115,34,27} % dark red
\definecolor{guixorange2}{RGB}{236,117,40} % guixorange S
\definecolor{guixtaupe}{RGB}{134,113,127} % guixtaupe S
\definecolor{guixgrey}{RGB}{91,94,111} % guixgrey S
\definecolor{guixdarkgrey}{RGB}{46,47,55} % guixdarkgrey S
\definecolor{guixblue1}{RGB}{38,109,131} % guixblue S
\definecolor{guixblue2}{RGB}{10,50,80} % guixblue S
\definecolor{guixgreen1}{RGB}{133,146,66} % guixgreen S
\definecolor{guixgreen2}{RGB}{157,193,7} % guixgreen S
\definecolor{rescienceyellow}{RGB}{254,246,91}
\setbeamerfont{title}{size=\huge}
\setbeamerfont{frametitle}{size=\huge}
\setbeamerfont{normal text}{size=\Large}
% White-on-black color theme.
\setbeamercolor{structure}{fg=guixorange1,bg=black}
\setbeamercolor{title}{fg=white,bg=black}
\setbeamercolor{date}{fg=guixorange1,bg=black}
\setbeamercolor{frametitle}{fg=white,bg=black}
\setbeamercolor{titlelike}{fg=white,bg=black}
\setbeamercolor{normal text}{fg=white,bg=black}
\setbeamercolor{alerted text}{fg=guixyellow,bg=black}
\setbeamercolor{section in toc}{fg=white,bg=black}
\setbeamercolor{section in toc shaded}{fg=white,bg=black}
\setbeamercolor{subsection in toc}{fg=guixorange1,bg=black}
\setbeamercolor{subsection in toc shaded}{fg=white,bg=black}
\setbeamercolor{subsubsection in toc}{fg=guixorange1,bg=black}
\setbeamercolor{subsubsection in toc shaded}{fg=white,bg=black}
\setbeamercolor{frametitle in toc}{fg=white,bg=black}
\setbeamercolor{local structure}{fg=guixorange1,bg=black}
\newcommand{\highlight}[1]{\alert{\textbf{#1}}}
\title{Declaratively Yours}
\author{Ludovic Courtès}
\date{5 November 2020}
\setbeamertemplate{navigation symbols}{} % remove the navigation bar
\AtBeginSection[]{
\begin{frame}
\frametitle{}
\tableofcontents[currentsection]
\end{frame}
}
\newcommand{\screenshot}[2][width=\paperwidth]{
\begin{frame}[plain]
\begin{tikzpicture}[remember picture, overlay]
\node [at=(current page.center), inner sep=0pt]
{\includegraphics[{#1}]{#2}};
\end{tikzpicture}
\end{frame}
}
\begin{document}
\begin{frame}[plain, fragile]
\begin{tikzpicture}[remember picture, overlay]
\node [at=(current page.center), inner sep=0pt]
{\includegraphics[width=\paperwidth]{images/os-declaration}};
\node [at=(current page.center), minimum width=\paperwidth,
minimum height=1.1\paperheight, fill=guixred3, opacity=.5]{};
\end{tikzpicture}
\vspace{27mm}
\Huge{\textbf{Declaratively Yours}}
\\[0.5cm]
\LARGE{Composing system abstractions with GNU~Guix}
\\[2cm]
\large{Ludovic Courtès}
\\[2mm]
\alert{FOSDEM, \oldstylenums{7 February 2021}}
\end{frame}
\setbeamercolor{normal text}{fg=black,bg=white}
% https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html#desired-state-and-idempotency
\screenshot{images/ansible-state}
\setbeamercolor{normal text}{fg=white,bg=guixdarkgrey}
\begin{frame}[fragile]
\vspace{1cm}
\small{
\begin{semiverbatim}
\{ \tikz[baseline]{\node[anchor=base](formalparams){fetchurl, stdenv};} \}\tikz[baseline]{\node[anchor=base](colon){:};}
\tikz[baseline]{\node[anchor=base](stdenv){stdenv};}.\tikz[baseline]{\node[anchor=base](funcall){\alert<1>{mkDerivation}};} \{
name = "hello-2.3";
src = fetchurl \{
url = mirror://gnu/hello/hello-2.3.tar.bz2;
sha256 = "0c7vijq8y68...";
\};
meta = \{
description = "Produce a friendly greeting";
homepage = http://www.gnu.org/software/hello/;
license = "GPLv3+";
\};
\}
\end{semiverbatim}
%% \uncover<2->{\tikz[baseline]{\node[anchor=base](bash){preCheck = "echo 'Test suite coming up!'";};}}
}
\begin{textblock}{5}(10, 3)
\tikz{\node<1>(labelcolon)[fill=white, text=black]{function definition};}
\end{textblock}
\begin{textblock}{5}(11, 6)
\tikz{\node<1>(labelfuncall)[fill=white, text=black]{function call};}
\end{textblock}
%% \begin{textblock}{5}(11, 9)
%% \tikz{\node<2>(labelbash)[fill=white, text=black]{Bash snippet};}
%% \end{textblock}
\begin{tikzpicture}[overlay]
\path[->, thick]<1>(labelcolon) edge (colon);
\path[->, thick]<1>(labelfuncall) edge (funcall);
%% \path[->, thick]<2>(labelbash) edge (bash);
\end{tikzpicture}
\end{frame}
\setbeamercolor{normal text}{fg=white,bg=guixred3}
\begin{frame}[plain]
\LARGE{
Bill of rights:
\begin{enumerate}
\item What You Declare is What You Get
\item Declarations Bring Structure
\end{enumerate}
}
\end{frame}
\setbeamercolor{normal text}{fg=white,bg=black}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=guixblue2}
\begin{frame}[plain]
\Huge{\textbf{The package structure.}}
\end{frame}
\setbeamercolor*{normal text}{fg=black,bg=white}
\begin{frame}[plain]
\begin{tikzpicture}[overlay]
\node [at=(current page.center), inner sep=0mm]{
\includegraphics[width=0.8\textwidth]{images/coreutils-graph}
};
\node (command) [at=(current page.south east), text=black,
text opacity=1., anchor=south east, inner sep=3mm]{
\texttt{guix graph --type=\textbf{package} coreutils}
};
\node [at=(current page.south west), anchor=south west,
inner sep=3mm, text=black, text opacity=1]{
\Large{\textbf{14 nodes}}
};
\node<2->[fill=guixorange1, text=black, text opacity=1, opacity=.7,
rounded corners=2mm, inner sep=5mm, at=(current page.center)] {
\textbf{\Large{Where are GCC, libc, etc.?}}
};
\end{tikzpicture}
\end{frame}
\begin{frame}[plain]
\begin{tikzpicture}[overlay]
\node [at=(current page.center), inner sep=0mm]{
\includegraphics[width=0.8\textwidth]{images/coreutils-emerged-graph}
};
\node [at=(current page.south west), anchor=south west,
inner sep=3mm, text=black, text opacity=1]{
\Large{\textbf{33 nodes}}
};
\node [at=(current page.south east), anchor=south east,
inner sep=3mm, text=black, text opacity=1]{
\texttt{guix graph --type=bag-emerged coreutils}
};
\node<2->[fill=guixorange1, text=black, text opacity=1, opacity=.7,
rounded corners=2mm, inner sep=5mm, at=(current page.center)] {
\textbf{\Large{What about the compiler's compiler, etc.?}}
};
\end{tikzpicture}
\end{frame}
\begin{frame}[plain]
\begin{tikzpicture}[overlay]
\node [at=(current page.center), inner sep=0mm, text=black]{
%% \includegraphics[height=0.5\textheight]{images/coreutils-bag-graph}
(too big)
};
\node [at=(current page.south west), anchor=south west,
inner sep=3mm, text=black, text opacity=1]{
\Large{\textbf{120 nodes}}
};
\node [at=(current page.south east), anchor=south east,
inner sep=3mm, text=black, text opacity=1]{
\texttt{guix graph --type=bag coreutils}
};
\end{tikzpicture}
\end{frame}
\begin{frame}[plain]
\begin{tikzpicture}[overlay]
\node [at=(current page.center), inner sep=0mm,
inner sep=3mm, text=black, text opacity=1]{
%\includegraphics[width=\textwidth]{images/coreutils-bag-graph}
(too big)
};
\node [at=(current page.south west), anchor=south west,
inner sep=3mm, text=black, text opacity=1]{
\Large{\textbf{455 nodes}}
};
\node [at=(current page.south east), anchor=south east,
inner sep=3mm, text=black, text opacity=1]{
\texttt{guix graph --type=derivation coreutils}
};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=guixgrey}
\begin{frame}[fragile]
\begin{semiverbatim}
(define audacity
(\alert{package}
(name "audacity")
(home-page "https://github.com/audacity/audacity")
(\alert{source} (origin
(method git-fetch)
(uri (git-reference
(\alert{url} home-page)
(\alert{commit} "2f30ff07a")\tikz{\node(commit){};}
(recursive? #t)))
(sha256
(base32
"106rf402cvfdhc2yf\textrm{...}"))))
\textrm{...}))
\end{semiverbatim}
\begin{tikzpicture}[overlay]
\node<2->(swh) [inner sep=3mm, rounded corners, fill=black,
opacity=.3, text opacity=1] at (12,5) {
% https://annex.softwareheritage.org/public/logo/
\includegraphics[width=0.33\textwidth]{images/software-heritage-logo-title-white}
};
\node<2-> [at=(current page.south), anchor=south,
inner sep=4mm, outer sep=4mm, rounded corners, fill=black,
opacity=.3, text opacity=1] {
\Large{\texttt{guix lint -c \alert{archival} audacity}}
};
\path<2->[very thick, draw=guixorange1]
(commit) edge [out=0, in=-90, ->] (swh);
\end{tikzpicture}
\end{frame}
\begin{frame}[fragile]
\begin{semiverbatim}
\Large{
$ guix \alert{install} gcc-toolchain openmpi hwloc
\textrm{...}
\alert{hint}: Consider setting the necessary environment
variables by running:
GUIX\_PROFILE="$HOME/.guix-profile"
. "$GUIX\_PROFILE/etc/profile"
Alternatively, see `guix package --search-paths'.
}
\end{semiverbatim}
\end{frame}
\begin{frame}[fragile]
\begin{semiverbatim}
\large{
(\alert{define} gcc
(\alert{package}
;; \textrm{...}
(native-search-paths
(list (\alert{search-path-specification}
(variable "C\_INCLUDE\_PATH")
(files '("include")))
(\alert{search-path-specification}
(variable "CPLUS\_INCLUDE\_PATH")
(files '("include/c++" "include")))
(\alert{search-path-specification}
(variable "LIBRARY\_PATH")
(files '("lib" "lib64")))))))
}
\end{semiverbatim}
\end{frame}
\setbeamercolor{normal text}{bg=guixdarkgrey}
\begin{frame}[fragile]
\begin{semiverbatim}
\LARGE{
guix pack hwloc \\
\alert{--with-source}=./hwloc-2.1rc1.tar.gz
guix install emacs-next \\
\alert{--with-branch}=emacs-next=master
guix build guix \\
\alert{--with-latest}=guile-json
}
\end{semiverbatim}
\end{frame}
\begin{frame}
\Large{
\begin{itemize}
\item \texttt{--with-patch}
\item \texttt{--with-input}
\item \texttt{--with-c-toolchain}
\item \texttt{--with-debug-info}
\item \texttt{--with-graft}
\item ...
\end{itemize}
}
\end{frame}
\begin{frame}[plain, fragile]
\begin{semiverbatim}
\Large{
(\alert{define} (make-glibc-utf8-locales locales)
(\alert{package}
(name "glibc-utf8-locales")
\textrm{...}))
(\alert{define} glibc-utf8-locales
(make-glibc-utf8-locales (list "ca\_ES.utf8" \textrm{...})))
}
\end{semiverbatim}
\end{frame}
\begin{frame}[plain, fragile]
\vspace{-3mm}
\begin{semiverbatim}
\Large{
(\alert{define} emacs
(\alert{package}
(name "emacs")
\textrm{...}))
(\alert{define} emacs-no-x
(\alert{package/inherit} emacs
(name "emacs-no-x")
\textrm{...}))
(\alert{define} emacs-xwidgets
(\alert{package/inherit} emacs
(name "emacs-xwidgets")
\textrm{...}))
}
\end{semiverbatim}
\begin{tikzpicture}[overlay]
\node<2-> [at=(current page.center), opacity=.6, fill=guixyellow,
text=black, text opacity=1,
minimum height=\paperheight, minimum width=\paperwidth] {
\LARGE{What if we could declare \textbf{package parameters}?}
};
\node<3-> at (14,6) [anchor=north east,
inner sep=1mm, rotate=-30, shape=star,
fill=guixorange1, text=white] {
\Large{\textbf{WIP!}}
};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=guixblue1}
\begin{frame}[plain]
\Huge{\textbf{Package collections.}}
\end{frame}
\setbeamercolor{normal text}{bg=guixgrey}
\begin{frame}[fragile]
\begin{semiverbatim}
\LARGE{
guix package \alert{--manifest}=my-packages.scm
(\alert{specifications->manifest}
'("emacs" "emacs-geiser"
"guile" "guile-picture-language"))
}
\end{semiverbatim}
\end{frame}
\begin{frame}[fragile]
\begin{semiverbatim}
\LARGE{
guix \alert{install} emacs
guix \alert{install} guile guile-picture-language
guix \alert{install} emacs-geiser
}
\end{semiverbatim}
\begin{tikzpicture}[overlay]
\node<2->[at=(current page.center), minimum width=\paperwidth,
minimum height=\paperheight, fill=guixred3, opacity=.8]{
\LARGE{\texttt{guix package \alert{--export-manifest}}}
};
\node<2-> at (14,6) [anchor=north east,
inner sep=1mm, rotate=-30, shape=star,
fill=guixorange1, text=white] {
\Large{\textbf{New!}}
};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=guixblue1}
\begin{frame}[plain]
\Huge{\textbf{Systems.}}
\end{frame}
\setbeamercolor{normal text}{bg=guixgrey}
% https://commons.wikimedia.org/wiki/File:Magnifying_glass_CC0.svg
\begin{frame}[fragile]
\begin{semiverbatim}
\vspace{-1cm}
\small{
(\alert{operating-system}
(host-name "guixbox")
(timezone "Europe/Brussels")
(locale "fr_BE.utf8")
(bootloader (\alert{bootloader-configuration}
(bootloader grub-efi-bootloader)
(target "/boot/efi")))
(file-systems (append (list (\alert{file-system}
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4")))
%base-file-systems))
(users (append (list (\alert{user-account}
(name "charlie")
(group "users")
(home-directory "/home/charlie")))
%base-user-accounts))
(services (append (list (\alert{service} dhcp-client-service-type)
(\alert{service} openssh-service-type))
%base-services)))
}
\end{semiverbatim}
\begin{tikzpicture}[overlay]
\node<6-> [at=(current page.center)]{
\includegraphics[width=0.33\textwidth]{images/Magnifying_glass_CC0}
};
\end{tikzpicture}
\begin{tikzpicture}[overlay]
\node<2-5> [at=(current page.center), fill=black, opacity=.6, text opacity=1,
minimum width=\paperwidth, minimum height=\paperheight] {
\LARGE{
\texttt{guix system \alert{\only<2>{vm}\only<3>{docker-image}\only<4>{container}\only<5>{reconfigure}} config.scm}
}
};
\end{tikzpicture}
\end{frame}
\begin{frame}[fragile, plain]
\begin{tikzpicture}[overlay]
\node [at=(current page.center)] {
\includegraphics[width=0.33\textwidth]{images/Magnifying_glass_CC0}
};
\node [at=(current page.north east), anchor=north east,
outer sep=5cm, rotate=-30, shape=star,
fill=guixorange1, text=white] {
\Large{\textbf{New!}}
};
\node [at=(current page.south), anchor=south, inner sep=5mm] {
\Large{\url{https://notabug.org/civodul/guix-explorer}}
};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=guixblue1}
\begin{frame}[plain]
\Huge{\textbf{Wrap-up.}}
\end{frame}
\setbeamercolor{normal text}{bg=white}
\begin{frame}[fragile, plain]
\begin{tikzpicture}[overlay]
\node [at=(current page.west), anchor=west]{
\includegraphics[height=.8\paperheight]{images/tradeoff}
};
\end{tikzpicture}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=black}
\begin{frame}[plain]
\vfill{
\vspace{1.5cm}
\center{\includegraphics[width=0.3\textwidth]{images/Guix-white}}\\[1.0cm]
{\alert{\url{https://guix.gnu.org/}}}\hfill{\texttt{ludo@gnu.org}}
}
\end{frame}
\begin{frame}{}
\begin{textblock}{12}(2, 7)
\tiny{
Copyright \copyright{} 2010, 2012--2021 Ludovic Courtès \texttt{ludo@gnu.org}.\\[3.0mm]
GNU Guix logo, CC-BY-SA 4.0, \url{https://gnu.org/s/guix/graphics}.
\\[1.5mm]
FIXME Magnifying glass picture \copyright{} FIXME
\url{https://commons.wikimedia.org/wiki/File:Magnifying_glass_CC0.svg}
\\[1.5mm]
Copyright of other images included in this document is held by
their respective owners.
\\[3.0mm]
This work is licensed under the \alert{Creative Commons
Attribution-Share Alike 3.0} License. To view a copy of this
license, visit
\url{https://creativecommons.org/licenses/by-sa/3.0/} or send a
letter to Creative Commons, 171 Second Street, Suite 300, San
Francisco, California, 94105, USA.
\\[2.0mm]
At your option, you may instead copy, distribute and/or modify
this document under the terms of the \alert{GNU Free Documentation
License, Version 1.3 or any later version} published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover
Texts, and no Back-Cover Texts. A copy of the license is
available at \url{https://www.gnu.org/licenses/gfdl.html}.
\\[2.0mm]
% Give a link to the 'Transparent Copy', as per Section 3 of the GFDL.
The source of this document is available from
\url{https://git.sv.gnu.org/cgit/guix/maintenance.git}.
}
\end{textblock}
\end{frame}
\end{document}
% Local Variables:
% coding: utf-8
% comment-start: "%"
% comment-end: ""
% ispell-local-dictionary: "american"
% compile-command: "rubber --pdf talk.tex"
% End:
%% LocalWords: Reproducibility