Live data from Hacker News

Pkl, a Programming Language for Configuration

pkl-lang.org

351–360 of 598 posts

Re: Pkl, a Programming Language for Configuration

#351

Earlier quoted context omitted.

Nix does this too and maintains perfect caching from top to bottom.

Nix is a build & metaprogramming system, not (just) a configuration language.

Nix is a bunch of things, one of which is a configuration language.

Re: Pkl, a Programming Language for Configuration

#352

Earlier quoted context omitted.

Additionally I cant think of other such projects from Apple. They tend to build things that get used extensively till the end of their life is consumed. I wish Apple would continue to open source much more. Especially old software much like Microsoft does. I would kind of enjoy a Linux Distro that can natively run old Apple software and tools.

Clang leaps to mind. Most of LLVM was developed under Apple's auspices, although the project predates Apple hiring Chris Latner. Swift is also open source, although in practice it's almost always used in a macOS context. Which I think is a shame, it's a great language for writing the sorts of servers for which people usually reach for Go. That's not a complete list of programs Apple has open-sourced, although clearly…

FoundationDB was open sourced a few years after they bought it too.

Re: Pkl, a Programming Language for Configuration

#353

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.

Re: Pkl, a Programming Language for Configuration

#354
post #66

> We offer plugins and extensions for IntelliJ, Visual Studio Code and Neovim, with Language Server Protocol support coming soon. Why? Why would they not have just done the language server first (or only)? All of those have built-in support for it, so separate implementations wouldn't have been necessary; that's the point . I just don't understand why you'd make that decision on a greenfield project today, especially…

Language Server support isn't nearly as good as building a native plugin for the IDE.

Re: Pkl, a Programming Language for Configuration

#355

Earlier quoted context omitted.

Nix does this too and maintains perfect caching from top to bottom.

But I have no idea how I would build a config structure for an application using Nix... It seems very powerful so I'm sure it's possible, but I just have no idea where I'd start for this specific use case. Whereas this documentation for Pkl is entirely about that use case.

I agree that there's a huge documentation and user awareness gap, but NixOS is obviously possible to configure this way so it's definitely possible.

Might be room for a tool that exposes just the configuration management side of Nix in a more approachable way... on the other hand it would be a bit silly to use nix for conf files and not also for the underlying packages.

Re: Pkl, a Programming Language for Configuration

#356
post #240

Pkl 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

Your mention of Futamura Projections was a nice reminder of how very mathy/theoretical foundations underpin Nice Things in high-level languages, like Hindley–Milner inspired type systems and modern optimizing compilers targeting SSA form. Value Lattices in Cue [1], another config programmable configuration language, also fall into this bucket. [1]: https://cuelang.org/docs/concepts/logic/

Currently using Cue in a major project. It can be a puzzle. But, we like it a lot. Wish it had a bigger community.

Re: Pkl, a Programming Language for Configuration

#357
post #171

Earlier quoted context omitted.

Did you activate the virtual environment? For all the flak python gets, dependency setup is pretty simple if you're not flailing around aimlessly python3.12 -m venv --copies --clear --upgrade-deps ".venv" source ".venv/bin/activate" python -m pip install --upgrade pip setuptools wheel python -m pip install --editable .

Yes, I had activated the virtual environment. Thanks for the guide. It works without problems. I had used `virtualenv venv -p /usr/local/bin/python3.12` in my setup. Yours seems to be a better way.

That right there is the main problem with python dependency management - too many damn ways to do the same thing.

And to think "There should be one-- and preferably only one --obvious way to do it." is in the Zen of Python...

Re: Pkl, a Programming Language for Configuration

#358
post #320

Earlier quoted context omitted.

Ah sorry - that was an unintended side-effect of re-upping the original submission. I must have done some of the steps in the wrong order.

You mean you don’t have a distributed merge post microservice that emits post migration events, which are then consumed by a post owner conversion service using your existing event-driven architecture to facilitate seamless data synchronization and user notification processes??? That is not very hacker news of you from the guy who owns hacker news.

[deleted]

Re: Pkl, a Programming Language for Configuration

#360
post #280

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.

Glad I'm not the only one who had this reaction. I just can't bring myself to accept that a problem that could be solved with a slightly better version of JSON or property lists requires this many buzzwords.

If Futamurma means what I think it means skimming across the Wikipedia entry, it would mean that simple value-holder-file configurations would be parsed and checked at the speed of a general purpose tokenizer. But without closing the door to what the language can express in more elaborate configuration file "landscapes". Best of both worlds and presumably all without requiring anybody but the toolmakers to understand what the buzzwords really mean.
Post reply on HN