Pkl, a Programming Language for Configuration
141–150 of 598 posts
Re: Pkl, a Programming Language for Configuration
#142Earlier quoted context omitted.
What advantages does Turing-completeness provide for a configuration language?
There are three (maybe more?) ways things can be Turing-incomplete: 1. You are limited to N evaluation/reduction steps. 2. The language doesn't include primitives like recursion or loops. 3. You can have recursion or loops, but the language makes you somehow prove that your program will terminate. I think (1) would be fine, but I don't know any configuration languages that use this approach. (2) is restrictive/annoyi…
Recursion is trickier. I think banning it or simply limiting stack depth seems fairly reasonable? In fact I’m pretty sure most Turing-complete languages have a stack depth limit, so unbounded recursion is not allowed for those either. I don’t see a limit being a problem, because again this is a config language.
I don’t see why HTML escaping needs Turing-completeness. It shouldn’t need any unbounded iteration (it should be limited to the size of the input string) or unbounded loops. In general, I can’t think of any typical data processing code where turning completeness is required, but could be wrong. Do you have any practical examples of transformations that need unbounded iteration?
Re: Pkl, a Programming Language for Configuration
#143Earlier quoted context omitted.
> Apple has done nothing cross platform or open source or community oriented 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…
CUPS was done by Easy Software Products, in 1997. Apple adopted it only in 2002. Swift is a language entirely in the control of Apple, mainly targeting Apples platforms. With little to no community engagement. Bonjour is not really cross platform, and not really open source either as it has lots of strings attached to the license and terms one can use it under. (I wouldn't say that Apple has done "nothing" -- but to…
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.
Re: Pkl, a Programming Language for Configuration
#144sadly the Go implementation is bloated as hell: https://github.com/apple/pkl-go/blob/main/go.sum no thank you.
Re: Pkl, a Programming Language for Configuration
#145Not to be confused with “pickle”, the Python object serialization format…
Re: Pkl, a Programming Language for Configuration
#146Re: Pkl, a Programming Language for Configuration
#147Earlier quoted context omitted.
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…
FWIW, we (CUE) are currently working on a LSP for CUE which should improve the IDE experience.
I'm assuming it's becaus CUE is still unstable?
Anyway, if others are interested in CUE's LSP work, I think https://github.com/cue-lang/cue/issues/142 is the issue to subscribe to
Re: Pkl, a Programming Language for Configuration
#148Pkl was built using the GraalVM Truffle framework. So it supports runtime compilation using Futamura Projections. We have been working with Apple on this for a while, and I am quite happy that we can finally read the sources! https://github.com/oracle/graal/tree/master/truffle Disclaimer: graalvm dev here. Edit: typo
I ask cause the Project Galahad page on openjdk.org is a bit sparse on details.
Re: Pkl, a Programming Language for Configuration
#149Re: Pkl, a Programming Language for Configuration
#150In a competition with sky/starlark, I feel skylark would win here. “Safe subset of python” is what a lot of people presented with this problem want, and skylark gives them almost exactly that. OTOH, curious to see what advantages Pkl gains from not having the constraints of maintaining familiarity with another language.