4 ms·
Can someone smarter than me explain what it means to be a “purely functional” package manager? Because it’s confusing to use the term this way. In programming
by eduction 4y ago
Can someone smarter than me explain what it means to be a “purely functional” package manager?
Because it’s confusing to use the term this way. In programming “purely functional” means no side effects; writing files to disk and mutating the state of the host system is a strong set of side effects.
- esrh 4y agoMy interpretation is that the same initialization config will lead to the same setup every time, in the sense that each installation is pure in a way. Of course, while it probably just works, it's only actually pure if you pin every package to a version.
- zcam 4y agoIt's a bit like nix but only for emacs. Modes are downloaded/built locally and versions pinned. From there you can put in version control your pin file and update/revert updates safely. It also guarantees you get the exact same setup across machines. Paired with use-package it makes emacs configs very compact, typically you can have a single conf file + the versions file for everything related to ones setup. That makes it very easy to transport. Even if you use nix/guix it's more convenient imho to use straight.el for emacs, as it's standalone as long as emacs is available.
- hypersoar 4y agoThink of side-effects on the system user level instead of the hardware level. A functional package manager doesn't rely on, for example, globally installed libraries. It also installs packages in such a way as to not affect the operation of your system. Nix, for example, keeps everything in a private directory. If you have packages A depending on packages X, Y, and B depending on Y, Z, then A, B, X, Y, and Z will all be placed in separate directories in /nix/store. This can all be done without touching any system or user (or emacs) profiles. Hence, "no side-effects". Of course, you probably want some side-effects, so you'll put symlinks to the stuff you want in your user profile, or into a .envrc file in the root of a project.