News for hackers. Stuff that matters.
Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @08:17AM (#31143343)
>> Using Haskell as a base for the syntax

> I don’t really think this is a problem at all?

Of course it's a problem. You shouldn't use a syntax that has been soundly rejected by the industry.

Re:How Nix and NixOS get so close to perfect by mananaysiempre on Sunday April 24, 2022 @09:33AM (#31143823)
OK, fair enough, not an—independent? terminal?—problem: the syntax is largely forced upon us by the semantics, it’s not a Common Lisp vs Dylan or a Python vs Lua vs Ruby thing; and the semantics is the crux of the implementation approach (though not of the packaging organization being implemented).

If you want to argue against the semantics, by all means, but “industry doesn’t think it looks pretty” does not cut it, even “I don’t think it looks pretty” would afford more respect on my part (not least because the speaker is then able to explain what specifically they find off-putting or annoying, while “the industry” isn’t).

More details on syntax vs semantics in sibling comment[1].

[1] https://news.ycombinator.com/item?id=31143616

Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @10:16AM (#31144204)
> If you want to argue against the semantics, by all means, but “industry doesn’t think it looks pretty” does not cut it

I'm not arguing against semantics, and "the industry doesn't think it looks pretty" is not my argument either.

My argument is that, if you want the industry to accept something, it needs to be acceptable to the industry. Haskell-ish syntax[1] has clearly been unacceptable to the industry for a long time.

It's been rejected, again and again. At this point, it is pretty much guaranteed that attaching Haskell syntax to your new config format/language/application/whatever is a recipe for failure.

It's not that the industry just thinks it looks ugly, it's that the industry has outright rejected how it looks.

> even “I don’t think it looks pretty” would afford more respect on my part

My opinion on Haskell syntax, and whether or not you respect my opinion, is also pretty much irrelevant if the industry has already rejected it. I could be thinking that it's the best thing since sliced Jesus, but that won't change the fact that the syntax of Haskell has been rejected by the industry.

[1] Amongst others.

Re:How Nix and NixOS get so close to perfect by mananaysiempre on Sunday April 24, 2022 @10:50AM (#31144536)
My inner social psychologist, shameless amateur that he is, is not at all ready to pronounce the syntax to be the problem with nearly as much confidence as you do.

As far as I can tell, the only languages with Haskell-like syntax that have tried for serious industry adoption are Haskell, Scala, and perhaps Elm. (Idris is a borderline case, but it’s young and in any case I think we’re still a couple generations away from viable total languages.) Each of these has unconventional and similar semantics, different but complex type systems, and is trying for general applicability, while Nix has somewhat different semantics and no static type system at all, and is also trying to cover a very limited application area. Even Nix’s syntax, to my eye, is about as ML-like as it is Haskell-like.

How can we be so sure it’s the syntax, specifically, that is the problem? Are we controlling for these differences in any way at all?

It would be another matter if F# or OCaml or even Dylan was a runaway success while Haskell was not; while strict vs lazy is a hell of a difference I could be convinced that the syntax is the problem if people from the industry tried one after the other and consistently backed off in disgust, but that is not happening as far as I can tell.

I really don’t see how the verdict here could be anything but a definite “inconclusive”.

Finally, I’m also not seeing why I want industry acceptance. (I don’t think Xe’s post discusses it at all.) I want to use it, I want other users to discuss it with, I want it not to die a slow unmaintained death in five to ten years, but otherwise... Meh?

Advocating it to a single organization seems like a limited task (which I might fail), but advocating it to “the industry” seems like arguing with a force of nature (and I will fail). There would be some advantages to me if it were adopted, but then again it’s a first-generation system that has already accumulated substantial legacy cruft, so maybe I don’t want it to be adopted as it is now? Exploring the solution space? Definitely. Adoption at this particular stage? Not really sure, hard to get worked up about it.

P.S.

>> even “I don’t think it looks pretty” would afford more respect on my part

> My opinion on Haskell syntax, and whether or not you respect my opinion, is also pretty much irrelevant [...]

Wrong kind of “respect”, sorry: not how much I trust it, but how much concrete information I can expect to squeeze out of it (complete trust helpful, but neither necessary not sufficient). Opinions of large groups of people, even if reliably known, are notoriously hard to turn into actionable insights.

Re:How Nix and NixOS get so close to perfect by nix23 on Sunday April 24, 2022 @10:21AM (#31144249)
>has clearly been unacceptable to the industry for a long time.

What?? Galois, Facebook, IBM, Twitter, AT&T, Bank of America, Barclays Capital, NVIDIA, Microsoft and GitHub use Haskell.

https://wiki.haskell.org/Haskell_in_industry

Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @10:31AM (#31144351)
> What?? Galois, Facebook, IBM, Twitter, AT&T, Bank of America, Barclays Capital, NVIDIA, Microsoft and GitHub use Haskell.

So? The usage of Haskell within the entire industry is so small it's not even a rounding error.

It's hard to make the argument that the industry has accepted it when the industry usage is too tiny to even measure properly.

Re:How Nix and NixOS get so close to perfect by physPop on Sunday April 24, 2022 @12:02PM (#31145338)
Please define "the industry" and explain what credentials you have to know what "they" want.
Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @01:27PM (#31146162)
> Please define "the industry"

Programmers, and the work they do.

> and explain what credentials you have to know what "they" want.

It sounds ridiculous that you need "credentials" before you'd believe that Javascript, Python, Java or C# programmers, programs, projects and work doesn't each outnumber Haskell roughly 100 to 1.

Just about any metric you choose to use to evaluate what the industry uses, Haskell has so little usage that it's literally difficult to measure.

Job postings, TIOBE, RedMonk, SO survey, google-fight, you name it - Haskell is nowhere near rounding error percentages.

Maybe you should ask yourself why it doesn't show up in significant numbers on any metric rather than asking people what credentials they have.

Re:How Nix and NixOS get so close to perfect by rowanG077 on Sunday April 24, 2022 @09:16AM (#31143648)
Because industry makes good decisions? Decisions like adopting python, dooming a large part of the world software to be bug ridden slow messes. Or to elevate CUDA to the facto machine learning backend? Besides it's not clear that Haskell isn't adopted by industry due to the syntax.
Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @10:07AM (#31144132)
> Because industry makes good decisions?

That's irrelevant - if you want uptake, you need to support what user's want. It's been clear for at least a decade now that programmers don't want Haskell syntax.

Whether it's a good syntax or not is irrelevant.

Re:How Nix and NixOS get so close to perfect by rowanG077 on Sunday April 24, 2022 @10:12AM (#31144166)
Why do you think it's Haskells syntax that is the problem? The syntax is not so weird. I'd say the semantics are the hangup. 100% purity and lazy evaluation are a much harder pill to swallow then the syntax.
Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @10:39AM (#31144422)
> Why do you think it's Haskells syntax that is the problem? The syntax is not so weird. I'd say the semantics are the hangup. 100% purity and lazy evaluation are a much harder pill to swallow then the syntax.

Could very well be - either way the language has been rejected. Boasting of Haskell characteristics[1] is, IMO, a great way to turn off prospective users.

[1] I don't really know if the Nix project actually does blog posts and reachouts where they boast of Haskell-ish similarities.

Re:How Nix and NixOS get so close to perfect by rowanG077 on Sunday April 24, 2022 @12:27PM (#31145594)
I don't really see that industry has rejected Haskell at all. Haskell target simply wasn't (or isn't) industry. You can't really be rejected if you aren't trying to get into that niche. And Haskell has seen significant industrial use. So they succeeded at something they didn't even want to succeed at.
Re:How Nix and NixOS get so close to perfect by tiew9Vii on Sunday April 24, 2022 @11:50AM (#31145203)
> That's irrelevant - if you want uptake

Haskell's slogan is "avoid success at all costs". Haskell isn't aiming for mass adoption. It wants to be a language for researching functional programming, it just so happens it's a useful language, and people write real software with it too.

From https://haskell.foundation/whitepaper/ > Haskell's slogan of "avoid success at all costs" was a clever and cheeky way of saying that innovation and research in programming languages, especially in functional programming, needed some insulation to succeed

Nix doesn't have such a slogan as far as I know. It, however, started as a thesis to try and research and innovate new ideas. https://edolstra.github.io/pubs/phd-thesis.pdf The Purely Functional Software Deployment Model.

Twenty years later, it's been rather successful as a research project, one of the most active repos on GitHub. It has gained a lot of usage and support without trying to be successful, popular or market itself.

The Nix language has helped it achieve what it set out to achieve. It's appealing to people who are interested in purely functional software. If that doesn't appeal to Javascript / PHP devs that's ok as it isn't trying to appeal to them.

The Nix expression language is small and pretty simple; everything is an expression.

The difficult bit is there are no javadoc/jsdoc/pydoc type docs beyond https://nixos.org/manual/nix/stable/expressions/builtins.htm... where you can go search easily. You have to go through the source code to find functions and see how they work. Also, you have to accept Nix is a ML style language, not a C style language. It's different to what you may know, but that isn't a fault of the language if someone only knows C style languages. The language is as it needed to be like that to achieve the design it wanted. Personally, I hate using Ansible firstly because of YAML. Secondly, Ansible is a task runner, often feeling like you are over abusing Ansible for things that are not a natural fit, and the debug headache dealing with determinism by convention only.

I think it comes down to Nix isn't for you. That's ok.

Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @01:36PM (#31146242)
> Haskell's slogan is "avoid success at all costs". Haskell isn't aiming for mass adoption. It wants to be a language for researching functional programming, it just so happens it's a useful language, and people write real software with it too.

This isn't well-known - read through this thread - their are many people in this thread who deny that Haskell usage in industry is insignificantly small.

Re:How Nix and NixOS get so close to perfect by kaba0 on Sunday April 24, 2022 @05:24PM (#31148486)
Do note that it should be read as "avoid success at all costs" though, which changes the meaning quite a bit.
Re:How Nix and NixOS get so close to perfect by nix23 on Sunday April 24, 2022 @10:24AM (#31144277)
>if you want uptake, you need to support what user's want

Before the iPhone no one knew they wanted a good camera and "apps" on their phone.

See the important point here -> "knew they wanted"

Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @10:33AM (#31144371)
> >if you want uptake, you need to support what user's want

> Before the iPhone no one knew they wanted a good camera and "apps" on their phone.

> See the important point here -> "knew they wanted"

Haskell has been around now for something like 25 years. You'd have a point if the iPhone was unpopular for 25 years before users finally decided to like it.

It wasn't. Users saw the iPhone and wanted it the minute they saw it. Programmers have been looking at Haskell for 25 years and rejecting it.

Re:How Nix and NixOS get so close to perfect by physPop on Sunday April 24, 2022 @12:03PM (#31145368)
Say it with me: right tool for the right job. Not every language should try to solve every problem. And not every problem is nicely solvable in every language. By your definitions any language other than what, C and js is "unpopular" and "Rejected by the industry" ?
Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @01:36PM (#31146231)
> Say it with me: right tool for the right job. Not every language should try to solve every problem. And not every problem is nicely solvable in every language. By your definitions any language other than what, C and js is "unpopular" and "Rejected by the industry" ?

I literally claimed otherwise, elsethread

> It's a reflection of what the programmers want. Apparently they wanted syntax with braces and semicolons.

Javascript, C, C++, C#, Python and Java have seen and are still seeing heavy use in the industry. Go has gotten traction too, now.

Any language that can be seen on a common metric to be more than low single-digits (and, in some cases, fractions) of a percentage can be safely said to be "used in industry". I cannot think of any survey amongst programmers which shows Haskell usage outside of 1%-3%.

Re:How Nix and NixOS get so close to perfect by nix23 on Sunday April 24, 2022 @04:18PM (#31147908)
I have no idea why you think you speak for "the industry", you maybe live in a bubble but fortran, cobol and haskell are alive and well...remember, the right tool for the job.
Re:How Nix and NixOS get so close to perfect by nix23 on Sunday April 24, 2022 @11:01AM (#31144663)
>Programmers have been looking at Haskell for 25 years and rejecting it.

I really don't know why you think that true:

https://wiki.haskell.org/Haskell_in_industry

And i really don't know why you speak for "programmers", just speak for yourself...maybe?

Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @01:38PM (#31146260)
>> Programmers have been looking at Haskell for 25 years and rejecting it.

> I really don't know why you think that true:

Because it doesn't show up any any metric as having significant usage. A list of 100 companies using it doesn't make the hundreds of millions of other companies not using it go away.

Re:How Nix and NixOS get so close to perfect by nix23 on Sunday April 24, 2022 @04:22PM (#31147935)
Your argumentation is just completely wrong, you think that "significant usage" is some kind of "quality". You try to argue that a hammer and a screwdriver are of significant usage, when i fact the best tool for the job is a scalpel.

FWI HN was not written in JavaScript or PHP but you can lookup that for yourself.

Re:How Nix and NixOS get so close to perfect by lelanthran on Monday April 25, 2022 @07:10AM (#31152918)
> Your argumentation is just completely wrong, you think that "significant usage" is some kind of "quality".

Nowhere did I claim that - you're reading things I did not say.

Claiming that something is rejected by everyone does not make any statement on the quality of that thing.

[EDIT: It's kinda common knowledge that Haskell is barely used in industry. I cannot remember coming across a single non-academic programmer in the workplace who actually wanted to use it, other than myself]

Re:How Nix and NixOS get so close to perfect by nix23 on Monday April 25, 2022 @10:05AM (#31154933)
>rejected by everyone

It should be clear now, that this is a wrong statement.

Re:How Nix and NixOS get so close to perfect by lelanthran on Tuesday April 26, 2022 @04:34AM (#31165248)
>> rejected by everyone

> It should be clear now, that this is a wrong statement.

You're correct - it's rejected by roughly 999 out of every thousand programmers.

Re:How Nix and NixOS get so close to perfect by ge96 on Sunday April 24, 2022 @11:50AM (#31145204)
Heh, there's a project I'm trying to get into and it's written in Haskell, I gotta learn it... if possible I'm probably going to port it to something else.
Re:How Nix and NixOS get so close to perfect by tasuki on Sunday April 24, 2022 @10:15AM (#31144188)
> soundly rejected by the industry

That same industry which embraced PHP and JavaScript? Is that an authority, on what?

Also, the industry hasn't rejected Haskell, it has just been learning from it very slowly. My prediction is this trend will consistently continue at the same glacial speed.

Re:How Nix and NixOS get so close to perfect by lelanthran on Sunday April 24, 2022 @10:36AM (#31144399)
> That same industry which embraced PHP and JavaScript? Is that an authority, on what?

It's a reflection of what the programmers want. Apparently they wanted syntax with braces and semicolons.

Someone else pointed out elsethread that maybe it's not the syntax, but the semantics, that is being rejected here.

Re:How Nix and NixOS get so close to perfect by taktoa on Sunday April 24, 2022 @03:33PM (#31147463)
Nix syntax has braces and semicolons... the only similarity to haskell is in using juxtaposition for function application (though this is technically optional; nothing is stopping you from typing f(x))