News for hackers. Stuff that matters.
Re:Nix: An idea whose time has come by tomberek on Saturday February 19, 2022 @08:35AM (#30397031)
profile removal: Fixed in https://github.com/NixOS/nix/pull/6086

search speed:

    $ time nix search nixpkgs ripgrep
    * legacyPackages.x86_64-linux.ripgrep (13.0.0)
      A utility that combines the usability of The Silver Searcher with the raw speed of grep
    
    * legacyPackages.x86_64-linux.ripgrep-all (0.9.6)
      Ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, and more
    
    * legacyPackages.x86_64-linux.vgrep (2.6.0)
      User-friendly pager for grep/git-grep/ripgrep
    
    real    0m0.514s
    user    0m0.494s
    sys     0m0.019s
We're trying to improve the UX with the new CLI. Precisely to improve the developer experience and quality. Any other major gripes?
Re:Nix: An idea whose time has come by sontek on Saturday February 19, 2022 @01:43PM (#30399382)
Yeah, the UX for the new search although faster is more of a problem for me. When it returns `legacyPackages.x86_64-linux.ripgrep` that makes me think "oh no, I don't want the legacy package. I want the good one", but no non-legacy package is returned.

Also the name is confusing, it return `x86_64-linux` on linux and `x86_64-darwin` but why does that information need to be included? Then it brings up the problem if I need to install with the whole long string or if I can just install with `ripgrep`.

The other big grip I have with the new CLI is the installed packages. If you run:

    > nix profile list
You get a gob of mostly unreadable text scrolling through your screen:

    72 flake:nixpkgs#legacyPackages.x86_64-darwin.toilet github:NixOS/nixpkgs/19574af0af3ffaf7c9e359744ed32556f34536bd#legacyPackages.x86_64-darwin.toilet /nix/store/hnvdydra5syylxnxwj2fmn91aqwz26p6-toilet-0.3
    73 flake:nixpkgs#legacyPackages.x86_64-darwin.asdf-vm github:NixOS/nixpkgs/b66b39216b1fef2d8c33cc7a5c72d8da80b79970#legacyPackages.x86_   64-darwin.asdf-vm /nix/store/skk5pfhjnj49gw184jwivd5wakxx5g23-asdf-vm-0.8.1
and for some reason includes a bunch of duplicate packages, so its very confusing:

    > nix profile list|grep lolcat
    22 flake:nixpkgs#legacyPackages.x86_64-darwin.lolcat github:NixOS/nixpkgs/19574af0af3ffaf7c9e359744ed32556f34536bd#legacyPackages.x86_64-darwin.lolcat /nix/store/zxnkjsimmcvv0jnwsy5jxxmjak01k52f-lolcat-100.0.1
    46 flake:nixpkgs#legacyPackages.x86_64-darwin.lolcat github:NixOS/nixpkgs/19574af0af3ffaf7c9e359744ed32556f34536bd#legacyPackages.x86_64-darwin.lolcat /nix/store/zxnkjsimmcvv0jnwsy5jxxmjak01k52f-lolcat-100.0.1
    71 flake:nixpkgs#legacyPackages.x86_64-darwin.lolcat github:NixOS/nixpkgs/19574af0af3ffaf7c9e359744ed32556f34536bd#legacyPackages.x86_64-darwin.lolcat /nix/store/zxnkjsimmcvv0jnwsy5jxxmjak01k52f-lolcat-100.0.1
Same package name, hash, and version listed 3 times for some reason. I ended up writing an alias that would give me a readable list:

    > which npl
    npl: aliased to nix profile list|awk '{print $2}'|sort|uniq|sed s/flake:nixpkgs#legacyPackages.x86_64-//g|sed s/darwin\.//g

    > npl
    argocd
    asdf-vm
    aws-vault
    awscli2
Re:Nix: An idea whose time has come by tomberek on Saturday February 19, 2022 @04:00PM (#30400489)
Okay. Looks like there is an issue for duplicate profile entries already; just hasn’t gotten attention. https://github.com/NixOS/nix/issues/5587 I’ll take a look.

The verbosity of “legacyPackages.x86_64-linux.ripgrep” in the search results may be too much. We can omit the default portions or provide the full detail somewhere less prominent.