it's very brave to release a new configuration language with no Python support today.
Pkl, a Programming Language for Configuration
51–60 of 598 posts
Re: Pkl, a Programming Language for Configuration
#52Anything development related from Apple is inherently disinteresting unless it's aimed at Apple, is for Apple and you're building for Apple. Apple has done nothing cross platform or open source or community oriented so if they come out with something that's intended to be more general is has no base, no users, no audience of non-Apple developers to land on. I'm not anti Apple - I love MacOS and Apple is my main machi…
Re: Pkl, a Programming Language for Configuration
#53JSONSchema covers a lot of various schema needs and YAML is something a lot of developers are comfortable with. I know both of those technologies are not popular here in HN but YAML type-checked and editor-autocomplete-enabled using JSONSchema is a solid choice for configurations in my opinion.
another common thing is that sometimes you have to define multiple very similar sections in configuration that cannot be handled with yaml archors, eg I have repeated definition dozen times that changes only in 2 numbers that are deeply in structure and name string, and I need to repeat everything because of that and it's pita to modify all other parameters that need to be kept in sync
therefore I think this format looks really nice, although I'm concerned by loops that can be used there, is there possible to create simple config that takes ages to parse or consume very large amounts of memory?
Re: Pkl, a Programming Language for Configuration
#54So like cue [0] but more primitive, less principled and in java? [0] https://cuelang.org
One thing I like to see is the direction of “declare types and validations in a single place, integrate with any language”.
My daily codebase atm has types declarations in typescript, cue, pydantic and for our database… and it’s driving me bonkers seeing as most types are already declared in Cue to start with. I played a little with packages meant to translate them i.e. Cue -> TS, but nothing worth the effort.
IMO it would be a big upside for Cue to handle these as first class language features.
Re: Pkl, a Programming Language for Configuration
#55Anything development related from Apple is inherently disinteresting unless it's aimed at Apple, is for Apple and you're building for Apple. Apple has done nothing cross platform or open source or community oriented so if they come out with something that's intended to be more general is has no base, no users, no audience of non-Apple developers to land on. I'm not anti Apple - I love MacOS and Apple is my main machi…
Re: Pkl, a Programming Language for Configuration
#56In what sense is this programmable? Can I write a loop in this? If? Elvis operator? A simple map lookup?
https://pkl-lang.org/main/current/language-reference/index.h...
> If?
https://pkl-lang.org/main/current/language-reference/index.h...
> Elvis operator?
https://pkl-lang.org/main/current/language-reference/index.h...
> A simple map lookup?
https://pkl-lang.org/main/current/language-reference/index.h...
Re: Pkl, a Programming Language for Configuration
#57I'm sorry, can someone explain why one would want to translate from one data description language to another (Pkl -> JSON, or whatever)? Why not just write JSON (or whatever) to begin with?
city = {
"id": 3,
"name": "Foo",
"lat": 3.555,
"long": 4.11,
}
Is the same as: city = {
"id": "3",
"name": "Foo",
"coordinates": [3.555, 4.11]
}
But you want to normalize that.Something like Cuelang will:
- Define the schema that will let you know what you should put inside.
- Allow you to inflate that schema into a full file, providing only the values.
- Will generate always a correct file, with no typo, or format error.
- Will check that the data is correct and tell you if there are any errors.
- Is note theoretically tied to a particular run time or stack.
Re: Pkl, a Programming Language for Configuration
#58So like cue [0] but more primitive, less principled and in java? [0] https://cuelang.org
Re: Pkl, a Programming Language for Configuration
#59So like cue [0] but more primitive, less principled and in java? [0] https://cuelang.org
Looks like it has better IDE integration. Still, I am going to stick with cue because of what you mentioned and also because it is a community project. Apple has very few actively maintained open source projects and sometimes such projects are difficult to contribute to or have wavering support for the open source side. It is great having corporate backing behind something like swift that needs a massive amount of wo…
Re: Pkl, a Programming Language for Configuration
#60Anything development related from Apple is inherently disinteresting unless it's aimed at Apple, is for Apple and you're building for Apple. Apple has done nothing cross platform or open source or community oriented so if they come out with something that's intended to be more general is has no base, no users, no audience of non-Apple developers to land on. I'm not anti Apple - I love MacOS and Apple is my main machi…
Cups - https://en.wikipedia.org/wiki/CUPS
Swift - https://en.wikipedia.org/wiki/Swift_(programming_language)
Zeroconf - https://en.wikipedia.org/wiki/Bonjour_(software)
I think they're bad, opaque opensource maintainers, but they did release some popular things that have communities on other systems.
I do wish they just contributed to nickel or something else though rather than doing their NIH as usual.