News for hackers. Stuff that matters.
Re:We want to make Nix better by ghoward on Friday September 02, 2022 @05:14PM (#32695789)
This is news to me, I admit. But if this is true, then people shouldn't say Nix is declarative.
Re:We want to make Nix better by grumbel on Saturday September 03, 2022 @05:12AM (#32700109)
This shouldn't really come as a surprise, any reasonably powerful language will end up Turing complete sooner or later, it's pretty difficult to avoid. Nix specifically doesn't even hide it, it has plain old function and recursion as primitives.

What makes it declarative is the lack of side effects and laziness.

Re:We want to make Nix better by ghoward on Saturday September 03, 2022 @08:48AM (#32701359)
What I'm trying to explain is that using the term "declarative" is confusing to a lot of developers who who not think of functional programming as declarative, but rather think of something like JSON.
Re:We want to make Nix better by grumbel on Saturday September 03, 2022 @01:25PM (#32704041)
I don't see it as confusing, it's a pretty accurate description. The Nix language is for most part a JSON-look-alike with a couple of additional features. You don't really program in it, you declare/return a data structure. The only programming you do in Nix is to make it a little easier to build that data structure. It's kind of like the old days when people would parse JSON with eval(), which would also grand you features that plain JSON wouldn't have.

Even NixOS itself doesn't do all that much actual programming in Nix, most of the code that does stuff is written in C++. The Nix language itself doesn't let you escape out of its sandbox.

Re:We want to make Nix better by throwamon on Friday September 02, 2022 @06:44PM (#32696544)
Although it's debatable, it's very common for functional languages to be categorized as declarative.
Re:We want to make Nix better by ghoward on Friday September 02, 2022 @11:41PM (#32698446)
Perhaps, but that categorization is going to confuse a lot of developers. It sure confused me until I said something wrong, and all of you Nix proponents descended on me.

This confusion is not good for Nix.