News for hackers. Stuff that matters.
Re:Straight.el: next-gen, purely functional package manager ... by eduction on Wednesday June 22, 2022 @08:52AM (#31835410)
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.

Re:Straight.el: next-gen, purely functional package manager ... by hypersoar on Wednesday June 22, 2022 @10:07AM (#31836158)
Think 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.

Re:Straight.el: next-gen, purely functional package manager ... by zcam on Wednesday June 22, 2022 @09:11AM (#31835588)
It'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.

Re:Straight.el: next-gen, purely functional package manager ... by esrh on Wednesday June 22, 2022 @09:10AM (#31835581)
My 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.