top | item 20488830

(no title)

jforberg | 6 years ago

I mostly deal with openembedded at work and I have few positive things to say about it. I'm sure Nix is much faster and nicer. Frankly it's hard to imagine that the opposite could be true.

But your example looks nothing like Json.

discuss

order

vertex-four|6 years ago

I'm not sure what to say. Replace the = signs with colons, the semicolons with commas, stick commas between array elements and stick everything between quotes and you basically have json.

weberc2|6 years ago

The complicated bits are the import notations (what do the different variations mean and when to use them?), the recursive declarations (and knowing when to use them). Also, since expressions are often functions and the nixpkgs people don’t believe in types or docs, it’s difficult to track down the type info for each argument (what properties does it have?). You just end up grepping blindly through nixpkgs to find the callsite and even then the argument is often the result of a function call, so you have to find the function and it’s definition and look at the return and hope that it is not “return someOtherFunc()” lest you have to track down yet another function (also, odds are “someOtherFunc” is not the name of the function, but rather the name of a parameter into which a function was passed, so you’re back to blindly grepping nixpkgs).

Nix is great in concept but the language or idioms make it really difficult to use.

tannhaeuser|6 years ago

That looks like a Turing-complete DSL. Not like JSON at all. Do we need yet another Turing-complete language for writing package metadata?