Which is worse hell to write?
Evaluate on criteria such as lack of usable documentation, code ugliness, ease of determining what is wrong when something won't work, and generally the amount of headaches you experience trying to get something to work
Which is worse hell to write?
Evaluate on criteria such as lack of usable documentation, code ugliness, ease of determining what is wrong when something won't work, and generally the amount of headaches you experience trying to get something to work
@vivekanandanks @AVincentInSpace what about debugging nix ?
I find the developer experience to be a pain
@vivekanandanks well yeah, nix is a simple language, once you get past the syntax (destructuring an attrset as a function argument has names delimited by commas (trailing comma optional), attrset literals have key-value pairs delimited by semicolons (trailing semicolon mandatory), items in array literals are delimited by WHITESPACE, functions and their arguments are also separated by whitespace so if you want to put a function call in a list you have to parenthesize it, and destructuring an array as a function argument is JK LMFAO THERE'S NO WAY TO DO THAT you have to do (builtins.elemAt list 0) (builtins.elemAt list 1) like a FOOL)
(oh and functions can't take multiple arguments. the two ways to pretend they can are to take an attrset as an argument which you then destructure or make a function that takes the first argument that then returns another function that takes the second argument. and we still have to talk about rec and let and with and inherit. but apart from that just like JSON with functions!)
@vivekanandanks and that's before you even start to get into the incredibly poorly documented nixpkgs ecosystem and what nix is actually for, which is getting software to compile.
i gotta say, nix produces some of the worst error messages i have ever seen from an interpreter. traceback lengths that put java's to shame, no easy way to find your own code except to look for paths not in the nix store (unless you're trying to build a flake in which case your own code is in the nix store and suffixed with -source, just like nixpkgs itself and every github repo your project pulled, so good fuckin luck m8) but then even when nix executes successfully and figures out what it's supposed to do, when gradle complains about $JAVA_HOME not being set, where do you go to fix that? or when npm complains about not being able to download a dependency that node2nix didn't grab, how do you fix that? or when a crate2nix project complains it can't find a C compiler and you have to look up how to do crate overriddes to give it one
@vivekanandanks OH and i almost forgot to mention that because nix has a derpecated feature where it doesn't require quotes around URLs, `a: a` evaluates as a lambda but `a:a` evaluates as a string
why couldn't they have just used a real programming language like guix did
> i just triggered you by saying nix is easy
> can't argue with you though. it's not easy
i do generally respond pretty badly to lies, yes
@vivekanandanks @AVincentInSpace if you have time, please have a look at this github issue :)
https://github.com/kpcyrd/what-the-src/issues/12#issuecomment-2132435470
I had the attention of quite a few Nix people, but nobody could help me with "how do I get the urls nixpkgs is using", as this requires partial execution of expressions in a way I'm not sure is supported.
@kpcyrd
Hi
I saw the project.
1) Some understanding of mine in it below. Correct me if I'm wrong.
The project is to show which exact source revision of a package is used by various package managers/repos right? (along with the sha256 hash)
2) Also curious what's the use case of this project?🤔 For knowing which package every distro use in a single place?
@Le_suisse @kpcyrd @vivekanandanks @AVincentInSpace
In the file generated by the nixpkgs-swh project (https://nixpkgs-swh.nixos.org/sources-unstable.json), there is not a binding between the name of a package and its source code.
I'm not sure the what-the-src concept could be easily applied to nixpkgs. A nixpkgs "package" contains a graph of sources and it could be hard to know which source in this graph is the actual source of the package.
@Le_suisse @kpcyrd @vivekanandanks @AVincentInSpace
However, you could try to infer the package name from the narinfo attribute exposed in the https://nixpkgs-swh.nixos.org/sources-unstable.json file, but this could easily lead to mistakes...