Earlier quoted context omitted.
Yes, the windows registry, the peak of our craft. No need to innovate, this one’s solved, wrap it up and move on Try taking more time to consider the problems you don’t have that others do, instead of writing anything off that doesn’t make sense to you (and simultaneously gatekeeping an entire industry)
Creating complex layers upon layers just to "solve" a very simple problem is not innovation. It's shittification.
Pkl, a Programming Language for Configuration
561–570 of 598 posts
Re: Pkl, a Programming Language for Configuration
#562Earlier quoted context omitted.
For me, that's where all the power of the language comes from. It's like writing your config in Go or Python (which I think is also a great approach) except its designed from the ground up for this use case of config generation.
Ah just give me typescript, I do not need to learn a new thing for configuration languages and at the end of the day the output is compatible with JSON. Typescript has all the stuff I would want: types, first class json support, an ecosystem of libraries (if you want it, I would probably not for config generation). And the tooling is amazing. Does pkl have LSP, syntax highlighting in every editor, debugger or repl?
Observationally, it seems that all that power eventually gets used, and then you end up with config that has complex interfaces, or becomes non-portable because it's doing arbitrary file reads, or is non-deterministic because of an ill-advised call to random or the system clock. The config then becomes something not maintainable by the rest of the team - just the few who know it.
Config languages seem to need to strike an interesting balance between being complex enough to allow for reasonable DRY code (which helps maintainability at the expense of readability), but not so complex that they're not generally-maintainable.
Re: Pkl, a Programming Language for Configuration
#563Earlier quoted context omitted.
Guess the obvious question is why don’t you want types in your config language? Pushing all the validation to parsing state just makes it hard to write valid config, because you only know if the config is valid when you feed it into your program. Having the ability to pull all that validation forward, and into your IDE, means you can be told about invalid config as you’re writing it. To me the idea of only wanting to…
Yeah, generally, you want to validate as early as practical... catching problems sooner is better than later. I think the problem might be separation of concerns... pkl comes in early, and by design is separated from your app and the details thereof. It seems good for validating high-level or external configuration constraints. But suppose you have some constraints based on implementation details of your app. Now you…
Re: Pkl, a Programming Language for Configuration
#564Earlier quoted context omitted.
> Ah just give me typescript, I do not need to learn a new thing for configuration languages People who don't know Typescript will still have to learn a new thing in that case, so there isn't really any reason to pick TS over any other existing language > syntax highlighting in every editor There is a tree-sitter parser for pkl, so it'll work anywhere where tree-sitter works. And for VSCode and JetBrains stuff, they…
More people know TS (or JS, close enough) than Pkl, it can be used for more, and it's got better tooling/support. Those are understatements.
Re: Pkl, a Programming Language for Configuration
#565Re: Pkl, a Programming Language for Configuration
#566Honestly, I don't imagine this being a good idea. The problem it solves is pretty clear, and it's easy to see how one attains the desire to solve that, but is it really that kind of problem which should be solved? It is kinda commonplace that you don't write configuration in the real PL. Maybe it's less obvious, when your working language is Go/Java, since they are compiled, so obviously you have no choice but to kee…
Re: Pkl, a Programming Language for Configuration
#567Re: Pkl, a Programming Language for Configuration
#568Earlier quoted context omitted.
More people know TS (or JS, close enough) than Pkl, it can be used for more, and it's got better tooling/support. Those are understatements.
TS tooling won’t tell you when your config value violates the constraint “isBetween(0, 100)” or “matches(Regex(…))”. Among other things.
Re: Pkl, a Programming Language for Configuration
#569Earlier quoted context omitted.
FWIW, we (CUE) are currently working on a LSP for CUE which should improve the IDE experience.
I really like CUE, but for most use cases I have I would want to embed it in an application, and Go is the only language with support. For it to gain more adoption it really needs a rewrite in a low-level language (C/Rust), so it can be exposed in various languages through an extension/FFI.
However it only being in Go and not implemented with some C ABI is a major downside for adoption, especially when their documentation itself for implementing the core CLI functionality in a go program (to then compile to a DLL for use in non-Go land) is pretty sparse.
Re: Pkl, a Programming Language for Configuration
#570Earlier quoted context omitted.
Ah just give me typescript, I do not need to learn a new thing for configuration languages and at the end of the day the output is compatible with JSON. Typescript has all the stuff I would want: types, first class json support, an ecosystem of libraries (if you want it, I would probably not for config generation). And the tooling is amazing. Does pkl have LSP, syntax highlighting in every editor, debugger or repl?
A big problem we've hit with allowing users to write Typescript (or any other general-purpose programming language) for our product is that it's too powerful. Observationally, it seems that all that power eventually gets used, and then you end up with config that has complex interfaces, or becomes non-portable because it's doing arbitrary file reads, or is non-deterministic because of an ill-advised call to random or…
As for I/O concerns, run it in CI with deno and ensure there is no I/O