Live data from Hacker News

Why are we templating YAML? (2019)

leebriggs.co.uk

661–667 of 667 posts

Re: Why are we templating YAML? (2019)

#661
post #660

Earlier quoted context omitted.

The problem is (to me) it's entirely obtuse. I can't call the function and get back some configuration - which is insane to me. You have to pass in all sorts of state, and you have a lot of difficulty producing the exact same state as your config in question would see in a real execution. Or at least i do. I even asked on several forums and the answer kept boiling down to "Well, it's just not easy. Sometimes not poss…

The parameters you pass in define your dependencies. For a program to compile it needs the compiler and that is a complicated dependency. One might think that only passing the paths to the dependencies would be enough. That way the inputs could be much simpler indeed. I guess there's room for a simpler Nix.

While i will instantly switch to Nickel for the type system once Nickel is available, i do think Nix could get a lot further by just having better tooling.

Notably error reporting is atrocious, but an interactive debugger would be amazing too. Ie to set a breakpoint and hop into an eval at your breakpoint. Would help immensely.

Still i just can't get behind a dynamic typing for anything remotely complex.. which i would describe Nix as. I have been counting down the days for Nickel.. it's been a long wait.

Re: Why are we templating YAML? (2019)

#662

Earlier quoted context omitted.

If it can't be expressed as a JSON schema, it's a bad idea. If it can be expressed by a JSON schema, it may be a good idea.

This does not match my experience. Can you provide some clear explanation or examples of why having less power to express a schema is desirable?

Paralysis of choice.

Re: Why are we templating YAML? (2019)

#663

Earlier quoted context omitted.

This does not match my experience. Can you provide some clear explanation or examples of why having less power to express a schema is desirable?

Paralysis of choice.

This remains an unconvincing argument.

Re: Why are we templating YAML? (2019)

#666

Earlier quoted context omitted.

This remains an unconvincing argument.

Not everybody needs convincing. JSON already won.

It won in places where one does not need to express an integer larger than 2^53. Lots of us have harder requirements.

Re: Why are we templating YAML? (2019)

#667

Earlier quoted context omitted.

It's literally shorthand for "Javascript XML" and its templating syntax is the same as XML. It has a lot to do with XML.

JSX stands for JSX. Your definition is something that people just imagine to be true. The React docs do not mention the word XML at all. The “templating” syntax is not XML. It has no defined semantics and does not generally support crucial XML features like namespaces.

you obviously didn't spend two seconds researching this

https://en.wikipedia.org/wiki/JSX_(JavaScript)

https://facebook.github.io/jsx/

Post reply on HN