Live data from Hacker News

Pkl, a Programming Language for Configuration

pkl-lang.org

481–490 of 598 posts

Re: Pkl, a Programming Language for Configuration

#481

Built-in fetching of http resources and reading files from the filesystem[1] combined with turing-completeness are features that I wasn't expecting from a configuration language. I wonder if the complexity this brings is justified. 1: https://pkl-lang.org/main/current/language-reference/index.h...

Sounds a bit like Mako in Python, that allows you to code Python in the template, iirc.

Re: Pkl, a Programming Language for Configuration

#482
post #262

Earlier quoted context omitted.

The experience with LSPs is quite underwhelming compared to what a native language plugin in IntelliJ can do. That isn’t to say the approach is bad, but it’s definitely a trade off.

How come? I don't know anything in say, pycharm, that can't be done with a LSP server and plugins. But that's probably because I don't know enough so I'm curious about what limitations an LSP would involve!

Refactorings are one example where LSP can’t match IntelliJ. A language server also takes far more skill and effort to implement than the equivalent IntelliJ plugin, where much of the heavy lifting is done by the IntelliJ framework. And you still need at least a lightweight plugin for each supported editor. That’s why a language server isn’t necessarily the best place to start but hard to avoid in the long run.

Re: Pkl, a Programming Language for Configuration

#484
post #169

Earlier quoted context omitted.

Looks like it might fix three big issues I had with Cue: 1. The only way to use it is to run their Go CLI app to convert the Cue into JSON and then load that. That sucks. I want native support. Jsonnet does this a lot better ( https://jsonnet.org/ref/bindings.html ), and PKL at least supports 4 languages. Cue only supports Go directly. Not good. 2. Cue has a super fancy type system, but as far as I could figure out t…

> [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.

Re: Pkl, a Programming Language for Configuration

#485

Earlier quoted context omitted.

> ...GraalVM Truffle framework... Futurama Projections... I know it's partly on me for not knowing the domain, but I honestly suspected somebody is trying to make fun of me with some concentrated technobabble. Especially since I wouldn't expect the topic (configuration languages) to require complex mathematical machinery to work with. Now I have something interesting to dig into.

What has most impressed me about GraalVM and Truffle is their capability of deep-optimizing high-level code like Python and Ruby. I once saw a demo where someone took a simple operation in Ruby using inefficient-but-elegant syntax (including creating and sorting an array, where a simple loop would have been the appropriate approach in C). He compiled that using TruffleRuby and the entire array construction and sortin…

Really? Link?

Re: Pkl, a Programming Language for Configuration

#486
post #435

Earlier quoted context omitted.

You're absolutely right, k8s is a pig.

Especially since k8s allows using arbitrary labels for plugins, effectively creating „stringly typed“ programming. Nobody is stopped from compiling code, converting it to base64 and storing it into a label for later execution. Arbitrary parameters like this are the opposite of a unifying abstraction. That ingress-behavior wasn‘t defined but pluggable to suit existing load balancers also broke the abstraction.

I do feel there's a simple abstraction under there somewhere - k8s config is just a big tree, after all. And adding pkl's loops on top of that would probably reduce a lot of duplication.

Re: Pkl, a Programming Language for Configuration

#487

Earlier quoted context omitted.

Copybara uses it

Step two of installing Copybara is to install Bazel [0], so that doesn't exactly contradict my claim that if you're not already using Bazel you probably won't use Starlark. [0] https://github.com/google/copybara

Bazel is just the build system used to build Copybara. You don’t need to have Bazel in your system to use an already built copy of Copybara

Re: Pkl, a Programming Language for Configuration

#488

Earlier quoted context omitted.

There's no "walled garden" here. We want Pkl to be useful for many developers, for a variety of purposes. Hopefully that's clear enough with Java, Kotlin, and Go being amongst the various supported language bindings. We also already support Linux, and plan on supporting Windows. It's also open sourced under the Apache 2.0 license, which grants you the right to distribute and modify it. Cheers

I appreciate you having good intentions. I don't mean to be disrespectful. This however does not change my position that we have more than enough scripting languages focused on string operations, and don't need another language. And especially not a bloated one that itself depends on huge frameworks. If the same task can be solved using a 76KB standard Unix tool, creating a custom language with a huge bloated runtime…

> And my position also stands that it would make far more sense to finally agree on a config file standard format

It would also make far more sense for humans to agree on most things and work towards a common goal that benefitted us all, but that’s just as much of a pipe dream.

Proposing something that will never happen is not a practical solution.

https://xkcd.com/927/

Re: Pkl, a Programming Language for Configuration

#489

Pkl, pronounced like pickle? Pickle in Python https://docs.python.org/3/library/pickle.html Tcl pronounced tickle. https://www.tcl.tk/ PCL, was it ever pronounced pickle? https://en.m.wikipedia.org/wiki/Printer_Command_Language

I was wondering whether anyone would point out the Python pickle, which is often used for saving trained ML models in .pkl files.

I mean, at this point almost every memorable 3 letter file extension probably already has some claim to it, but still, it would have been nice if Apple had done some research and made this more unique.

Re: Pkl, a Programming Language for Configuration

#490

Earlier quoted context omitted.

What has most impressed me about GraalVM and Truffle is their capability of deep-optimizing high-level code like Python and Ruby. I once saw a demo where someone took a simple operation in Ruby using inefficient-but-elegant syntax (including creating and sorting an array, where a simple loop would have been the appropriate approach in C). He compiled that using TruffleRuby and the entire array construction and sortin…

Really? Link?

He probably means one of the wonderfully crafted talks by Chris Seaton.

Here is one of the many: https://youtu.be/bf5pQVgux3c?si=S8Dm5d_GXYXgJtnY

If you go looking for more you will find many more marbles.

Post reply on HN