this is pretty cool. it’s a tutorial with interactive exercises that explores the Nix language as a general-purpose functional programming language, outside of its role as the configuration and package definition language for NixOS. understanding Nix better as a language makes more complicated packages easier to write (and is necessary to understand the guts of nixpkgs and the parts of Nix written in itself), but it also has a number of unique advantages as a programming language within a very specific domain.

  • locallynonlinear@awful.systems
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    I use nix to manage all my personal infrastructure. I enjoy it and it has many benefits.

    But, I still have trouble recommending it openly or advocating its usage in any of my workplaces. There are so many gotchas that run against the grain, in practice. There are so many different patterns for using nix (like a big sore point is that nix flakes aren’t the default way to manage dependencies, instead it’s an experimental feature alternative to the default, which is fragmented tooling (pinned channels? fetchUrl? overlays? NIX_PATH? oh lord), (or even just the fact that minor version changes in nix completely deprecates certain core build utilities. See how nix docker images are still in major flux) that in practice a newbie who wants to go beyond playing with the simple compile a C project with make to… a nodejs development environment (shudder), is gonna have some struggles with unobvious decisions they make early on.

    I totally understand that they have greatly improved documentation, examples, tutorials, and community. These are all high quality. But the offense remains the fact that you really should read the whole manual before you get started, because the --defaults-- of solving the small problems with nix, and the deep baggage of historical packages and tooling, means that you can dig yourself into a corner that one day will require rethinking how you organized your work. That to me isn’t super great.

    But yes, I do love nix and am happy to see them continue to work through these issues.

    • self@awful.systemsOPM
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      oh yeah, I love Nix but I’ve called it fucking incomprehensible (while recommending it) on here before. you can definitely still see its research roots in spite of all the improvements they’ve made, and flakes not being enabled by default is a travesty