• karlhungus@lemmy.ca
      link
      fedilink
      arrow-up
      8
      ·
      2 months ago

      Thanks! I’ve been nix curious for awhile, but lazyness has won.

      1. Is there some that generates those nix comments for you?

      2. For Dev environments I’m usually interested in the current stable release of whatever language I’m working in, and generally for my tools (nvim, ripgrep, those sorts of things be also on whatever is stable, is there a idiomatic way to get that? And also keep them uotodate?

      Its reasonable to ignore or respond with RTFM

    • BB_C@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      The +nightly syntax is a rustup proxy feature, so a distro-packaged cargo won’t even parse it. Nightly is a different compiler every day.

      export RUSTC_BOOTSTRAP=1 and you wouldn’t need rustup or nightly. It will work with your stable distro package.

      clap = “4” and anyhow = “1” are ranges, and there’s no Cargo.lock.

      you can do clap = "=4.x.x", ditto for all deps, direct and indirect.

      Nightly is a different compiler every day.

      Nothing about that script is fixed except its text.

      Is nix finished free-standing software?

    • TehPers@beehaw.org
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 months ago

      Mirroring the other comment, but this post really has nothing to do with Nix, so I have no clue where this comment came from.


      But anyway, I think Nix has a few things that turn people away:

      • New language to learn (which is fairly simple, but gets more complicated when you introduce…)
      • Nix flakes? nix-shell? nix-env? Just looking at setting up a shell, you have nix-shell, nix shell, nix develop, and possibly so many others
      • The module system, put lightly, is confusing (for when you need modules)
      • It’s difficult to find which packages are available in nixpkgs (and making a custom derivation is not always trivial)
      • Almost nobody documents how to install their tools with Nix (or add it to a shell.nix or equivalent)
      • … and so on

      Nix is awesome, of course, but it’s far from being the right tool for everyone.

        • TehPers@beehaw.org
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 months ago

          nix is a subset of json. If that’s a “hard” language, I don’t know what to tell people. Try GUIX with scheme?

          This ignores how modules and flakes work. You often have to write function expressions, not just pure “JSON”, and it’s often unclear what the function parameters are supposed to be (at least for a beginner).

          NixOS search exists so I’m not sure why it’s considered “hard to find packages”

          The search is great and includes a ton of stuff, but there’s a lot that’s hard to install through it. For example, how do you install an application through Flatpak? How do you install extensions for Firefox or vscodium? How do you install a specific version of an application on an older nixpkgs commit while still installing the current version of other programs through a flake? (I’m guessing through multiple nixpkgs inputs?) How do you install something not in nixpkgs? (A custom derivation, but it’s not easy to build one if you’re a beginner or don’t understand what the program needs during build.)

          These are all things that can be done, but there’s really no specific documentation to help with it.

          What Nix really needs is better documentation and a commitment to (or against) flakes. Once it reaches that point, I think I’d consider it mature enough to recommend. I’ve definitely brought it up at work as an alternative to devcontainers, but it’s a hard sell for a lot of people because it’s so much harder to learn. Personally I use a shared HM config across all my machines, and it’s awesome, but I don’t know anyone else personally who has been able to figure it out.

    • thingsiplay@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      2 months ago

      People around here love to do anything in their power to achieve the exact properties of using Nix using ANYTHING other than Nix.

      And I don’t think its a bad thing. Otherwise we become too dependent on one platform / solution / developers. I would also like to have some Nix superpowers, without relying on Nix. However I don’t know what this post has anything to do with Nix.

        • thingsiplay@lemmy.ml
          link
          fedilink
          arrow-up
          3
          ·
          2 months ago

          Nix might be the better concept overall, but its a specific concept that is not available everywhere. Docker on the other hand can be installed and used on any distribution, and removed too. Once you rely on Nix and its system, you can’t just remove it, its your lifestyle now.

            • thingsiplay@lemmy.ml
              link
              fedilink
              arrow-up
              2
              ·
              2 months ago

              We are not talking about the package manager.

              Also, you can’t remove Nix?

              I don’t think you understood what I said.

                • thingsiplay@lemmy.ml
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  2 months ago

                  Dude whats your problem now? Take a deep breath.

                  You understand that saying something does not always mean “literal”. Who the fuck think that when I say you cannot remove it, that I would mean it literally? I said its becoming part of your lifestyle. Think about it and stop being a little child with the replies. Nobody is gaslighting you, in fact you are gaslighting me or you are incredible stupid at understanding other people.

                  So with those replies of you its clear that you are toxic and this is what you get for. Have a nice day.

  • AllNewTypeFace@leminal.space
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    How long do most of these take to parse/compile each time you run them? I’m guessing this doesn’t cache compiled artefacts. If the language has a mode to interpret it without compilation (trading runtime speed for compilation overhead) it may make sense, but if not, certainly the Scala and Haskell examples would be agonisingly slow.

    • justcallmelarry@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Can’t speak for most of these ecosystems, but uv (for python) does cache the dependencies per version on user level, so it’s def not slower than python is in general, post first run

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    I really wish kscript would catch on. Kotlin is an excellent language and I have enjoyed using it for some utility scripts.