Hacker News new | ask | show | jobs
by IshKebab 540 days ago
I count myself among them. And I wouldn't say I am "otherwise solid". I am solid. Nix is just a weird custom footgun-laden language in a place where I don't want to have to learn a weird custom footgun-laden language. It has other serious issues too, like the fact that it is declarative makes discoverability extreeemely difficult. What does setting `foo: true` do? You can't go-to-definition on it. You can only hope it is well documented (it isn't) or try to find the place that reads that key ... somewhere... in all of Nix... Good luck.

Hell even if it were a perfectly designed language (it isn't) I still would be put off by it because I don't really want to be a professional full-time packaging engineer.

I think Bazel got a lot right by using a subset of Python. Basically nothing to learn language-wise.

2 comments

This shallow dismissal pretty much proves OPs point.

For starters, you compared Nix the ecosystem to Starlark, perhaps the smallest aspect of Bazel. But Bazel (the ecosystem) has a horrendous documentation problem as well.

I grant that "Nix" is a very overloaded term, but it seems like you don't know which part of Nix you are even referring to. "Somewhere... in all of Nix" is not something that makes any sense.

I fully admit that Nix has a steep learning curve. Very steep. But I don't think you know enough to give a thoughtful critique.

> For starters, you compared Nix the ecosystem to Starlark

No I compared the Nix language to Starlark.

> but it seems like you don't know which part of Nix you are even referring to.

Incorrect. I was referring to the Nix language, as was hamandcheese. He literally said it explicitly. I don't know how you could miss that.

> I fully admit that Nix has a steep learning curve. Very steep. But I don't think you know enough to give a thoughtful critique.

You're proving my point here. The very steep learning curve and "you need to be an expert before you can use it" aspects of Nix (both the language and the package manager) are exactly the problem.

Let me put it another way. Imagine I gave you a vacuum cleaner, and you tried to turn it on but it had a very complicated startup sequence so you needed to read the manual... but the manual was written in Egyptian hieroglyphics. You take it back to the shop and they say "nah this is a perfectly good vacuum cleaner. Sure it has a steep learning curve but you just need to spend some time learning it before you can criticise it".

That's obviously stupid right? For most people package management is like vacuum cleaning. It's a necessary task they want to think about as little as possible.

Nix is written by a vacuum cleaner collection & restoration club, who assume that everyone in the world is as obsessively into vacuum cleaners as them.

> Incorrect. I was referring to the Nix language, as was hamandcheese.

I am hamandcheese. I replied to your comment. You didn't describe a single aspect of Nix-the-language. You wrote this:

> What does setting `foo: true` do? You can't go-to-definition on it. You can only hope it is well documented (it isn't) or try to find the place that reads that key ... somewhere... in all of Nix... Good luck.

It's appears (despite the wrong syntax, another clue that you are not particularly well informed) that you are referring to a NixOS module option. Or maybe a Home Manager module option. Either way, not a language feature.

> I am hamandcheese.

Ah yes :D

> Either way, not a language feature.

The language feature I am talking about is that it is completely declarative. You can argue semantics if you want but Nix chose to use a completely declarative language for configuration and that was IMO a bad decision.

you're not solid, by what you've just written here and in above threads.
Care to point out something specific?
The fact that you say that haskell has operators and that you look for a distinction in syntax for functions and reduced values in the expression-driven language would be enough to say that you opine too strongly about things you don't have a solid understanding of. The same applies to your critique of Nix. If you ever tried recursive overrides of declarative definitions in, as you recommended, a subset of Python, you'd never claim that Nix is a footgun-laden language.
> The fact that you say that haskell has operators

Oh you mean the things that look like operator, behave like operators, and are commonly referred to as operators by Haskell programmers - even in the Haskell Wiki? Those operators?

https://tech.fpcomplete.com/haskell/tutorial/operators/

https://github.com/haskellcats/haskell-operators

https://wiki.haskell.org/index.php?title=Infix_operator

What exactly do you think an operator is?

> https://tech.fpcomplete.com/haskell/tutorial/operators/

You're a prime example of a person who reads a page on the Internet and takes it at a face value without understanding the meaning and the context behind the words:

> One of the most common operators, and source of initial confusion, is the $ operator. All this does is apply a function.

Did you miss the part that says "All this does is apply a function"?

Here's how you define (+) among other things: https://hackage.haskell.org/package/ghc-internal-9.1201.0/do...

    instance Num Int where
        I# x + I# y = I# (x +# y)
whereas (+#) is defined as a bridge from unboxed ints provided by the runtime to their efficient low-level machine representation, accomodating all instances of a data type defined as `Int = I# Int#` (the left-hand side is the name of the type, the right-hand side is the name of a constructor that accepts a single value of type Int# - the low-level primitive provided by the GHC implementation).

The (+) in `I# x + I# y =` is a function definition in infix form. That's the same form you can use for any other infix function if you wish so:

    ghci> a `iAmHelping` b = a b + b 

    ghci> :t iAmHelping
    iAmHelping :: Num a => (a -> a) -> a -> a 
> Oh you mean the things that look like operator, behave like operators

Let me see your regular operators do the following, then we talk:

     plus = (+)
     a  = (2 +)
     c  = (2 `plus`)
     c' = plus 2
     d  = (+) 2
     d' = (+ 2)
     e  = 2 `plus` 2
     f  = 2 + 2

I'm glad that's the only thing you object to, though.
> Did you miss the part that says "All this does is apply a function"?

Did you miss the part where it's called an "operator"? Your claim was that Haskell doesn't have operators.

I guess you're a prime example of someone that can't remember what the debate is.