Live data from Hacker News

Pkl, a Programming Language for Configuration

pkl-lang.org

371–380 of 598 posts

Re: Pkl, a Programming Language for Configuration

#371
post #188

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.

Really glad it wasn't just me. Genuinely thought someone was trying to make a joke.

Same. There was a mini subthread years ago that applies.

https://news.ycombinator.com/item?id=13752964

Re: Pkl, a Programming Language for Configuration

#373

I'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?

The amount of problems I've had with JSON in my career makes me think almost anything could be better than it. There's so many weird edge cases in the JSON spec that you can hit that it just becomes endless levels of hair pulling.

Have you tried YAML? :-)

Re: Pkl, a Programming Language for Configuration

#374
post #318

I'm having a little trouble understanding the problem(s) Pkl is trying to solve. After reading the title, my assumption was that Pkl was yet another newer, better configuration language (a la TOML), but now that I've read the article, it sounds like it's more a language for _generating_ config. Unless I'm mistaken, it sounds like an abstraction on top of your config files meant to help you build & re-use configuratio…

> A problem space I'm familiar with is having a bunch of Terraform or Cloudformation configuration you want to share/repeat in multiple projects. Doing-so can get hairy quickly, as the path of least resistance is to copy-paste a bunch of config you barely understand from some other project, and then perform trial-and-error surgery to find and change a couple of lines to suit your project.

Yes, Pkl is meant to solve this problem. It's a single place for you to configure all your targets. Within the same codebase, you can generate static configuration, and also import the same Pkl source files into a runtime application, so you don't have to copy/paste things around.

Re: Pkl, a Programming Language for Configuration

#375

Earlier quoted context omitted.

That sounds like a limitation on Jetbrains part, no? Or is it due to LSPs themselves?

I suppose there are things which are just beyond the scope of LSP, like menus and other UI bits which are IDE specific, not to mention refactoring tools etc.

That would be on the client (the LSP support in the specific IDE) to implement though, and would then work for any language server that implemented those capabilities?

Like 'go to definition' or whatever is surely in every IDEs menu, but it can be done with LSP.

Re: Pkl, a Programming Language for Configuration

#376

I appreciate what the language is trying to do and simplified configuration that is repeatable / re-usable is the goal. However I can’t help but wonder why systems don’t simply start adopting full programming languages once they hit a certain complexity. Having to use another language just to reproduce YAMl or what have you in a repeatable fashion is a symptom of the problem IMO

This is a full programming language! It’s just designed for exactly this goal.

Yes that I realize if I didn’t make it clear.

I am definitely lamenting the fact that SDKs (CDKs?) aren’t already exposed in most common languages as a way to take advantage of the robust features of full programming languages.

They either aren’t at all or they use some hybrid format (terraform etc) or they’re Byzantine in nature or ignore good API conventions

Re: Pkl, a Programming Language for Configuration

#378
post #288
post #174

Earlier quoted context omitted.

As I understand it: GraalVM is an alternate JDK that can, among other things, do ahead-of-time compilation for Java. Truffle is a framework for building languages, that sits on top of Graal. Futamura Projections are a particularly interesting use case for compile-time partial evaluation. With partial evaluation you have static (known at compile time) arguments to your function, and dynamic (known at runtime) argument…

> Truffle is a framework for building languages, that sits on top of Graal. wtf is Graal? That sounds like a supporting character from Beowulf.

https://graalvm.org

Polyglot and native compilation enabled runtime for JVM, can run Js, Python, Ruby and more.

Re: Pkl, a Programming Language for Configuration

#379

Earlier quoted context omitted.

Reduce it further: strings and maps. Arrays can be represented as a map.

Strings can be represented as arrays too. Doesnt make a good argument for removing them.

Doing so would necessitate the addition of another type: character/grapheme cluster.

Representing arrays as maps would impose no additional requirements outside of validation which is already considered as part of the proposal in question.

Re: Pkl, a Programming Language for Configuration

#380

Earlier quoted context omitted.

FWIW Graal is probably one of the most exciting technologies to come out of Oracle in a long time.

It came out of Oracle. Kids of death.

It actually didn’t, it came out of academia. Oracle just did the right thing one time.
Post reply on HN