Live data from Hacker News

Pkl, a Programming Language for Configuration

pkl-lang.org

491–500 of 598 posts

Re: Pkl, a Programming Language for Configuration

#491
post #370
post #280

Earlier quoted context omitted.

Glad I'm not the only one who had this reaction. I just can't bring myself to accept that a problem that could be solved with a slightly better version of JSON or property lists requires this many buzzwords.

Those aren't "buzzwords" though, it's a very specific way to implement programming languages. It's not really meaningful except for the PL implementation nerds. Especially the Futamura projections. It's almost magic and very few people have even heard of them.

Very few people have heard of them. That is exactly the reason why I mention them as often as I can. They are a great entry into the world of meta compilers.

Re: Pkl, a Programming Language for Configuration

#492

I thought it odd that the language bindings didn't include the most popular langage, Python. In fact, Python seems not to be mentioned at all in the linked page. So I'm wondering, is it 1) Because the developers of Pkl are Python haters 2) Because the developers of Pkl are so overawed by Python that they can't imagine Pkl contributing anything useful to the Python ecosystem In either case, having suffered so much usi…

Another possibility: a naming conflict with, and potential confusion around the already existing Python serialisation library 'pickle'?

Re: Pkl, a Programming Language for Configuration

#493
post #474

Earlier quoted context omitted.

HLS -- created by Apple, just about everybody uses it for streaming on the web. And I think CSS animations and transforms mostly came out of Apple; at any rate, they're very similar to the animations and transforms in UIKit that originally came from NeXT.

Apple being gung-ho to push a technology to further nail Flash to the cross whether the actual reason, at least is consistent with their MO and not some great contribution to open standards.

As long as HLS is more open than Flash was, why not? It could be both of those things.

Re: Pkl, a Programming Language for Configuration

#494

So like cue [0] but more primitive, less principled and in java? [0] https://cuelang.org

I wish the Cue docs were better. I arrived here https://cuelang.org/docs/usecases/configuration/ but it doesn’t answer basic questions like “can I define my own validation functions (the > < != operators used in the example)?”.

Re: Pkl, a Programming Language for Configuration

#495

Earlier quoted context omitted.

I guess it strikes me as not just a documentation and awareness gap, but a different paradigm in a more fundamental way. I think your last sentence gets at that too: For Nix, configuration management is just one component of a broader and more powerful paradigm. And it seems to me like putting a square peg in a round hole (or as you say, a bit silly) to try to use it to solve this narrower and simpler problem.

Better to learn a tiny corner of nix (which you may later apply to the rest of it, or not) than to learn a language with a narrower use case. But one who embraces nix fully is one who is willing to commit a lot of time to turning their back on convention. Returning to 90% of the conventions that they worked so hard to leave behind probably won't excite them. So it's not silly, it's just that the person to do it is cu…

> Better to learn a tiny corner of nix (which you may later apply to the rest of it, or not) than to learn a language with a narrower use case.

"Better" in what way?

Like, maybe I agree in some sort of philosophical sense, of how it's better to learn and expand one's awareness of what exists and is possible in the world. That is, better for students, similarly to how I'd say it is better for students to learn lisp and haskell, because they'll figure out how to use javascript and python and C# or whatever as needed on the job. And I'm a believer in life-long learning, that everyone should do their damndest to carve out time to be a student at all times throughout life. So certainly I'm in favor of learning about Nix and its config structure and comparing and contrasting it to other things like this Pkl.

But I don't think the idea of using Nix's config management instead of a narrowly-targeted config management tool would be "better" in the sense of a professional figuring out how to set up or refactor the config structure within the non-Nix paradigm of the vast majority of organizations. And that's what I've been talking about here.

I'm actually a Nix kool-aid drinker, believe it or not, and I hope its paradigm will sweep the world, but I also have to do what's right by the organizations I work within at each moment in time, and being at the vanguard of the Nix paradigm has not been that, in my view, yet.

Re: Pkl, a Programming Language for Configuration

#496
post #169

Earlier quoted context omitted.

> [CUE] doesn't even have functions. Note that CUE has comprehensions, which are morally (but not syntactically) functions (actually closures). They are a way to transform values (which can be types) into other values. We are also adding real function types to CUE. At least in the beginning these functions will be written in other languages than CUE itself, however. While we are very principled when it comes to langu…

What does "morally" mean here? I've not seen that term used in compsci except when about ethics.

I believe the term comes from this paper: https://www.cs.ox.ac.uk/jeremy.gibbons/publications/fast+loo.... See section 5 which defines “moral equality”.

Re: Pkl, a Programming Language for Configuration

#497
post #496

Earlier quoted context omitted.

What does "morally" mean here? I've not seen that term used in compsci except when about ethics.

I believe the term comes from this paper: https://www.cs.ox.ac.uk/jeremy.gibbons/publications/fast+loo... . See section 5 which defines “moral equality”.

That is indeed the only reference I could find (and maybe Cue is inspired by this paper?), but they don't seem to explain why they use such language. They talk about "unjustified reasoning" and laws, but the connection to ethics seems questionable. But I've not read the whole paper.

Re: Pkl, a Programming Language for Configuration

#498
post #474

Earlier quoted context omitted.

Apple being gung-ho to push a technology to further nail Flash to the cross whether the actual reason, at least is consistent with their MO and not some great contribution to open standards.

As long as HLS is more open than Flash was, why not? It could be both of those things.

Ha, I was only referring to the CSS animations. That seemed at the time to be more pressing. But no disagreement.

Re: Pkl, a Programming Language for Configuration

#499
post #106

What I like: - the validation system - ability to split large configuration files into smaller files and enhance readability (I know Java / Spring Boot apps already have this ability using profiles) - multiple language support Wonder if it’s possible to have more complicated validation functions. The example given validates 1 configuration (“port must be greater than 1000”). But there are times when some configuratio…

the validation you are asking for sounds like what CUE does.

If you say

a: 5

a: 3

That’s an error.

If you want the ability to "override", you have to write it like this, for example:

a: *5 | int

a: 3

This also works for struct/list members, so you can set defaults for all fields, and stuff like that.

https://cuelang.org/docs/about/

Re: Pkl, a Programming Language for Configuration

#500
post #428

Earlier quoted context omitted.

If your configurations are simple, you don’t need this. If they are not, you might. Because you have not run into the problems this has addressed in your career, does not mean that you know better than Apple how to solve them. In fact, it means like you are uniquely unqualified to solve them. Acting like you are in a severely condescending dismissal of the engineers who worked on this makes for boring conversation.

Well, Apple is the gold standard in creating new proprietary programming languages for often just evil reasons - typically for vendor lock-in. They invented the Objective C and Swift, and made it pretty much impossible to use any standard language to target their platforms in a cross-platform way. I can access the Windows API with any language I want. I can access the Linux Kernel API with any language I want. I can…

> They invented the Objective C and Swift

Apple had nothing to do with the invention of Objective-C. It had been out for 12 years when Apple first started using it.

Post reply on HN