Re:Pkl, a Programming Language for Configuration
by jen20 on Saturday February 03, 2024 @01:25AM
(#39238017)
Probably secret option number 3 of no-one having needed it yet - because the tool is standalone, you can render the required output before running whatever needs to consume it. I’ve certainly used it from Python in that manner - bindings are only required if you want to consume the raw language programmatically from a Python context.
Re:Pkl, a Programming Language for Configuration
by mimischi on Saturday February 03, 2024 @01:32AM
(#39238042)
Exactly this. Pkl is most useful as a type-safe configuration language that can output to any other format (already supported, or put together by the user within Pkl). You’ll always get valid JSON, YAML, PLIST, what-have-you as output. This you can then parse in the language/system of your choice.
Certainly language bindings are useful, and if there’s demand likely someone will create them.
Re:Pkl, a Programming Language for Configuration
by Alifatisk on Saturday February 03, 2024 @06:49AM
(#39239471)
> 1) Because the developers of Pkl are Python haters
Is it really that deep?
Re:Pkl, a Programming Language for Configuration
by latexr on Saturday February 03, 2024 @07:20AM
(#39239651)
“Popular” doesn’t mean “fitting every purpose”.
All the listed languages are compiled and statically typed. Python is neither. Neither is JavaScript, another popular programming language which is also not listed.
Re:Pkl, a Programming Language for Configuration
by HardlyMatters on Sunday February 04, 2024 @06:09PM
(#39255491)
I don't see how the static typing of the bound languages enters into it. Python has type hints which can be enforced by some compilers, if you are so committed to type safety in your config scripts. If you have Pkl output YAML or XML then where is your type safety?
Since "popular" does mean that very many people are using it, I think it would be wise to try to serve the Python community.
Re:Pkl, a Programming Language for Configuration
by IshKebab on Saturday February 03, 2024 @07:27AM
(#39239700)
> Because the developers of Pkl are Python haters
Look at the languages that they do support - Go, Swift, Kotlin, Java. These are all robust languages for writing production grade software. That's probably why - the people at Apple using this don't need it for their hacky Python scripts.
Re:Pkl, a Programming Language for Configuration
by HardlyMatters on Sunday February 04, 2024 @06:13PM
(#39255518)
By "production grade software" do you mean major sites like Instagram or Reddit?
Re:Pkl, a Programming Language for Configuration
by speleding on Saturday February 03, 2024 @08:33AM
(#39240188)
I think this intended for compiled languages? If you already have Python or Ruby in your stack you can simply write a little script to generate the required JSON or YAML. I'm not sure you would ever want to add Pkl to the mix in that case?
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 using Ansible and its excrable YAML scripting, I may use Pkl together with Python.