|
48 | 48 | \end{frame}
|
49 | 49 | \setbeamercolor{normal text}{fg=dark,bg=light!50}
|
50 | 50 |
|
| 51 | +\section{Motivation} |
| 52 | + |
| 53 | +\begin{frame}{Outline} |
| 54 | + |
| 55 | + \vfill |
| 56 | + \tableofcontents |
| 57 | + |
| 58 | + \vfill |
| 59 | +\end{frame} |
| 60 | + |
| 61 | +\begin{frame}{What is Fortran?} |
| 62 | + \begin{itemize} |
| 63 | + \item Fortran was developed by John Backus' team at IBM in 1954--1957 |
| 64 | + \item created to ease translation of \alert{mathematical formulas} into machine code |
| 65 | + \item the first \alert{high-level}, \alert{optimized}, and \alert{cross-platform} programming language |
| 66 | + \item highly successful in scientific computing and engineering |
| 67 | + \item many scientific applications and libraries are developed in Fortran |
| 68 | + \item language still under active development, latest standard is \alert{2018} |
| 69 | + \end{itemize} |
| 70 | +\end{frame} |
| 71 | + |
| 72 | +\begin{frame}{Motivation} |
| 73 | + \begin{itemize} |
| 74 | + \item building and distributing Fortran software is difficult |
| 75 | + \begin{itemize} |
| 76 | + \item[--] manual makefiles are seldom cross platform compatible |
| 77 | + \item[--] autoconf is not working on native Windows |
| 78 | + \item[--] learning curve for CMake is incredibly steep |
| 79 | + \item[--] meson does not install module files automatically |
| 80 | + \end{itemize} |
| 81 | + \item writing of build files and adjustment for Fortran is time-intensive |
| 82 | + \item difficult and tedious to reuse Fortran source code |
| 83 | + \item system-wide installation dangerous for multiple Fortran compilers |
| 84 | + (no ABI compatibility) |
| 85 | + \item impossible to depend on a project without redistributing it |
| 86 | + \\[2ex] |
| 87 | + \item[\alert{▶}] create a \alert{Fortran-specific} build system and package manager to fix this |
| 88 | + \item[\alert{▶}] make it easy to create \alert{reusable} Fortran libraries |
| 89 | + \item[\alert{▶}] Fortran package manager (\alert{fpm}) |
| 90 | + \end{itemize} |
| 91 | +\end{frame} |
| 92 | + |
| 93 | +\begin{frame}{Adoption of fpm} |
| 94 | + \begin{columns} |
| 95 | + \begin{column}{.5\textwidth} |
| 96 | + \includegraphics[width=\textwidth]{Figures/fpm-projects.pdf} |
| 97 | + \vskip-2ex |
| 98 | + |
| 99 | + \scriptsize |
| 100 | + Data collected from GitHub and GitLab on 15th Sep, 2021 % TODO: Update |
| 101 | + \end{column} |
| 102 | + \hskip-1em |
| 103 | + \begin{column}{.55\textwidth} |
| 104 | + \begin{itemize} |
| 105 | + \item today \alert{173} open source projects are using fpm % TODO: Update |
| 106 | + \item ca. \alert{160} unique developers have contributed\\ to those projects % TODO: Update |
| 107 | + \item \alert{62} contributors at the fpm project |
| 108 | + \item code contributions from \alert{21} developers to fpm |
| 109 | + \item hosted on GitHub (MIT licensed):\\\alert{https://github.com/fortran-lang/fpm} |
| 110 | + \end{itemize} |
| 111 | + \end{column} |
| 112 | + \end{columns} |
| 113 | +\end{frame} |
| 114 | + |
| 115 | +\begin{frame}{Specialities about Fortran} |
| 116 | + \begin{itemize} |
| 117 | + \item Fortran uses modules to share symbols between packages\\(since Fortran 90, C++20 modules are similar) |
| 118 | + \item implementations might be provided with submodules |
| 119 | + \item compilation order depends on module and submodule interdependencies |
| 120 | + \item modules must be available to make Fortran libraries reusable |
| 121 | + \item no ABI compatibility between compilers and no standardized module format |
| 122 | + \end{itemize} |
| 123 | +\end{frame} |
| 124 | + |
| 125 | + |
| 126 | +\section{Implementing fpm in Fortran} |
| 127 | + |
| 128 | +\begin{frame}{Language choice for implementing a package manager} |
| 129 | + \begin{columns} |
| 130 | + \hskip.5em |
| 131 | + \begin{column}{.46\textwidth} |
| 132 | + \begin{itemize} |
| 133 | + \item fast without much overhead |
| 134 | + \item self-contained and simple to setup |
| 135 | + \item easily accessible for users/contributors |
| 136 | + \end{itemize} |
| 137 | + \end{column} |
| 138 | + \begin{column}{.49\textwidth} |
| 139 | + \begin{itemize} |
| 140 | + \item[\alert{▶}] use compiled language |
| 141 | + \item[\alert{▶}] small runtime library or static binaries |
| 142 | + \item[\alert{▶}] mostly Fortran developers |
| 143 | + \end{itemize} |
| 144 | + \end{column} |
| 145 | + \end{columns} |
| 146 | + \medskip |
| 147 | + |
| 148 | + \begin{center} |
| 149 | + \includegraphics[height=.5in]{Figures/logo-python} |
| 150 | + \quad |
| 151 | + \includegraphics[height=.5in]{Figures/logo-cpp} |
| 152 | + \quad |
| 153 | + \includegraphics[height=.5in]{Figures/logo-rust} |
| 154 | + \quad |
| 155 | + \includegraphics[height=.45in]{Figures/logo-haskell} |
| 156 | + \quad |
| 157 | + \includegraphics[height=.5in]{Figures/logo-fortran} |
| 158 | + \end{center} |
| 159 | + \medskip |
| 160 | + |
| 161 | + \begin{itemize} |
| 162 | + \item \alert{Fortran} is the most well-known language in our community |
| 163 | + \item compilers can easily produce \alert{static binaries} for distribution |
| 164 | + \item we can identify short-comings in Fortran while implementing fpm |
| 165 | + \item direct feedback for useful features in \alert{stdlib} |
| 166 | + \end{itemize} |
| 167 | +\end{frame} |
| 168 | + |
| 169 | +\begin{frame}{Bootstrapping fpm} |
| 170 | + \begin{itemize} |
| 171 | + \item fpm is built with itself |
| 172 | + \item single-file version used for creating initial fpm bootstrap binary |
| 173 | + \item minimal dependencies, requires only a Fortran compiler to build |
| 174 | + \item bootstrap binary is used to build fpm: Fortran, C compiler and git are required |
| 175 | + \end{itemize} |
| 176 | + \vfill |
| 177 | + |
| 178 | + \centering |
| 179 | + \includegraphics[width=.9\textwidth]{Figures/bootstrapping.pdf} |
| 180 | +\end{frame} |
| 181 | + |
| 182 | + |
| 183 | +\section{Feature overview} |
| 184 | + |
| 185 | +\begin{frame}{Command-line features} |
| 186 | + \begin{columns} |
| 187 | + \hskip.1\textwidth |
| 188 | + \begin{column}{.6\textwidth} |
| 189 | + \begin{itemize} |
| 190 | + \item handles (sub)module interdependencies |
| 191 | + \item automatically finds executables and tests |
| 192 | + \end{itemize} |
| 193 | + \end{column} |
| 194 | + \end{columns} |
| 195 | + \vskip2ex |
| 196 | + |
| 197 | + \begin{columns} |
| 198 | + \begin{column}{.4\textwidth} |
| 199 | + \begin{itemize} |
| 200 | + \item runs executables and examples |
| 201 | + \item wildcard globbing for selection |
| 202 | + \end{itemize} |
| 203 | + \vskip5ex |
| 204 | + |
| 205 | + \begin{itemize} |
| 206 | + \item finds and runs test executables |
| 207 | + \item allows running tests in debugger |
| 208 | + \end{itemize} |
| 209 | + \end{column} |
| 210 | + \begin{column}{.3\textwidth} |
| 211 | + \includegraphics[width=\textwidth]{Figures/features.pdf} |
| 212 | + \end{column} |
| 213 | + \begin{column}{.4\textwidth} |
| 214 | + \begin{itemize} |
| 215 | + \item automatically installs project |
| 216 | + \item user prefix used by default |
| 217 | + \end{itemize} |
| 218 | + \vskip5ex |
| 219 | + |
| 220 | + \begin{itemize} |
| 221 | + \item updates all dependencies |
| 222 | + \item basic caching and locking |
| 223 | + \end{itemize} |
| 224 | + \end{column} |
| 225 | + \end{columns} |
| 226 | + \vskip1ex |
| 227 | + |
| 228 | + \begin{columns} |
| 229 | + \hskip.1\textwidth |
| 230 | + \begin{column}{.6\textwidth} |
| 231 | + \begin{itemize} |
| 232 | + \item creates new projects with fpm layout |
| 233 | + \item backfilling to update existing projects |
| 234 | + \end{itemize} |
| 235 | + \end{column} |
| 236 | + \end{columns} |
| 237 | +\end{frame} |
| 238 | + |
| 239 | +\begin{frame}{Layout of an fpm project} |
| 240 | + \begin{columns} |
| 241 | + \begin{column}{.6\textwidth} |
| 242 | + \includegraphics[width=\textwidth]{Figures/layout.pdf} |
| 243 | + \end{column} |
| 244 | + \hskip-1em |
| 245 | + \begin{column}{.45\textwidth} |
| 246 | + \begin{itemize} |
| 247 | + \item package manifest in \alert{TOML} |
| 248 | + \item limited complexity of build file |
| 249 | + \item mainly meta data of project\\ |
| 250 | + (license, author, keywords, \ldots) |
| 251 | + \\[2ex] |
| 252 | + \item default layout requires only \alert{name}\\ |
| 253 | + (\textcolor{blue}{src}, \textcolor{blue}{app}, \textcolor{blue}{example}, and \textcolor{blue}{test}) |
| 254 | + \item \alert{source-dir} for customizing layout |
| 255 | + \\[2ex] |
| 256 | + \item executable names from \alert{program} unit |
| 257 | + \\[2ex] |
| 258 | + \item system libraries can be linked |
| 259 | + \\[2ex] |
| 260 | + \end{itemize} |
| 261 | + \end{column} |
| 262 | + \end{columns} |
| 263 | +\end{frame} |
| 264 | + |
| 265 | +\begin{frame}{First-class dependencies} |
| 266 | + \begin{itemize} |
| 267 | + \item dependencies are currently specified by referencing another project |
| 268 | + (\textit{e.\,g.} via git URL) |
| 269 | + \end{itemize} |
| 270 | + |
| 271 | + \begin{center} |
| 272 | + \includegraphics[width=.85\textwidth]{Figures/dependencies.pdf} |
| 273 | + \end{center} |
| 274 | + |
| 275 | + \begin{itemize} |
| 276 | + \item different scopes available beside full dependencies |
| 277 | + \item can depend on projects only for testing or limit dependencies to single executable |
| 278 | + \end{itemize} |
| 279 | +\end{frame} |
| 280 | + |
| 281 | +\begin{frame}{Extending fpm with plugins} |
| 282 | + \begin{itemize} |
| 283 | + \item package manifest provides space for third-party projects |
| 284 | + \item fpm is available as fpm package and can be used as dependency |
| 285 | + \item plugins are used automatically from the command-line |
| 286 | + \item useful for staging new features before integration in fpm |
| 287 | + \end{itemize} |
| 288 | + \vfill |
| 289 | + |
| 290 | + \begin{columns} |
| 291 | + \begin{column}{.45\textwidth} |
| 292 | + Searching for fpm packages: \alert{fpm-search} |
| 293 | + \begin{itemize} |
| 294 | + \item available from \textit{fpm search} command |
| 295 | + \item downloads the fpm registry |
| 296 | + \item search package names, descriptions |
| 297 | + \end{itemize} |
| 298 | + \end{column} |
| 299 | + \hskip1em |
| 300 | + \begin{column}{.45\textwidth} |
| 301 | + Documentation of intrinsics: \alert{fpm-man} |
| 302 | + \begin{itemize} |
| 303 | + \item available from \textit{fpm man} command |
| 304 | + \item access to documentation of intrinsics |
| 305 | + \item cross-platform, no man required |
| 306 | + \end{itemize} |
| 307 | + \end{column} |
| 308 | + \end{columns} |
| 309 | +\end{frame} |
| 310 | + |
| 311 | + |
| 312 | +\section{Summary and outlook} |
| 313 | + |
| 314 | +\begin{frame}{Open questions} |
| 315 | + \begin{itemize} |
| 316 | + \item can we integrate fpm seamlessly with other packaging ecosystems |
| 317 | + \end{itemize} |
| 318 | +\end{frame} |
51 | 319 |
|
52 | 320 | \end{document}
|
0 commit comments