Plutus, Haskell, Nix, Purescript, Swift/Kotlin. laser-focused on FP: formality, purity, and totality; repulsed by pragmatic, unsafe, “move fast and break things” approaches
AC24 1DE5 AE92 3B37 E584 02BA AAF9 795E 393B 4DA0
Interesting perspective. Thanks for elaborating. You twisted my original concept in knots and won me over to your read of it.
I posted this meme in three places. Did you not read any of the threads where old, cranky FHS luddites came out of the woodwork to angrily dismiss the concept of immutable distros?
Duly noted. I DO NOT use Arch, btw. ;)
What I meant to try and say is that GUIX is like NixOS for Chad programmers.
I’d look into building all of that in a flake just so you can encapsulate (and have a central version control of) all of your dependencies in case something does change.
I’m a bit of a Nix dork but I tend to try and declare my entire dev stack in a flake so it can follow me to every machine. It offers some of the “it works on every machine” guarantees that Docker offers while also forcing the compilation of the stack to happen natively (or at least pulls in some content addressed cache that offers security by being the exact hash for the whole dependency graph). I like that
Here’s how I used the Nix way to declare an interactive Python scraper the other day. With this method, I can lock dependencies between machines as a matter of course without having to use Docker:
{
description = “Weed Scraper”;
inputs = {
nixpkgs.url = “github:NixOS/nixpkgs?ref=nixpkgs-unstable”;
utils.url = “github:numtide/flake-utils”;
};
outputs = { self, nixpkgs, utils }: utils.lib.eachSystem [“x86_64-linux”] (system: let
pkgs = import nixpkgs { system = system; };
in rec {
packages = {
pythonEnv =
pkgs.python3.withPackages (ps: with ps; [ webdriver-manager openpyxl pandas requests beautifulsoup4 websocket-client selenium keyboard ]);
};
devShell = pkgs.mkShell {
buildInputs = [
pkgs.chromium
pkgs.undetected-chromedriver
packages.pythonEnv
];
shellHook = ‘’
export PATH=${pkgs.chromium}/bin:${pkgs.undetected-chromedriver}/bin:$PATH
‘’;
};
});
}
Yeah. I think they’ll catch on in much the same way that lock files have become the standard in many languages. IMO, it just makes more sense to declare all dependencies atomically. I also think/hope it will supplant our overreliance on Docker containers to achieve these kinds of guarantees (where it actually makes sense or presents undeniable benefits).
This person gets it.
GUIX for one.
GUIX is to NixOS what Gentoo or Manjaro are to Arch.
I’ll probably try it someday when I get bored enough of systemd.
Yes for sure. Actually Nix is pretty long in the tooth and there are better implementations of Eelco’s brilliant idea. It’s just that they have a lot less effort, ubiquity, and hype behind them. GUIX is a good example of that. They literally can build an OS from scratch. I find Nix to be rock solid, so I stick with it. But, it’s an idea (all dependencies being content addressed in an immutable folder structure) to allow complexity that isn’t even achievable on FHS style systems.
For example: THE main feature is that you could have a different version of say Python (for the sake of this example) installed for each dependency in your system and they would just work alongside each other due to their unique, hash based folder locations. Each folder is named based on the sha256 hash of the dependency graph, which has powerful implications. Because of this hash, they’re effectively hermetically sealed from each other and cannot step on each other. This is the very definition of Nix and taken far enough to define a whole OS is SUPER powerful concept.
Shit, I’m rambling. Maybe I’ll pause to let you guide my rant. ;)
Nix actually IS Bash under the hood. It uses Perl and Bash to create an atomic installation. I tend to do a LOT less maintenance than I’d need to do if I rolled everything from scratch in Bash.
👍🏽
Very true. I made a point of doing it by forking an already working nix-config from github that used what I wanted to use. This one drew me in because it used xmonad along with home-manager and flakes. Honestly, it really WAS pretty confusing at first (due to that setup using secrets and git-crypt to obfuscate some of the files) but Nix had some helpful error messages that allowed me to finally get it working in a VM. Then, I got it installed as my daily driver when it was stable enough. Today, I provision all of my different systems in my network (ARM, x86, Nix-Darwin, Nix on a routers and network gear, etc) using one nix-config that contains all of the machine configs as different outputs.
Thanks for the clarification.
On the latest Haskell interlude podcast, the guest was talking about how using the ReaderT monad specifically introduces safety issues. My ears perked up because I’m right in the middle of leaning on it heavily in one of my Haskell projects.
Try NixOS. It eliminates that ISO centric paradigm and trades it for one config file that defines everything and builds it from scratch.
Thanks! I need all the help I can get. I’ll edit this comment when I’m feeling less burned out by my failures yesterday.
@bweaking@nuwus.org
I have. Edit; I haven’t 🤣 didn’t see the .js at the end of that word so some of the following is probably irrelevant, though I’ll leave it because it took me a while to type it out. Haha
I’d probably be more interested in it if I were being forced by my day job to work in the JVM. I happen to be in a situation where I am my own boss working on projects completely alone and the tech I pick comes from months of wasting time making perfect the enemy of good. I know that raises quite a few red flags but I can’t help the way that they made me. Haha 🥴
From what I’ve gathered from Joseph Gordon Bell at the (IMO best software engineering podcast ever) Co-Recursive podcast, Scala sacrifices some of the purity and safety by its dependence on the the Java cargo cult. Partly, this is also a drawback of Purescript for me (since it’s intended to compile to JavaScript) but Purescript is starting to be able to escape that fate. Also, I’m a HUGE fan of Haskell syntax.
From your perspective, what pros and cons do you see if I were comparing Scala to Purescript?
Ps. The one that is actually really making me take notice lately is OCaml for the browser.
I’m no white beard, I don’t know much or really any deep category theory (which is, by the way, just some fancy names for stuff we do CONSTANTLY as software engineers), and I use it every single day. Suit yourself, though.
I vastly prefer Purescript despite it being the road less traveled. Typescript is just a fake-ish type system on top of JavaScript. But Purescript goes MUCH further in the mission of purity and code safety.
Phil has a knack for making even the driest subject into a life-changing and mind-bending experience. I highly recommend it.